feat(ui): global plugin overlay slot via Teleport (companion to OIA PR #181) - #8602
Closed
joseanesONMS wants to merge 1 commit into
Closed
feat(ui): global plugin overlay slot via Teleport (companion to OIA PR #181)#8602joseanesONMS wants to merge 1 commit into
joseanesONMS wants to merge 1 commit into
Conversation
…gets Plugins that declare UIExtension.getGlobalModuleFileName() (new OIA default method) now get their module loaded and rendered in a <Teleport to="body"> at the root App level, so the component is visible on every page — not just under the Plugins > menu route. Changes: - App.vue: import GlobalPlugin; compute globalPlugins (plugins with a non-null globalModuleFileName); render them inside <Teleport to="body"> - GlobalPlugin.vue: new component that loads the global module via the existing Container + externalComponent machinery (same URL pattern as Plugin.vue) - types/index.ts: add optional globalModuleFileName field to the Plugin type Backward compatibility: - Plugins that do not override getGlobalModuleFileName() return null; the REST layer omits or nulls the field; the v-for filter skips them — zero behaviour change for all existing plugins. - Old OpenNMS that does not serve this field: globalPlugins is always empty, Teleport renders nothing — no visual or functional regression. Relates-To: ALEC-302
Contributor
Author
|
@marshallmassengill @cgorantla — updated the PR description. Please take a look when you get a chance. |
Contributor
|
This seems reasonable for a single use case, but we may need to think more about it. For example, if there are multiple global plugins, this could get messy very quickly. If the purpose is to have a chat window, it may make sense to build that into the product (with placement, styling and chat functionality, but not connected to any other functionality in particular), then have a way to connect it with plugins that actually provide the feature / data / etc. |
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.
ALEC-302
Summary
Plugins that declare
UIExtension.getGlobalModuleFileName()(new OIA default method, OIA PR #181) now get their module loaded and rendered in a<Teleport to="body">at the root App level — visible on every page, not just under Plugins > menu.Changes
ui/src/main/App.vueGlobalPlugin; computeglobalPlugins; add<Teleport to="body">ui/src/components/Plugin/GlobalPlugin.vueContainercomponentui/src/types/index.tsglobalModuleFileName?: stringto thePlugintypeBackward compatibility
getGlobalModuleFileName()(all existing plugins) returnnull; the REST layer omits or nulls the field; thev-forfilter skips them — zero behaviour change.globalPluginsis always empty,<Teleport>renders nothing — no visual or functional regression.Dependencies
Requires OIA PR #181 to be merged and a new OIA snapshot published before
globalModuleFileNameappears in/rest/pluginsresponses for plugins that implement the method.First consumer
ALEC-302 — ALEC context-aware chatbot overlay.