You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It is less than ideal that the only way to add a custom panel to the sidebar is by registering a meta box. This removes any control developers have over placement in any way with all of the meta boxes appearing at the bottom in the order they are registered.
Describe the solution you'd like
My proposal is to add more slotFills to the panel. Ideally ones between each of the existing panels but at the minimum, one that sits below the Status & Availability panel. This will not allow complete control over placement, but solves the issues of all items going to the bottom of the list.
Describe alternatives you've considered
As mentioned, the only other approach ( to my knowledge ) is by registering a meta box.
Reacted by Jodi Warren, Björn Holine, Udit Desai and Julian Weiland
I love this idea, and your PR solution seems elegant @ryanwelcher - thanks!
I'm curious to hear design feedback on this proposal, I know when we worked on extensibility of the sidebar in the past it was important to consider overall user experience.
Can you describe the use case that led you to this Issue/PR? Better understand use cases for this new slot will help support its adoption.
Thanks for the feedback @adamsilverstein. The use-case was for a client site where we wanted to add a panel that was rather important to the post being edited. There are a large number of taxonomies associated with the post type and so any custom meta boxes would appear very far down the interface. Overall, this is a question that comes up a lot across the 10up engineering team.
I have updated the PR to ensure that the items being added are placed in a <PanelBody> component instead of relying on the item in the slot to be built that way. The inner content is still up to to the user however.
So, what I'm proposing is that we add a slot or something similar only for custom post types, as we should make no assumptions on what that post type may need.
Activity
adamsilverstein commentedon Jan 17, 2019
I love this idea, and your PR solution seems elegant @ryanwelcher - thanks!
I'm curious to hear design feedback on this proposal, I know when we worked on extensibility of the sidebar in the past it was important to consider overall user experience.
Can you describe the use case that led you to this Issue/PR? Better understand use cases for this new slot will help support its adoption.
ryanwelcher commentedon Jan 17, 2019
Thanks for the feedback @adamsilverstein. The use-case was for a client site where we wanted to add a panel that was rather important to the post being edited. There are a large number of taxonomies associated with the post type and so any custom meta boxes would appear very far down the interface. Overall, this is a question that comes up a lot across the 10up engineering team.
ryanwelcher commentedon Jan 17, 2019
I have updated the PR to ensure that the items being added are placed in a
<PanelBody>component instead of relying on the item in the slot to be built that way. The inner content is still up to to the user however.gziolo commentedon Jan 21, 2019
Copying comment from @youknowriad left on the related PR (#13361 (review)):
I alos commented on the same PR (#13361 (comment)):
swissspidy commentedon May 17, 2019
Suggestion from @ellatrix in #15695: