Skip to content

FocalPointPicker: Complete __next40pxDefaultSize cleanup#79487

Open
mirka wants to merge 2 commits into
trunkfrom
focalpointpicker-40px-cleanup
Open

FocalPointPicker: Complete __next40pxDefaultSize cleanup#79487
mirka wants to merge 2 commits into
trunkfrom
focalpointpicker-40px-cleanup

Conversation

@mirka

@mirka mirka commented Jun 24, 2026

Copy link
Copy Markdown
Member

What?

Follow up to #65751 and #64456.

FocalPointPicker already unconditionally renders 40px child controls. This PR finishes the remaining bookkeeping: runtime prop stripping and ESLint.

Why?

The public __next40pxDefaultSize prop was deprecated in WP 6.7 and has been a noop since #64456 defaulted the component to 40px internally. This aligns lint rules with that reality and prevents the prop from leaking onto the root element via ...restProps.

How?

  • Destructure __next40pxDefaultSize in FocalPointPicker so it is not spread onto the root Container.
  • Add a restricted-syntax rule to forbid passing __next40pxDefaultSize to FocalPointPicker.

No runtime behavior change.

Testing Instructions

  1. Open Storybook to Components / FocalPointPicker and smoke test the default story.
  2. Drag the focal point and adjust the Left/Top unit controls.
  3. Insert a Cover block with a background image and confirm the focal point picker in the sidebar still renders at 40px height.
  4. Confirm no console warnings are logged.

@github-actions github-actions Bot added the [Package] Components /packages/components label Jun 24, 2026
@mirka mirka self-assigned this Jun 24, 2026
@mirka mirka added the [Type] Code Quality Issues or PRs that relate to code quality label Jun 24, 2026
@github-actions

Copy link
Copy Markdown

Size Change: +42 B (0%)

Total Size: 7.51 MB

📦 View Changed
Filename Size Change
build/scripts/components/index.min.js 264 kB +42 B (+0.02%)

compressed-size-action

@mirka mirka marked this pull request as ready for review June 24, 2026 13:08
@mirka mirka requested review from a team, ajitbohra and manzoorwanijk as code owners June 24, 2026 13:08
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants