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

QueryControls: Default to new 40px size #64457

Merged
merged 2 commits into from
Aug 13, 2024
Merged

QueryControls: Default to new 40px size #64457

merged 2 commits into from
Aug 13, 2024

Conversation

mirka
Copy link
Member

@mirka mirka commented Aug 12, 2024

Part of #46741, #63871

What?

Default the QueryControls to the new 40px size.

Why?

Similar to #64456, I think this was one of those components where we didn't need to have a transitional period with the __next40pxDefaultSize prop. It is a compound component, similar to ColorPicker or TimePicker, which won't cause serious breakage due to the input fields being upsized. The component won't be used in a context where upsizing the inputs would cause overflows, for example.

How?

Remove the prop. The only usage of QueryControls in the app is in the Latest Posts block, which was still using the old size. This is now corrected:

Before After
QueryControls in Latest Posts block, before QueryControls in Latest Posts block, after

Testing Instructions

Usages of QueryControls should now default to the larger size. Also, having the __next40pxDefaultSize prop should not cause TypeScript compilation to fail (only marked as deprecated).

@mirka mirka added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Aug 12, 2024
@mirka mirka self-assigned this Aug 12, 2024
@mirka mirka requested a review from ajitbohra as a code owner August 12, 2024 22:15
Copy link

github-actions bot commented Aug 12, 2024

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 <[email protected]>
Co-authored-by: tyxla <[email protected]>

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 August 12, 2024 22:17
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Looks good, thank you 👍 🚀

Comment on lines 107 to 108
* Start opting into the larger default height that will become the
* default size in a future version.
Copy link
Member

Choose a reason for hiding this comment

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

Should we remove the old docs as they're no longer relevant?

Suggested change
* Start opting into the larger default height that will become the
* default size in a future version.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm hoping it will be helpful to extenders, at least for a while, until this deprecation propagates. They will see the prop marked as deprecated in their IDEs, and they might want to know what that prop was about.

@mirka mirka enabled auto-merge (squash) August 13, 2024 20:25
@mirka mirka merged commit 40b51b8 into trunk Aug 13, 2024
64 of 66 checks passed
@mirka mirka deleted the query-controls-40px branch August 13, 2024 20:28
@github-actions github-actions bot added this to the Gutenberg 19.1 milestone Aug 13, 2024
getdave pushed a commit that referenced this pull request Aug 14, 2024
* QueryControls: Default to new 40px size

* Add changelog

Co-authored-by: mirka <[email protected]>
Co-authored-by: tyxla <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants