Skip to content

Commit

Permalink
Start of the UI plugin guide
Browse files Browse the repository at this point in the history
  • Loading branch information
himdel committed Jun 7, 2018
1 parent 67ee3d2 commit da876e5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* [Developer Copr setup for CentOS6](developer_copr_setup_centos6.md)
* [Internationalization Guidelines](i18n.md)
* [UI Patterns](ui/patterns.md)
* [UI Plugins](ui/plugins.md)
* [Report data API](ui/report_data_api.md)
* [Shared react component API](ui/register_react_component.md)
* [Service UI Skinning](/service_ui/skinning.md)
Expand Down
30 changes: 30 additions & 0 deletions ui/plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### UI Plugins

The UI now supports plugins - rails engines that can be added to the Gemfile, and provide additional menu items and screens for the Classic UI.

For info on how to use a plugin, please see [Plugin development](../developer_setup/plugins.md).

(This section is a stub and will be expanded later. For now, please see (the v2v plugin)[https://github.com/ManageIQ/miq_v2v_ui_plugin] for a working example.)

This is *not* the same as [Simple plugins](simple_plugins.md), which is an older feature using an iframe to point to a specific URL.

---

#### Shared libraries:

Since the plugins' javascript is built together with the rest of ui-classic, it needs to share certain common libraries - this is the list of shared libraries, guaranteed to be available to plugins now (but not in gaprindashvili):

* jquery
* lodash
* patternfly-sass (and window-shared dependencies, such as bootstrap-switch, bootstrap-select, etc.)
* patternfly-react

(For the actual versions, please see our [package.json](https://github.com/ManageIQ/manageiq-ui-classic/blob/master/package.json).)

A plugin is free to add any additional dependencies of course.


If a plugin happens to depend on the same library in a different version:

* right now, you can't - either of the 2 versions will get picked, randomly
* after we update to webpack 5, you shouldn't - this would still mean downloading 2 copies of the library on every page load

0 comments on commit da876e5

Please sign in to comment.