-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Detailed Description
This request is to add a host-managed, type-safe, extensible top menu control and supporting infrastructure in PlugHub, so that plugins (and host pages) can safely inject menu items into a global menu if needed. Currently, there is no main menu control in the application, and there is no standard or supported way for plugins or pages to add or manage one. As a result, any plugin or page that wants to provide a menu would have to reach across into unrelated view controls, breaking isolation and risking instability.
Context
The absence of any shared menu control prevents plugins or even host page developers from offering proper menu-driven experiences. It’s not just that plugins can’t contribute to an existing menu; there literally isn’t a menu container or a mechanism to add one, so no safe or coordinated approach exists for a plugin to offer File/Edit/View menus or similar. Without this, developers are blocked from certain UI patterns, or forced to hack around the view structure—clearly not sustainable or safe for a plugin platform.
A standardized menu interface and host-level menu container would let plugin pages safely and predictably contribute menu items only when needed. This improves both host and plugin flexibility, stability, and maintainability.
Possible Implementation
- Add an optional menu control at the top shell level of the main host view (not inside any particular plugin page).
- In PlugHub.Shared, define a type-safe service/interface for menu registration (e.g.,
IMenuService), exposing methods for plugins/pages to add/remove/modify menu items. - Let the host provide or omit the global menu based on need, but always own the registration mechanic.
- Bind the menu UI's ItemsSource to this service’s collection, so injected items appear anywhere the menu is rendered.
- Allow plugin lifecycle to dictate menu lifetimes (menus are removed when plugins unload).
Target Platform(s)
All platforms
Metadata
Metadata
Assignees
Labels
Type
Projects
Status