Skip to content

Conversation

@Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Dec 3, 2025

What?

This is a follow-up to #72599.

PR fixes the useSelect warning in useGlobalStylesRevisions hook.

Testing Instructions

  1. Navigate to Site Editor > Styles
  2. Confirm that the mentioned warning is no longer displayed.

Testing Instructions for Keyboard

Same.

Screenshots or screencast

CleanShot 2025-12-03 at 20 57 01

@Mamaduka Mamaduka self-assigned this Dec 3, 2025
@Mamaduka Mamaduka added [Type] Code Quality Issues or PRs that relate to code quality Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Dec 3, 2025
};
const DEFAULT_QUERY = { per_page: 100, page: 1 };
const EMPTY_ARRAY: RawRevision[] = [];
const EMPTY_ARRAY: [] = [];
Copy link
Member Author

Choose a reason for hiding this comment

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

Probably not the best type, but it works and compiles :)

Copy link
Member

Choose a reason for hiding this comment

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

That's OK, unless we want to have multiple EMPTY_ARRAYs 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, we only want a single stable fallback.

@Mamaduka Mamaduka requested a review from youknowriad December 3, 2025 17:10
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

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 <[email protected]>
Co-authored-by: tyxla <[email protected]>

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

@Mamaduka Mamaduka requested a review from tyxla December 3, 2025 17:10
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @Mamaduka 🚀

};
const DEFAULT_QUERY = { per_page: 100, page: 1 };
const EMPTY_ARRAY: RawRevision[] = [];
const EMPTY_ARRAY: [] = [];
Copy link
Member

Choose a reason for hiding this comment

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

That's OK, unless we want to have multiple EMPTY_ARRAYs 😉

@Mamaduka
Copy link
Member Author

Mamaduka commented Dec 3, 2025

Thanks for the review, @tyxla!

@Mamaduka Mamaduka merged commit 5617674 into trunk Dec 3, 2025
54 of 58 checks passed
@Mamaduka Mamaduka deleted the fix/use-global-styles-revisions-warning branch December 3, 2025 18:06
@github-actions github-actions bot added this to the Gutenberg 22.3 milestone Dec 3, 2025
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] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants