feat: support plugin mobile tab icons

This commit is contained in:
Federico Jaramillo Martinez
2026-06-03 21:13:35 +02:00
parent 4548e5c6a0
commit 401dab69ad
8 changed files with 58 additions and 8 deletions
+25
View File
@@ -51,6 +51,31 @@ describe("PluginRegistry", () => {
expect(registry.getWorkspacePanels().map((panel) => panel.id)).toEqual(["core:workspace.files", "core:workspace.git", "core:workspace.terminal"]);
});
it("provides html and svg helpers to plugin activation", () => {
const registry = new PluginRegistry();
registry.register({
id: "example",
plugin: {
apiVersion: 1,
name: "Example",
activate: ({ html, svg }) => ({
contributions: {
workspacePanels: [
{
id: "workspace.logs",
title: "Logs",
icon: svg`<svg viewBox="0 0 24 24"><path d="M4 6h16"></path></svg>`,
render: () => html`<p>Logs</p>`,
},
],
},
}),
},
});
expect(registry.getWorkspacePanels()[0]?.icon).toBeDefined();
});
it("rejects duplicate ids within the same namespace", () => {
const registry = new PluginRegistry();