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

FontAppearanceControl: Deprecate 36px default size #67854

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* WordPress dependencies
*/
import { CustomSelectControl } from '@wordpress/components';
import deprecated from '@wordpress/deprecated';
import { useMemo } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';

Expand Down Expand Up @@ -147,6 +148,20 @@ export default function FontAppearanceControl( props ) {
);
};

if (
! __next40pxDefaultSize &&
( otherProps.size === undefined || otherProps.size === 'default' )
) {
deprecated(
`36px default size for wp.blockEditor.__experimentalFontAppearanceControl`,
{
since: '6.8',
version: '7.1',
hint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.',
}
);
}

return (
hasStylesOrWeights && (
<CustomSelectControl
Expand Down
Loading