Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
Is your feature request related to a problem? Please describe.
Jetpack has its sidebar for block editor extensions. We use Slot/Fill mechanism to fill it with content but we have no way to sort them, eg: put new/important feature at the very top.
Describe the solution you'd like
Some way to give each item a priority.
Describe alternatives you've considered
Introduce some sort of prioritization for the entire registerJetpackPlugin, not just the sidebar panel. The order of things in the sidebar is equal to the order in which plugins get registered, which I believe will rely solely on the position of the code in the built source code.
There is a theoretical capability to sort the fills array before rendering it in jetpack-plugin-sidebar.js but there seems to be no API to tell which fill is which and what their priority is. The array has react elements directly in it and if we read from those, I wonder if that would be too brittle.
Is your feature request related to a problem? Please describe.
Jetpack has its sidebar for block editor extensions. We use Slot/Fill mechanism to fill it with content but we have no way to sort them, eg: put new/important feature at the very top.
Describe the solution you'd like
Some way to give each item a priority.
Describe alternatives you've considered
Introduce some sort of prioritization for the entire
registerJetpackPlugin
, not just the sidebar panel. The order of things in the sidebar is equal to the order in which plugins get registered, which I believe will rely solely on the position of the code in the built source code.Additional context
It's using: https://developer.wordpress.org/block-editor/components/slot-fill/
Source for the sidebar: https://github.com/Automattic/jetpack/blob/master/extensions/shared/jetpack-plugin-sidebar.js
There is a theoretical capability to sort the
fills
array before rendering it injetpack-plugin-sidebar.js
but there seems to be no API to tell which fill is which and what their priority is. The array has react elements directly in it and if we read from those, I wonder if that would be too brittle.