-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BorderBoxControl: Deprecate 36px default size (#65752)
* Add utility function * BorderBoxControl: Deprecate 36px default size * Fix naming * Add changelog Co-authored-by: mirka <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: DaniGuardiola <[email protected]>
- Loading branch information
1 parent
0466f7d
commit 76a5ba1
Showing
7 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,4 +84,5 @@ Default.args = { | |
colors, | ||
label: 'Borders', | ||
enableStyle: true, | ||
__next40pxDefaultSize: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import deprecated from '@wordpress/deprecated'; | ||
|
||
export function maybeWarnDeprecated36pxSize( { | ||
componentName, | ||
__next40pxDefaultSize, | ||
size, | ||
}: { | ||
componentName: string; | ||
__next40pxDefaultSize: boolean | undefined; | ||
size: string; | ||
} ) { | ||
if ( __next40pxDefaultSize || size !== 'default' ) { | ||
return; | ||
} | ||
|
||
deprecated( `36px default size for wp.components.${ componentName }`, { | ||
since: '6.7', | ||
version: '7.0', | ||
hint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.', | ||
} ); | ||
} |
76a5ba1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected in 76a5ba1.
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/11531670784
📝 Reported issues:
/test/e2e/specs/site-editor/site-editor-url-navigation.spec.js