Skip to content

Block Inspector: Move Classnames, Additional CSS and Apply Globally to Styles 'Additional styles' panel - #83753

Open
talldan wants to merge 6 commits into
trunkfrom
try/split-advanced-panels
Open

talldan wants to merge 6 commits into
trunkfrom
try/split-advanced-panels

Conversation

@talldan

@talldan talldan commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What?

Proposes moving 'Additional CSS Class(es)', 'Additional CSS' and 'Apply Globally' to an Additional styles panel in the Styles tab of the block inspector.

If a block has no settings or styles tabs (for example, paragraph only has style controls) then there are now Additional styles and Advanced panels that group the controls, both appear in the one inspector.

Why?

I've noticed for a while that the block inspector shows 'Additional CSS' and 'Apply Globally' (Push to Global Styles) in the Settings tab, and I this this could be improved. These are more 'Styles' tools than 'Settings'.

'Apply Globally' is one that's problematic to me, as users are likely to use this when having just modified styles. Users have to switch to the settings tab, scroll down, expand the 'Advanced' panel and then click the button, and then probably switch back to the Styles tab. It's a lot of context switching.

How?

Introduces a new 'additional-styles' inspector group specifically for styles controls.

Renames 'Additional CSS Class(es)', 'Additional CSS' to 'CSS Class(es)' and 'CSS'.

Renames the global styles 'Advanced' panel to 'Additional styles'.

Testing Instructions

  1. Add a paragraph block
  2. Open the block inspector
  3. Observe there's an 'Additional styles' panel for style controls and 'Advanced' panel for tools
  4. Add a Media Text block
  5. Open the block inspector
  6. Observe there's one 'Advanced' panel in settings, and an 'Additional styles' panel in Styles

Screenshots or screencast

Block instance with no tabs (e.g. paragraph) Block instance with tabs (e.g. media text) Global styles
Screenshot 2026-10-01 at 4 37 50 pm Screenshot 2026-10-01 at 4 37 34 pm Screenshot 2026-10-05 at 10 41 18 am

Use of AI Tools

OpenCode / Claude, Kimi

@talldan talldan self-assigned this Sep 29, 2026
@talldan talldan added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks labels Sep 29, 2026
@github-actions github-actions Bot added [Package] Editor /packages/editor [Package] Block editor /packages/block-editor labels Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: fcoveram <fcoveram@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +206 B (0%)

Total Size: 8.29 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 517 kB +114 B (+0.02%)
build/scripts/editor/index.min.js 619 kB +15 B (0%)
build/scripts/format-library/index.min.js 41.4 kB -7 B (-0.02%)
build/styles/block-editor/style-rtl.css 20.4 kB +20 B (+0.1%)
build/styles/block-editor/style-rtl.min.css 17.3 kB +22 B (+0.13%)
build/styles/block-editor/style.css 20.5 kB +20 B (+0.1%)
build/styles/block-editor/style.min.css 17.2 kB +22 B (+0.13%)

381435e Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric a190cf5 trunk % Change
timeToFirstByte 57.9 ms +5.53% -2.94% 60.1 ms +7.74% -4.49% -3.66%
largestContentfulPaint 100 ms +2% -4% 96 ms +10.42% -4.17% 4.17%
lcpMinusTtfb 38.4 ms +15.76% -8.46% 35.3 ms +19.55% -1.98% 8.78%
wpBeforeTemplate 28.79 ms +7.71% -2.08% 29.35 ms +7.94% -1.74% -1.91%
wpTemplate 25.06 ms +1.6% -3.75% 25.32 ms +5.69% -3.75% -1.03%
wpTotal 54.1 ms +5.64% -2.5% 55.95 ms +7.36% -3.7% -3.31%
wpMemoryUsage 7.63 MB +0% -0% 7.60 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric a190cf5 trunk % Change
timeToFirstByte 51.1 ms +7.14% -3.72% 44.5 ms +8.54% -2.02% 14.83%
largestContentfulPaint 108 ms +7.41% -3.7% 96 ms +0% -4.17% 12.5%
lcpMinusTtfb 58.15 ms +4.73% -5.25% 50.65 ms +2.27% -5.82% 14.81%
wpBeforeTemplate 28.11 ms +10.6% -3.06% 27.15 ms +6.7% -2.39% 3.54%
wpTemplate 19.08 ms +5.35% -3.14% 14.43 ms +1.18% -2.29% 32.22%
wpTotal 47.64 ms +7.64% -3.34% 41.81 ms +8.04% -2.46% 13.94%
wpMemoryUsage 6.26 MB +0% -0% 6.08 MB +0% -0% 2.91%
wpDbQueries 14 +0% -0% 10 +0% -0% 40%

media-processing

Metric a190cf5 trunk % Change
mediaProcessingJpeg 397.95 ms +0.95% -0.71% 407.2 ms +0.57% -1.84% -2.27%
mediaProcessingAvif 6067.49 ms +0.11% -0.29% 6065.23 ms +0.47% -0.28% 0.04%
mediaProcessingJpegToAvif 4188.08 ms +0.26% -0.23% 4172.79 ms +0.19% -0.29% 0.37%

media-upload

Metric a190cf5 trunk % Change
jpegUploadProcessing 1443.23 ms +34.9% -1.02% 1447.67 ms +0.57% -2.21% -0.31%
pngUploadProcessing 173.79 ms +23.92% -1.03% 178.53 ms +17% -6.68% -2.66%
largeJpegUploadProcessing 1411.29 ms +0.38% -0.54% 1411.34 ms +0.98% -0.24% 0%
multipleImageUploadProcessing 1556.25 ms +10.81% -0.59% 1567.79 ms +0.67% -0.27% -0.74%

post-editor

Metric a190cf5 trunk % Change
serverResponse 307.36 ms +6.09% -7.09% 294.06 ms +10.73% -3.48% 4.52%
firstPaint 170.3 ms +7.72% -14.27% 171.28 ms +23.98% -23.05% -0.57%
domContentLoaded 821.18 ms +2.16% -2.09% 810.82 ms +0.77% -2.57% 1.28%
loaded 822.03 ms +2.19% -2.07% 811.71 ms +0.76% -2.57% 1.27%
firstContentfulPaint 336.87 ms +10.75% -2.14% 338.66 ms +3.08% -2.36% -0.53%
firstBlock 2369.99 ms +1.39% -1.04% 2375.6 ms +1.28% -1.91% -0.24%
type 14.62 ms +2.26% -1.98% 14.37 ms +7.24% -2.51% 1.74%
typeWithoutInspector 14.29 ms +3.64% -3.64% 14.01 ms +5.42% -3.5% 2%
typeWithTopToolbar 17.96 ms +2.28% -4.01% 17.79 ms +4.27% -4.22% 0.96%
typeContainer 6.1 ms +9.51% -2.79% 6.24 ms +6.41% -5.29% -2.24%
focus 53.42 ms +9.62% -3.18% 50.52 ms +9.01% -4.79% 5.74%
firstFocus 148.07 ms +0% -0% 142.05 ms +0% -0% 4.24%
selectAll 384.54 ms +6.82% -2.76% 385.36 ms +1.77% -0.15% -0.21%
listViewOpen 46.89 ms +6.31% -13.48% 43.83 ms +11.86% -12.87% 6.98%
inserterOpen 17.16 ms +18.3% -9.79% 17.39 ms +11.85% -1.55% -1.32%
inserterHover 1.69 ms +7.1% -5.92% 1.78 ms +8.99% -13.48% -5.06%
inserterSearch 6.61 ms +4.39% -6.05% 6.8 ms +4.41% -11.03% -2.79%
loadPatterns 497.98 ms +4.92% -4.9% 492.79 ms +7.26% -7.02% 1.05%
wpTotal 298.75 ms +6.19% -7.27% 285.27 ms +11.15% -3.52% 4.73%
wpMemoryUsage 13.18 MB +0% -0% 13.15 MB +0% -0% 0.28%
wpDbQueries 54 +0% -0% 54 +0% -0% 0%

site-editor

Metric a190cf5 trunk % Change
serverResponse 514.68 ms +4.32% -3.96% 524.1 ms +2.68% -8.11% -1.8%
firstPaint 248.89 ms +14.76% -1% 267.2 ms +4.76% -13.37% -6.85%
domContentLoaded 1196.13 ms +2.03% -2.42% 1194.36 ms +1.95% -1.16% 0.15%
loaded 1197.42 ms +2.03% -2.37% 1195.78 ms +1.97% -1.17% 0.14%
firstContentfulPaint 482.64 ms +0.44% -1.71% 483.12 ms +1.81% -1.56% -0.1%
firstBlock 4381.89 ms +1.01% -0.55% 4358.51 ms +0.37% -0.73% 0.54%
type 20.12 ms +4.82% -8.8% 20.03 ms +2.8% -5.94% 0.45%
navigate 125.4 ms +11.04% -10.15% 109.29 ms +13.29% -3.56% 14.74%
loadPatterns 1406.56 ms +2.84% -3.56% 1425.66 ms +3.47% -5.36% -1.34%
loadPages 1092.18 ms +2.67% -2.26% 1102.58 ms +1.43% -2.35% -0.94%
wpTotal 504.66 ms +4.34% -4.07% 513.91 ms +2.71% -8.28% -1.8%
wpMemoryUsage 12.14 MB +0% -0% 12.13 MB +0% -0% 0.13%
wpDbQueries 43 +2.33% -0% 43.5 +1.15% -1.15% -1.15%

381435e Run

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working as described. I'll lean on design review.

I think splitting advanced tools where there are separate tabs makes for a logical split.

@jasmussen

Copy link
Copy Markdown
Contributor

Generally, I think this is a good instinct. I do think there may be some nuance. I believe the Styles tab has largely been a collection of block supports, and with that as the definition of what counts as "style", I guess adding an "Advanced" panel may be an exception. I think there's also a small risk that since the panel is called the same, and that you now have two identical panels, one in Settings, one in Styles, you might not realise they are different panels with different contents.

This is not a strong opinion, wouldn't want to block the effort, it's mostly some thoughts, and I can defer to others.

One other detail: Francisco (already pinged) has been looking into some block-card dropdowns relating to style inheritance. And that this dropdown could also be where we eventually move at least the "Apply globally" button. That would still leave CSS classes and custom CSS in the grey zone, but nevertheless.

@aaronrobertshaw aaronrobertshaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR makes sense to me.

"Apply globally" sits much better in the same tab as the styles it pushes. @jasmussen makes a good point though that it could also belong in the upcoming popover in the block card that highlights which styles have local overrides. I'm not sure that popover will be the final evolution of that feature though so I'd probably vote to keep it in a somewhat familiar location for users i.e. an Advanced panel in the block inspector.

On Joen's point about two "Advanced" panels, I can see the potential confusion. These are more power user tools though, so I suspect it's smaller in practice than it looks. Someone reaching for Additional CSS, a custom class name, or to apply styles globally, usually knows what they're after.

Would a simple rename for the Advanced panel under the Styles tab be enough to offset some of that confusion?

Keep "Advanced" under the Settings tab, and rename the panel under Styles to something like "Advanced styles" or "Additional styles"? Under the hood, the inspector controls group is already named advanced-styles.

@talldan

talldan commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Would a simple rename for the Advanced panel under the Styles tab be enough to offset some of that confusion?

Keep "Advanced" under the Settings tab, and rename the panel under Styles to something like "Advanced styles" or "Additional styles"? Under the hood, the inspector controls group is already named advanced-styles.

I like the suggestion. I think the decision is what to do when there's one tab - if we stick with a single Advanced panel, it might be confusing that the tools are sometimes in 'Additional styles' and sometimes in 'Advanced'. Or we could keep the split and still have separate 'Additional styles' / 'Advanced' panels when there's one tab.

Maybe I should try out the latter.

@talldan
talldan force-pushed the try/split-advanced-panels branch from f624e31 to 81b5cad Compare October 1, 2026 07:43
@talldan talldan changed the title Block Inspector: Move Classnames, Additional CSS and Apply Globally to Styles 'Advanced' panel Block Inspector: Move Classnames, Additional CSS and Apply Globally to Styles 'Additional styles' panel Oct 1, 2026
@talldan

talldan commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

I've update the PR based on Aaron's suggestion, and I like it! Let me know what you think:

Kapture.2026-10-01.at.16.42.22.mp4

Copy-wise, there might now be too many 'Additional's. Maybe the controls could be simplified to 'CSS Class(es)' and 'CSS'?

Screenshot 2026-10-01 at 4 43 34 pm

@talldan
talldan force-pushed the try/split-advanced-panels branch from 9169a3c to 0ca64d7 Compare October 1, 2026 08:50
@jasmussen

Copy link
Copy Markdown
Contributor

Copy-wise, there might now be too many 'Additional's. Maybe the controls could be simplified to 'CSS Class(es)' and 'CSS'?

Yes!

@talldan

talldan commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

I'll look into that. It'll be next week when I pick it up again. It gets a bit tricky as the same components are used across global styles and block styles.

And that also highlights another thing - I think we should also consider renaming the global styles 'Advanced' panel to 'Additional styles' at the same time:
Screenshot 2026-10-01 at 6 08 38 pm

@tellthemachines

Copy link
Copy Markdown
Contributor

Would it make sense for that additional styles group to be a toolspanel? I'm looking at additional CSS for style states in #83539 and it's looking a bit weird to have that one random control between toolspanels:

Screenshot 2026-10-02 at 1 57 55 pm

@jasmussen

Copy link
Copy Markdown
Contributor

I think @jameskoster had a design for it being a toolspanel.

Importantly though, that would mean we hide everything inside ellipsis items by default, similar to the collapsible being collapsed by default.

I'd also think we'd want to move "Apply globally" out from there and elsewhere if we did this. Also important than to connect a dot from @annezazu whose feedback here suggests that "Advanced" could be where we show style-inheritance information, rather than in a block card. If that is indeed the direction we go, it pairs naturally with "Apply globally" already sitting there, but if it became a toolspanel it would suddenly be two clicks to see style inheritance information, rather than just a single one to expand the panel.

@jasmussen

Copy link
Copy Markdown
Contributor

CC: @fcoveram relating to this comment, on block cards, advanced panels, and the journey it is to surface style inheritance information.

@talldan
talldan force-pushed the try/split-advanced-panels branch from 0ca64d7 to a63060f Compare October 5, 2026 02:08
@github-actions github-actions Bot added the [Package] Format library /packages/format-library label Oct 5, 2026
@talldan talldan added Needs Dev Note Requires a developer note for a major WordPress release cycle Needs User Documentation Needs new user documentation labels Oct 5, 2026
@talldan

talldan commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Would it make sense for that additional styles group to be a toolspanel? I'm looking at additional CSS for style states in #83539 and it's looking a bit weird to have that one random control between toolspanels:

Yep, potentially.

Though worth mentioning your screenshot doesn't show a PanelBody at all, which is why the control is floating in space.

The presence of 'Settings' like that also feels a bit off.

@talldan
talldan requested a review from a team as a code owner October 5, 2026 07:05
@github-actions github-actions Bot added the [Package] Components /packages/components label Oct 5, 2026
@talldan

talldan commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Pushed some changes that switch 'Additional styles' to a tools panel. It's ok I think, though 'Apply globally' might be unusual as a tools panel item. Not sure if there are examples of other controls like this that don't have a value and are a tools panel item.

Kapture.2026-10-05.at.15.06.30.mp4

@jasmussen

Copy link
Copy Markdown
Contributor

Good experiment. I feel like it might be a panel too many. Not strongly felt.

@jameskoster

Copy link
Copy Markdown
Contributor

I don't have a strong feeling about toolspanel vs collapsible panel; both can work. But one thing the toolspanel experiment highlights for me is that Apply globally does not conceptually fit in this panel. I don't think it has anything to do with 'Additional styles'.

At a push I'd be tempted to consider introducing the same ellipsis menu we find in the document inspector header to the block inspector header, and putting this action there. Then you can push styles regardless of the active tab. Other actions like 'Hide', 'Lock', 'Rename' could theoretically live in that menu too.

@jasmussen

Copy link
Copy Markdown
Contributor

At a push I'd be tempted to consider introducing the same ellipsis menu we find in the document inspector header to the block inspector header, and putting this action there. Then you can push styles regardless of the active tab. Other actions like 'Hide', 'Lock', 'Rename' could theoretically live in that menu too.

This is essentially what @fcoveram designed for a block inheritance card.

Comment thread packages/components/src/tools-panel/tools-panel-item/hook.ts Outdated
@tellthemachines

Copy link
Copy Markdown
Contributor

The presence of 'Settings' like that also feels a bit off.

That part is already in trunk, in the Gallery block responsive controls, which is using the state-specific inspector slot. We could rename it but not sure what to 😅

panelId={ clientId }
hasValue={ () => !! className }
onDeselect={ () => setAttributes( { className: undefined } ) }
resetAllFilter={ () => ( { className: undefined } ) }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, this resets the current style variation too.

In trunk, the only way to remove the style is to delete it by hand.

I think it's okay, since it is an "advanced" panel after all, just flagging

@talldan

talldan commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

At a push I'd be tempted to consider introducing the same ellipsis menu we find in the document inspector header to the block inspector header, and putting this action there. Then you can push styles regardless of the active tab. Other actions like 'Hide', 'Lock', 'Rename' could theoretically live in that menu too.

That does already exist, but it's used for block states:
Screenshot 2026-10-06 at 8 20 32 am

@talldan

talldan commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Given the issues, I think perhaps it's better to use a regular PanelBody instead of a tools panel.

It also gives third party extenders a place to add style tools that don't neatly fit into a tools panel.

Any strong feelings against that?

@tellthemachines

Copy link
Copy Markdown
Contributor

Any strong feelings against that?

No, sounds good!

…panels

The Advanced panel has always lived in the Settings tab, so styling tools
such as Additional CSS end up under Settings even when a Styles tab is
present.

Introduce an 'advanced-styles' inspector controls group alongside
'advanced', and teach the Advanced panel to render either group. The
Styles tab now renders its own Advanced panel for the new group, while
the Settings tab keeps the existing one. When the inspector has no Styles
tab, or renders no tabs at all, a single panel holds both groups so that
no control is dropped.

No controls are moved to the new group yet.

Block Editor: Move Additional CSS and CSS classes to the styles Advanced panel

Additional CSS and Additional CSS class(es) are styling tools, but the
Advanced panel that held them lives in the Settings tab. Fill the
'advanced-styles' group instead so that they appear under Styles when a
Styles tab is present, and fall back to the combined Advanced panel in
Settings when it is not.

Editor: Move Apply globally to the styles Advanced panel

Pushing a block's typography, spacing, dimensions, and color to global
styles is a styling action, so fill the 'advanced-styles' group rather
than the settings Advanced panel. Also replaces the deprecated
InspectorAdvancedControls wrapper with InspectorControls.

Block Inspector: Restore the gap between the two Advanced groups

Controls in the inspector take a bottom margin unless they are the last
child of their container. Each inspector controls slot renders its own
container, so when the Advanced panel holds both the settings and the
styling group, the last control of the first group sits flush against
the first control of the second. Space the two containers apart.

Block Inspector: Cover the split Advanced panel with tests

Adds unit coverage for the settings-only, styles-only, and combined
renderings of the Advanced panel, and records the change in the
block-editor and editor changelogs.

The test imports a component whose relative imports reach 484 of the
package's 566 source files, none of which the build allowlist types
yet. A composite project has to resolve every relative import within
its own program, so the test joins the two stories already excluded
from the dev project rather than being written as JavaScript with an
ESLint suppression.

Block Inspector: Fold the changelog into a single entry per package

Drops the separate New Features entry for the `advanced-styles` group,
which the Enhancements entry now covers, and adds the pull request
links.

Block Inspector: Mark the Advanced panel's props as optional

Every prop has a default, but the JSDoc declared each one required, so
TypeScript inferred a props type that demanded all three. The routed
TypeScript test graph checks test files against that inferred type and
rejected the test for omitting props it does not need.

Block Inspector: Split Advanced into Advanced and Additional styles panels

Rename the advanced-styles group to additional-styles and give it a
dedicated Additional styles panel that mirrors Advanced, rather than
merging both groups into a single Advanced panel.

- Advanced keeps its settings tools (HTML anchor, allowed blocks) and is
  unchanged apart from the style fills leaving it.
- Additional styles holds the styling tools (Additional CSS, Additional
  CSS class(es), Apply globally) in its own panel.
- When the inspector has no Styles tab, or renders a single tab, the two
  panels appear side by side instead of merging.
- Count the private allowed-blocks fills when deciding whether to show a
  Settings tab, so a block whose only advanced tool is Allowed blocks
  keeps that tab.

Block Inspector: Stop counting allowed-blocks fills toward the Settings tab

The allowed-blocks control renders in the Advanced panel via a private
slot that the tab-counting logic never accounted for. Counting it was
added as a fix for blocks whose only advanced tool is Allowed blocks,
but it over-fires for section blocks (unsynced patterns): they always
have a Content tab and run in the default editing mode, so the fill
registers and forces a Settings tab that only shows Manage allowed
blocks.

That underlying gap is a pre-existing trunk issue, so revert the count
here and address it in a separate PR. The additional-styles split is
unaffected.

E2E: Update Push to Global Styles for the Additional styles panel

The Apply globally control now lives in the Additional styles panel
rather than the Advanced panel, so open that panel in the shared setup
helper.

Rename global styles Advanced panel to Additional styles

Remove the word 'additional' from CSS and CSS Class(es) control labels.

Now that the containing panel is labelled 'Additional styles', also using
'additional' in the control labels is duplicative.

fix command center test
Hide Apply globally by default

Ensure correct a11y text for a non-resettable hideable tools panel item
…panel item"

This reverts commit cf91030.

Revert "Hide Apply globally by default"

This reverts commit f345c50.

Revert "try switching to a ToolsPanel for additional styles"

This reverts commit 45b4781.
@talldan
talldan force-pushed the try/split-advanced-panels branch from cf91030 to f129e89 Compare October 6, 2026 04:28
@github-actions github-actions Bot removed the [Package] Components /packages/components label Oct 6, 2026
@talldan

talldan commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Ok, I switched back to using the PanelBody.

The one thing on my mind is whether this change is going to mesh well with the upcoming style inheritance changes. Let me know if this is likely to cause any issues.

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing that ToolsPanel changes have been undone, I'll let the rest of the folks involved carry on the conversation / review.

const groups = {
default: InspectorControlsDefault,
advanced: InspectorControlsAdvanced,
'additional-styles': InspectorControlsAdditionalStyles,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we document group="additional-styles" and update the inspector tab mapping?

Looks like the current docs still place custom CSS classes under Advanced and don't mention the new group.

@jameskoster

Copy link
Copy Markdown
Contributor

That does already exist, but it's used for block states:

Oh dear 😅

Using PanelBody is fine, but we should find another home for the Apply Globally action, or find another name for the panel that better encapsulates all the features it contains.

@fcoveram

fcoveram commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

I like the idea of having an “Additional styles” section. It’s better located and more explicit about what you can find there. But I’m not sure about locating the “Apply globally” action there. I agree with @jameskoster approach. The area should gather all actions belonging to the same category and this one falls short there.

Regarding the other fields, “CSS Class(es)” is more clear on what users can type there compared to “CSS”, perhaps “CSS properties” is a better label.

From the inherited styles conversation (#82546), I’d say that “Styles” toolsPanel is a good place for the global action, but it seems better to do it when the action to push local changes (i.e., change the text color and add it as a custom option from the popover) is close to the control that modifies it. That consistency would make the style-related actions clearer.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Blocks Overall functionality of blocks Needs Dev Note Requires a developer note for a major WordPress release cycle Needs User Documentation Needs new user documentation [Package] Block editor /packages/block-editor [Package] Editor /packages/editor [Package] Format library /packages/format-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants