Skip to content

Commit

Permalink
FontFamilyControl: Deprecate 36px default size (#67853)
Browse files Browse the repository at this point in the history
Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored Dec 12, 2024
1 parent 7571321 commit 4db3120
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/block-editor/src/components/font-family/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const MyFontFamilyControl = () => {
setFontFamily( newFontFamily );
} }
__nextHasNoMarginBottom
__next40pxDefaultSize
/>
);
};
Expand Down
14 changes: 14 additions & 0 deletions packages/block-editor/src/components/font-family/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ export default function FontFamilyControl( {
);
}

if (
! __next40pxDefaultSize &&
( props.size === undefined || props.size === 'default' )
) {
deprecated(
`36px default size for wp.blockEditor.__experimentalFontFamilyControl`,
{
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 (
<CustomSelectControl
__next40pxDefaultSize={ __next40pxDefaultSize }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ export const Default = {
},
],
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: true,
},
};

1 comment on commit 4db3120

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 4db3120.
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/12303217527
📝 Reported issues:

Please sign in to comment.