-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add back type defs for no margin bottom prop #73979
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
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in 88c0ee6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/20177755196
|
juanfra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
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. |
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 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. |

What?
Adds back type defs for the
__nextHasNoMarginBottomprop (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
__nextHasNoMarginBottomto any of these components should not trigger a TypeScript error. Just a deprecation indicator.