feat: Floating panels and dynamic plugin lifecycle API#166
Open
sandesh-sp wants to merge 2 commits into
Open
Conversation
✅ Version Already UpdatedThis PR includes a manual version update to No automatic version bump needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on the floating-panels foundation to add a full dynamic plugin lifecycle API.
ToolControllerModern_with deferred loading (startUnloadedconfig), a reversetoolId → targetIdlookup map, hidden-state tracking, and explicitloadPlugin/unloadPluginmethods so plugins can be mounted and dismounted at runtime without a full page reloadshowPlugin,hidePlugin,loadPlugin,unloadPlugin,isPluginLoaded,isPluginHidden,showPanel, andhidePanelonmmgisAPIso external callers and other plugins can control visibility and lifecycle programmaticallyTest plan
startUnloaded: trueon a plugin; confirm it is registered as deferred andisPluginLoadedreturnsfalsemmgisAPI.loadPlugin(id)and confirm the plugin mounts andisPluginLoadedreturnstruemmgisAPI.unloadPlugin(id)and confirmdestroy()is called andisPluginLoadedreturnsfalsemmgisAPI.hidePlugin(id)/showPlugin(id)and confirm the DOM element gains/loses theplugin-hiddenclass andisPluginHiddenreflects the statemmgisAPI.hidePanel(id)/showPanel(id)on a float panel and confirm collapse/expand toggles correctlydestroyAllToolsclears the deferred registry along with all loaded toolsnpm testand confirm no regressionsNote: 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