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
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
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Enhancements

- `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)).

## 28.5.0 (2024-08-07)
Expand Down
11 changes: 5 additions & 6 deletions packages/components/src/query-controls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ function isMultipleCategorySelection(
* ```
*/
export function QueryControls( {
__next40pxDefaultSize = false,
authorList,
selectedAuthorId,
numberOfItems,
Expand All @@ -82,7 +81,7 @@ export function QueryControls( {
onOrderChange && onOrderByChange && (
<SelectControl
__nextHasNoMarginBottom
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-order-select"
label={ __( 'Order by' ) }
value={
Expand Down Expand Up @@ -137,7 +136,7 @@ export function QueryControls( {
props.categoriesList &&
props.onCategoryChange && (
<CategorySelect
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-category-select"
categoriesList={ props.categoriesList }
label={ __( 'Category' ) }
Expand All @@ -150,7 +149,7 @@ export function QueryControls( {
props.categorySuggestions &&
props.onCategoryChange && (
<FormTokenField
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
__nextHasNoMarginBottom
key="query-controls-categories-select"
label={ __( 'Categories' ) }
Expand All @@ -174,7 +173,7 @@ export function QueryControls( {
),
onAuthorChange && (
<AuthorSelect
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-author-select"
authorList={ authorList }
label={ __( 'Author' ) }
Expand All @@ -186,7 +185,7 @@ export function QueryControls( {
onNumberOfItemsChange && (
<RangeControl
__nextHasNoMarginBottom
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
key="query-controls-range-control"
label={ __( 'Number of items' ) }
value={ numberOfItems }
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/query-controls/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ type BaseQueryControlsProps = {
* Start opting into the larger default height that will become the
* default size in a future version.
Comment on lines 107 to 108
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.

*
* @default false
* @deprecated Default behavior since WP 6.7. Prop can be safely removed.
* @ignore
*/
__next40pxDefaultSize?: boolean;
};
Expand Down
Loading