BorderBoxControl: Suppress redundant warnings for deprecated 36px size #67213
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 themaybeWarnDeprecated36pxSize
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.