Term Template Block: Move the Styles control to the very top of inspector controls#71479
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Disclaimer: This is not a full review. I was just looking at recent PRs. Using the |
mikachan
left a comment
There was a problem hiding this comment.
I didn't realise you could use BlockEdit for this. Ace, LGTM!
|
@Mamaduka , thanks for the tip with
Valid concern, but is there any other way to achieve it? In this case there's strong UX justification to push a setting above the "native" Layout section. |
|
When it comes to specific block UX justifications vs consistency across the blocks, I lean towards the latter. Having a more declarative way for blocks to render their custom "Block Styles" controls could be a nice approach, which, if understood correctly, is what we're trying to do. Using a filter also doesn't guarantee the positioning of a control. The core controls can change and give us a different order. |
|
Actually @mikachan , in ideal world we should probably use Screen.Capture.on.2025-09-03.at.11-43-45.mp4 |
Nice! I've tried this out in #71488. It's working OK, but there doesn't seem to be much control over the layout options via the block. How important do we think it is that the grid option is still available when "Show hierarchy" is true? At the moment, "grid" is disabled if "Show hierarchy" is true.
I guess it's unlikely that folks would choose a layout option that doesn't work well with the terms query they've selected, so maybe giving the users complete control over the layout options is fine. |
Ah, I see. Always a tradeoff 😅 I think it's alright to keep it enabled and give control and leave the responsibility to users in this case.
Yeah! This! |
|
Given we'll most likely go with the native option I'm closing this PR. 🙌 |

Part of #49094.
What?
Closes
Move the "Styles" section to the very top of Inspector Controls above "Layout" section.
Why?
This is because the Layout settings follow from the style ones. Raised in the comment here.
How?
Use
editor.BlockEditfilter that allows to push content relative to existing/native inspector controls.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast