Skip to content
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

Provide way to control render order of plugins registered via registerPlugin #18064

Open
ryanwelcher opened this issue Oct 22, 2019 · 1 comment · May be fixed by #16384
Open

Provide way to control render order of plugins registered via registerPlugin #18064

ryanwelcher opened this issue Oct 22, 2019 · 1 comment · May be fixed by #16384
Assignees
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.

Comments

@ryanwelcher
Copy link
Contributor

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 like PluginDocumentSettingPanel are going to highlight this need once 5.3 is released.

My proposal is to add a priority property to the settings object passed to registerPlugin that will have a default value of 10. We can then sort the array of registered plugins based on that priority. 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.

@ryanwelcher ryanwelcher self-assigned this Oct 22, 2019
@ryanwelcher ryanwelcher added the [Feature] Extensibility The ability to extend blocks or the editing experience label Oct 22, 2019
@ryanwelcher
Copy link
Contributor Author

#16384 is a first attempt to implement this.

@ryanwelcher ryanwelcher linked a pull request Oct 22, 2019 that will close this issue
5 tasks
@gziolo gziolo added [Feature] Plugins API Extending the Gutenberg project with plugins via the Plugins API [Status] In Progress Tracking issues with work in progress labels Oct 23, 2019
@jeffpaul jeffpaul linked a pull request Feb 2, 2022 that will close this issue
5 tasks
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants