Skip to content

Global Styles: Fix Navigator warning - #73738

Closed
Mamaduka wants to merge 2 commits into
trunkfrom
fix/global-styles-navigator-warning
Closed

Mamaduka wants to merge 2 commits into
trunkfrom
fix/global-styles-navigator-warning

Conversation

@Mamaduka

@Mamaduka Mamaduka commented Dec 4, 2025 •

Copy link
Copy Markdown
Member

What?

This is a follow-up to #72599.

PR removes duplicate rendering of the general colors palette screen, which fixes the Navigator component warning. The screen is already rendered above.

<GlobalStylesNavigationScreen path="/colors/palette">
<ScreenColorPalette />
</GlobalStylesNavigationScreen>

Testing Instructions

  1. Open the Site Editor.
  2. Confirm you can navigate to Styles > Colors > Edit Palette.

Testing Instructions for Keyboard

Same.

Screenshots or screencast

Screen Warning
CleanShot 2025-12-04 at 07 39 59 CleanShot 2025-12-03 at 21 07 58

@Mamaduka Mamaduka self-assigned this Dec 4, 2025
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Dec 4, 2025
@github-actions

github-actions Bot commented Dec 4, 2025 •

Copy link
Copy Markdown

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 props-bot label.

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: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

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

</GlobalStylesNavigationScreen>
) ) }

<ContextScreens />

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removing this component is the actual fix.

Comment on lines +238 to +254
<Fragment key={ block.name }>
<GlobalStylesNavigationScreen
path={
'/blocks/' +
encodeURIComponent( block.name )
}
>
<ScreenBlock name={ block.name } />
</GlobalStylesNavigationScreen>
<ContextScreens
name={ block.name }
parentMenu={
'/blocks/' +
encodeURIComponent( block.name )
}
/>
</Fragment>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

A slight code quality improvement.

@Mamaduka

Mamaduka commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

How does one access these screens from UI? I get it working via URL, but can find navigation button in UI 😅

Example URL: wp-admin/site-editor.php?p=%2Fstyles&section=%2Fblocks%2Fcore%252Fheading%2Fcolors%2Fpalette

<GlobalStylesNavigationScreen
path={ parentMenu + '/colors/palette' }
>
<ScreenColorPalette name={ name } />
</GlobalStylesNavigationScreen>

@t-hamano t-hamano 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.

Thanks for the PR! Actually, I was also trying to fix it in #73279 😄

How does one access these screens from UI? I get it working via URL, but can find navigation button in UI 😅

Example URL: wp-admin/site-editor.php?p=%2Fstyles&section=%2Fblocks%2Fcore%252Fheading%2Fcolors%2Fpalette

I think Block-level color palettes aren't supported yet, but they may have been unintentionally exposed here. I think it would be better to remove this navigation screen altogether.

@Mamaduka

Mamaduka commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

Sorry, I missed that PR. Let's continue working on the fix there. I'm going to close this.

@Mamaduka Mamaduka closed this Dec 4, 2025
@Mamaduka
Mamaduka deleted the fix/global-styles-navigator-warning branch December 4, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants