generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 58
RHDHBUGS-2300: Improve Documentation on When and Why Frontend Plugin Wiring Is Required #1622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
themr0c
merged 11 commits into
redhat-developer:main
from
jmagak:RHDHBUGS-2300-Improve-Documentation-on-When-and-Why-Frontend-Plugin-Wiring-Is-Required
Dec 8, 2025
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ad4045c
Update documentation with why frontend wiring is necessary
invalid-email-address 5c1ea1f
Update documentation with why frontend wiring is necessary
invalid-email-address 2c69a4f
Update documentation with why frontend wiring is necessary
invalid-email-address 2fecab1
Apply new suggestions
invalid-email-address 631a9bd
Apply new suggestions
invalid-email-address 52712a0
Apply new suggestions
invalid-email-address 640a0a7
Apply new suggestions
invalid-email-address 3912c35
Incorporate new suggestions
invalid-email-address 49e6751
Incorporate new suggestions
invalid-email-address acc1661
Incorporate new suggestions
invalid-email-address bb016c0
Incorporate new suggestions
invalid-email-address File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
18 changes: 18 additions & 0 deletions
18
modules/dynamic-plugins/con-consequences-of-skipping-front-end-wiring.adoc
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
| [id="con-consequences-of-skipping-front-end-wiring_{context}"] | ||
|
|
||
| = Consequences of skipping front-end wiring | ||
|
|
||
| If you skip front-end wiring, the plugin is discovered but not loaded into the application front-end. As a result, the plugin features do not appear or function. This behavior is expected because while back-end plugins are discovered and loaded automatically, the core application loads front-end plugins only based on the list defined in the `dynamicPlugins.frontend` configuration. | ||
|
|
||
| You can expect the following behavior when you skip front-end wiring: | ||
|
|
||
| Disabled functionality:: The {product-custom-resource-type} application cannot integrate or use the plugin exports. | ||
| Invisible components:: New pages, sidebar links, or custom cards do not render in the application UI. | ||
| Unregistered APIs:: Custom utility APIs or API overrides provided by the plugin are not registered in the application API system, which can cause plugins or components to fail. | ||
| Unused assets:: Icons, translations, and themes are not registered or available for use. | ||
|
|
||
| [TIP] | ||
| ==== | ||
| If a plugin is not visible even with front-end wiring, the plugin is likely misconfigured. Troubleshoot the issue by checking the *Console* tab in the _Developer Tools_ of your browser for specific error messages or warnings. | ||
| ==== |
85 changes: 85 additions & 0 deletions
85
modules/dynamic-plugins/con-dynamic-front-end-plugins-for-application-use.adoc
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
| [id="con-dynamic-front-end-plugins-for-application-use_{context}"] | ||
|
|
||
| = Dynamic front-end plugins for application use | ||
|
|
||
| A dynamic front-end plugin requires front-end wiring when it exports a feature for integration into the main {product-custom-resource-type} application UI. Wiring is required for the following scenarios: | ||
|
|
||
| [cols="1,1,2"] | ||
| |=== | ||
| |Scenario|Wiring configuration|Description | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-customizing-and-extending-entity-tabs.adoc_assembly-front-end-plugin-wiring[Extending entity tabs] | ||
| |`entityTabs` | ||
| |Add or customize a tab on the *Catalog entity* view. | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-binding-to-existing-plugins.adoc_assembly-front-end-plugin-wiring[Binding routes] | ||
| |`routeBindings` | ||
| |Link a route in one plugin to an external route defined by another plugin. | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-provide-additional-utility-apis.adoc_assembly-front-end-plugin-wiring[Integrating custom APIs] | ||
| |`apiFactories` | ||
| |Provide a custom utility API implementation or override an existing one. | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-defining-dynamic-routes-for-new-plugin-pages.adoc_assembly-front-end-plugin-wiring[Enabling new pages/Routes] | ||
| |`dynamicRoutes` | ||
| |Add a new page and route to the application (for example, `/my-plugin`). | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-using-mount-points.adoc_assembly-front-end-plugin-wiring[Extending existing pages/UI] | ||
| |`mountPoints` | ||
| |Inject custom widgets, cards, listeners, or providers into existing pages (for example, the *Catalog entity* page). | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-defining-dynamic-routes-for-new-plugin-pages.adoc_assembly-front-end-plugin-wiring[Customizing sidebar navigation] | ||
| |`dynamicRoutes.menuItem`, `menuItems` | ||
| |Add a new entry to the main sidebar or customize its order and nesting. | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-extending-internal-icon-catalog.adoc_assembly-front-end-plugin-wiring[Adding icons/Theming] | ||
| |`appIcons`, `themes` | ||
| |Add custom icons to the application catalog or define a new {product-custom-resource-type} theme. | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#con-providing-custom-scaffolder-field-extensions.adoc_assembly-front-end-plugin-wiring[Scaffolder/TechDocs extensions] | ||
| |`scaffolderFieldExtensions`, `techdocsAddons` | ||
| |Expose custom field extensions for the Scaffolder or new Addons for TechDocs. | ||
|
|
||
| |{installing-and-viewing-plugins-book-link}#proc-extensions-enabling-plugins-installation_rhdh-extensions-plugins[Translation resources] | ||
| |`translationResources` | ||
| |Provide new translation files or override default plugin translations. | ||
| |=== | ||
|
|
||
| .Example of Front-end wiring workflow | ||
|
|
||
| Front-end wiring is configured in the `{my-app-config-file}` or a dedicated `dynamic-plugins-config.yaml` file. The dynamic plugin exposes components, routes, or APIs. For example, a plugin component (`FooPluginPage`) is exported from a module (for example, `PluginRoot`). | ||
|
|
||
| The application administrator defines the wiring in the configuration file, using the plugin package name to register the exports, such as adding a new page with a sidebar link. | ||
|
|
||
| [source,yaml] | ||
| ---- | ||
| # dynamic-plugins-config.yaml | ||
jmagak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| plugins: | ||
| - plugin: <plugin_path_or_url> | ||
| disabled: false | ||
| pluginConfig: | ||
| dynamicPlugins: | ||
| frontend: | ||
| my-plugin-package-name: # The plugin's unique package name | ||
| dynamicRoutes: # Wiring for a new page/route | ||
| - path: /my-new-page # The desired URL path | ||
| importName: FooPluginPage # The exported component name | ||
| menuItem: # Wiring for the sidebar entry | ||
| icon: favorite # A registered icon name | ||
| text: My Custom Page | ||
| ---- | ||
|
|
||
| When the application loads, it performs the following steps: | ||
|
|
||
| . It parses the `dynamic-plugins-config.yaml`. | ||
| . It uses the `<plugin_path_or_url>` to download the plugin bundle using the dynamic loading mechanism. | ||
| . If the package exports the plugin object, the application adds it to the list provided to the {product-custom-resource-type} `createApp` API, registering the plugin properly with the front-end application. | ||
| . It uses the configuration block (`dynamicRoutes`, `menuItem`) to: | ||
| * Add an entry to the internal router mapping `/my-new-page` to the `FooPluginPage` component. | ||
| * Construct and render a new sidebar item labeled _My Custom Page_, pointing to the `/my-new-page` route. | ||
|
|
||
| [NOTE] | ||
| ==== | ||
| If the configuration is missing, steps 1 and 2 might still occur, but the final registration in step 3 and the wiring/rendering in step 4 are skipped, and no UI changes occur. | ||
| ==== | ||
7 changes: 7 additions & 0 deletions
7
modules/dynamic-plugins/con-frontend-dynamic-plugin-wiring.adoc
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
| [id="con-frontend-dynamic-plugin-wiring_{context}"] | ||
| = Front-end plugin wiring | ||
|
|
||
| Front-end plugin wiring integrates dynamic front-end plugin components, such as new pages, UI extensions, icons, and APIs, into {product}. | ||
|
|
||
| Because the dynamic plugins load at runtime, the core application must discover and connect the exported assets of the plugin to the appropriate user interface systems and locations. |
16 changes: 16 additions & 0 deletions
16
modules/dynamic-plugins/con-understand-why-front-end-wiring-is-required.adoc
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
| [id="con-understand-why-front-end-wiring-is-required_{context}"] | ||
|
|
||
| = Understand why front-end wiring is required | ||
|
|
||
| Because dynamic front-end plugins load their code at runtime, the {product-short} application requires explicit instructions to integrate the plugin components in the user interface (UI). | ||
|
|
||
| Front-end wiring provides the metadata and instructions necessary to bridge this gap, informing the applications on how to: | ||
|
|
||
| * {installing-and-viewing-plugins-book-link}#proc-defining-dynamic-routes-for-new-plugin-pages.adoc_assembly-front-end-plugin-wiring[Add new pages and routes to the main application]. (using `dynamicRoutes`) | ||
| * {installing-and-viewing-plugins-book-link}#proc-using-mount-points.adoc_assembly-front-end-plugin-wiring[Inject custom components into existing UI pages]. (using `mountPoints`) | ||
| * {installing-and-viewing-plugins-book-link}#proc-extending-internal-icon-catalog.adoc_assembly-front-end-plugin-wiring[Configure application-wide customizations, such as new icons or themes]. (using `appIcons`) | ||
| * {installing-and-viewing-plugins-book-link}#proc-customizing-sidebar-menu-items.adoc_assembly-front-end-plugin-wiring[Add new menu items]. (using `menuItems`) | ||
| * {installing-and-viewing-plugins-book-link}#proc-binding-to-existing-plugins.adoc_assembly-front-end-plugin-wiring[Bind to existing plugins]. (using `routeBindings`) | ||
|
|
||
| The wiring configuration, typically located in `{my-app-config-file}` or `dynamic-plugins-config.yaml`, gives the application the necessary metadata (including the component names, paths, and integration points) to render and use the plugin features. |
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.
Uh oh!
There was an error while loading. Please reload this page.