Skip to content

feat: Floating panels and dynamic plugin lifecycle API#166

Open
sandesh-sp wants to merge 2 commits into
feat/floating-panelsfrom
feat/dynamic-panel-mounting
Open

feat: Floating panels and dynamic plugin lifecycle API#166
sandesh-sp wants to merge 2 commits into
feat/floating-panelsfrom
feat/dynamic-panel-mounting

Conversation

@sandesh-sp

@sandesh-sp sandesh-sp commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Builds on the floating-panels foundation to add a full dynamic plugin lifecycle API.

  • Dynamic plugin load/unload: Extends ToolControllerModern_ with deferred loading (startUnloaded config), a reverse toolId → targetId lookup map, hidden-state tracking, and explicit loadPlugin / unloadPlugin methods so plugins can be mounted and dismounted at runtime without a full page reload
  • Public mmgisAPI surface: Exposes showPlugin, hidePlugin, loadPlugin, unloadPlugin, isPluginLoaded, isPluginHidden, showPanel, and hidePanel on mmgisAPI so external callers and other plugins can control visibility and lifecycle programmatically
  • actionButtonLink events: Enhances action button link handling to fire both core events and plugin-scoped events, enabling cross-plugin communication via button actions

Test plan

  • Set startUnloaded: true on a plugin; confirm it is registered as deferred and isPluginLoaded returns false
  • Call mmgisAPI.loadPlugin(id) and confirm the plugin mounts and isPluginLoaded returns true
  • Call mmgisAPI.unloadPlugin(id) and confirm destroy() is called and isPluginLoaded returns false
  • Call mmgisAPI.hidePlugin(id) / showPlugin(id) and confirm the DOM element gains/loses the plugin-hidden class and isPluginHidden reflects the state
  • Call mmgisAPI.hidePanel(id) / showPanel(id) on a float panel and confirm collapse/expand toggles correctly
  • Verify destroyAllTools clears the deferred registry along with all loaded tools
  • Confirm existing non-float panel layouts are unaffected
  • Run npm test and confirm no regressions

Note: The Title Tool's actionButtonLink config is an easy way to test these features. Swapping its event type lets you trigger core events for showing/hiding and loading/unloading plugins

@github-actions

Copy link
Copy Markdown

✅ Version Already Updated

This PR includes a manual version update to 4.2.11-20260611

No automatic version bump needed.

@sandesh-sp sandesh-sp changed the base branch from development to feat/floating-panels June 29, 2026 18:26
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