Provide way to control render order of plugins registered via registerPlugin #18064
Labels
[Feature] Extensibility
The ability to extend blocks or the editing experience
[Feature] Plugins API
Extending the Gutenberg project with plugins via the Plugins API
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
Currently, the order in which plugins are rendered inside of the
PluginArea
component is based on the order in which they are registered. As more SlotFills are created and exposed, the ability to set a priority for render order will become more important. SlotFills likePluginDocumentSettingPanel
are going to highlight this need once 5.3 is released.My proposal is to add a
priority
property to the settings object passed toregisterPlugin
that will have a default value of 10. We can then sort the array of registered plugins based on thatpriority
. This is a paradigm that will be familiar to most WordPress developers.It should be noted that this will not affect any of the SlotFills directly.
The text was updated successfully, but these errors were encountered: