Skip to content

Conversation

@mirka
Copy link
Member

@mirka mirka commented Dec 12, 2025

What?

Adds back type defs for the __nextHasNoMarginBottom prop (for the components already done in #73848).

Why?

I remembered that we agreed to keep the type def around to prevent consumer builds from failing. Whether or not this prop exists in a consumer codebase is not important, so we shouldn't penalize early adopters by triggering errors.

I will continue this pattern for FocalPointPicker (#73980) and onwards.

Testing Instructions

Passing a __nextHasNoMarginBottom to any of these components should not trigger a TypeScript error. Just a deprecation indicator.

@mirka mirka self-assigned this Dec 12, 2025
@mirka mirka requested a review from ajitbohra as a code owner December 12, 2025 19:20
@mirka mirka added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Dec 12, 2025
@github-actions
Copy link

github-actions bot commented Dec 12, 2025

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: juanfra <juanfra@git.wordpress.org>
Co-authored-by: aduth <aduth@git.wordpress.org>

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

@mirka mirka requested a review from a team December 12, 2025 19:21
@github-actions
Copy link

Flaky tests detected in 88c0ee6.
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/20177755196
📝 Reported issues:

Copy link
Member

@juanfra juanfra left a comment

Choose a reason for hiding this comment

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

Code looks good to me. From what I tested it works well.

Image

@aduth
Copy link
Member

aduth commented Dec 15, 2025

Will we have a deprecation lifecycle for removing these passthrough types? 😅 To your point of "Whether or not this prop exists in a consumer codebase is not important", I would agree that it's not especially impactful, but it is technical debt that we carry, and simpler / smaller code is an ideal to strive for.

@mirka
Copy link
Member Author

mirka commented Dec 15, 2025

Will we have a deprecation lifecycle for removing these passthrough types?

The current guidelines are the result of active community feedback, and personally I think it's a fair compromise between maintenance burden and consumer burden, given the historical tendencies of the project. (This balance will definitely shift in the new @wordpress/ui package though!)

A big reason for keeping the type def alive for a while is for consumers having to support multiple WP versions, so maybe it's fine to remove after a few more cycles if these pile up.

@mirka mirka merged commit 7e5f132 into trunk Dec 15, 2025
35 of 36 checks passed
@mirka mirka deleted the add-back-margin-types branch December 15, 2025 16:41
@github-actions github-actions bot added this to the Gutenberg 22.4 milestone Dec 15, 2025
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.

4 participants