WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.53k stars 4.21k forks source link

BorderBoxControl: Suppress redundant warnings for deprecated 36px size #67213

Open mirka opened 9 hours ago

mirka commented 9 hours ago

Follow-up to #65752

What?

Suppresses a redundant console warning when BorderBoxControl is used in its deprecated 36px size.

Why?

BorderBoxControl has a BorderControl under the hood, and when BorderBoxControl is used in the deprecated 36px size, the internal BorderControl also logs a warning. This is redundant and confusing to the consumer.

How?

Use the __shouldNotWarnDeprecated36pxSize feature of the maybeWarnDeprecated36pxSize util.

Testing Instructions

Go to the Storybook story for BorderBoxControl and disable the __next40pxDefaultSize prop. The console warning for the deprecated size should only be logged once by the BorderBoxControl itself, and not by its internal components.

github-actions[bot] commented 9 hours ago

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: mirka <0mirka00@git.wordpress.org>

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

github-actions[bot] commented 9 hours ago

Flaky tests detected in 55c679fd2f905c402255519b11492525a62e8661. Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11963048802 📝 Reported issues: