Skip to content

feat(runtime): popcraft.setPanelIcon for a plugin's sidebar panel icon - #12

Merged
spacedevin merged 1 commit into
mainfrom
feat/set-panel-icon
Nov 3, 2026
Merged

spacedevin merged 1 commit into
mainfrom
feat/set-panel-icon

Conversation

@spacedevin

Copy link
Copy Markdown
Contributor

Adds popcraft.setPanelIcon({ panel?, icon?, color? }) to the plugin runtime and PopCraftPanelIconOptions to the types. A plugin with a sidebar panel (contributes.panels) can swap its rail icon while it runs, as a mask in the rail's colour (default) or in its own colours (color: true); icon: null goes back to the manifest icon. The editor resets it when the plugin stops.

Host side: getpopcraft/popcraft-app (the setPanelIcon command + contributes.panels[].autostart). First user: the Nihmbus plugin, whose rail icon is an outline when disconnected and the coloured logo when connected.

pnpm build and pnpm typecheck pass.

A plugin with a sidebar panel can change the panel's rail icon while it runs,
in the rail's colour or its own (e.g. a connector showing it is connected).
The editor resets it when the plugin stops.
@spacedevin
spacedevin merged commit c536e6f into main Nov 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant