Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

mirka
Copy link
Member

@mirka mirka commented Nov 21, 2024

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.

@mirka mirka added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Nov 21, 2024
@mirka mirka requested a review from a team November 21, 2024 22:52
@mirka mirka self-assigned this Nov 21, 2024
@mirka mirka requested a review from ajitbohra as a code owner November 21, 2024 22:52
Copy link

github-actions bot commented Nov 21, 2024

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 <[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.

Copy link

Flaky tests detected in 55c679f.
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:

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.

LGTM 👍

@mirka mirka merged commit 98b3ec0 into trunk Nov 25, 2024
64 checks passed
@mirka mirka deleted the fix/border-box-control-warning branch November 25, 2024 18:08
@github-actions github-actions bot added this to the Gutenberg 19.8 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants