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

FocalPointPicker: Default to new 40px size #64456

Merged
merged 5 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
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 @@ -585,7 +585,6 @@ function BackgroundSizeControls( {
return (
<VStack spacing={ 3 } className="single-column">
<FocalPointPicker
__next40pxDefaultSize
__nextHasNoMarginBottom
label={ __( 'Focal point' ) }
url={ getResolvedThemeFilePath( imageValue, themeFileURIs ) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ export default function CoverInspectorControls( {
{ showFocalPointPicker && (
<FocalPointPicker
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Focal point' ) }
url={ url }
value={ focalPoint }
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/media-text/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ function MediaTextEdit( {
>
<FocalPointPicker
__nextHasNoMarginBottom
__next40pxDefaultSize
label={ __( 'Focal point' ) }
url={
useFeaturedImage && featuredImageURL
Expand Down
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- `Composite`: improve Storybook examples and add interactive controls ([#64397](https://github.com/WordPress/gutenberg/pull/64397)).
- `QueryControls`: Default to new 40px size ([#64457](https://github.com/WordPress/gutenberg/pull/64457)).
- `TimePicker`: add `hideLabelFromVision` prop ([#64267](https://github.com/WordPress/gutenberg/pull/64267)).
- `FocalPointPicker`: Default to new 40px size ([#64456](https://github.com/WordPress/gutenberg/pull/64456)).
- `DropdownMenuV2`: adopt elevation scale ([#64432](https://github.com/WordPress/gutenberg/pull/64432)).

## 28.5.0 (2024-08-07)
Expand Down
4 changes: 1 addition & 3 deletions packages/components/src/focal-point-picker/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const noop = () => {};

export default function FocalPointPickerControls( {
__nextHasNoMarginBottom,
__next40pxDefaultSize,
hasHelpText,
onChange = noop,
point = {
Expand Down Expand Up @@ -57,7 +56,6 @@ export default function FocalPointPickerControls( {
gap={ 4 }
>
<FocalPointUnitControl
__next40pxDefaultSize={ __next40pxDefaultSize }
label={ __( 'Left' ) }
aria-label={ __( 'Focal point left position' ) }
value={ [ valueX, '%' ].join( '' ) }
Expand All @@ -71,7 +69,6 @@ export default function FocalPointPickerControls( {
dragDirection="e"
/>
<FocalPointUnitControl
__next40pxDefaultSize={ __next40pxDefaultSize }
label={ __( 'Top' ) }
aria-label={ __( 'Focal point top position' ) }
value={ [ valueY, '%' ].join( '' ) }
Expand All @@ -91,6 +88,7 @@ export default function FocalPointPickerControls( {
function FocalPointUnitControl( props: UnitControlProps ) {
return (
<StyledUnitControl
__next40pxDefaultSize
className="focal-point-picker__controls-position-unit-control"
labelPosition="top"
max={ TEXTCONTROL_MAX }
Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/focal-point-picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ const GRID_OVERLAY_TIMEOUT = 600;
*/
export function FocalPointPicker( {
__nextHasNoMarginBottom,
__next40pxDefaultSize = false,
autoPlay = true,
className,
help,
Expand Down Expand Up @@ -286,7 +285,6 @@ export function FocalPointPicker( {
</MediaWrapper>
<Controls
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
__next40pxDefaultSize={ __next40pxDefaultSize }
hasHelpText={ !! help }
point={ { x, y } }
onChange={ ( value ) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/focal-point-picker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export type FocalPointPickerProps = Pick<
/**
* Start opting into the larger default height that will become the default size in a future version.
*
* @default false
* @deprecated Default behavior since WP 6.7. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
/**
Expand Down Expand Up @@ -68,7 +69,6 @@ export type FocalPointPickerProps = Pick<

export type FocalPointPickerControlsProps = {
__nextHasNoMarginBottom?: boolean;
__next40pxDefaultSize?: boolean;
/**
* A bit of extra bottom margin will be added if a `help` text
* needs to be rendered under it.
Expand Down
Loading