Skip to content

Commit de98c5d

Browse files
mirkaciampo
andauthored
QueryControls: Complete __next40pxDefaultSize cleanup (#79485)
* QueryControls: Hard deprecate 40px default size * Add changelog * Remove changelog entry * Restore WP 6.7 deprecation version on QueryControls * Fix up Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
1 parent 0ed36aa commit de98c5d

6 files changed

Lines changed: 3 additions & 15 deletions

File tree

packages/components/src/query-controls/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,3 @@ The selected category for the `categoriesList` prop.
247247

248248
- Required: No
249249
- Platform: Web
250-
251-
#### `__next40pxDefaultSize`: `boolean`
252-
253-
Start opting into the larger default height that will become the default size in a future version.
254-
255-
- Required: No
256-
- Default: `false`

packages/components/src/query-controls/author-select.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import TreeSelect from '../tree-select';
66
import type { AuthorSelectProps } from './types';
77

88
export default function AuthorSelect( {
9-
__next40pxDefaultSize,
109
label,
1110
noOptionLabel,
1211
authorList,
@@ -30,7 +29,7 @@ export default function AuthorSelect( {
3029
? String( selectedAuthorId )
3130
: undefined
3231
}
33-
__next40pxDefaultSize={ __next40pxDefaultSize }
32+
__next40pxDefaultSize
3433
/>
3534
);
3635
}

packages/components/src/query-controls/category-select.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import TreeSelect from '../tree-select';
44
import type { CategorySelectProps } from './types';
55

66
export default function CategorySelect( {
7-
__next40pxDefaultSize,
87
label,
98
noOptionLabel,
109
categoriesList,
@@ -30,7 +29,7 @@ export default function CategorySelect( {
3029
: undefined
3130
}
3231
{ ...props }
33-
__next40pxDefaultSize={ __next40pxDefaultSize }
32+
__next40pxDefaultSize
3433
/>
3534
);
3635
}

packages/components/src/query-controls/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export function QueryControls( {
139139
props.categoriesList &&
140140
props.onCategoryChange && (
141141
<CategorySelect
142-
__next40pxDefaultSize
143142
key="query-controls-category-select"
144143
categoriesList={ props.categoriesList }
145144
label={ __( 'Category' ) }
@@ -175,7 +174,6 @@ export function QueryControls( {
175174
),
176175
onAuthorChange && (
177176
<AuthorSelect
178-
__next40pxDefaultSize
179177
key="query-controls-author-select"
180178
authorList={ authorList }
181179
label={ __( 'Author' ) }

packages/components/src/query-controls/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export type CategorySelectProps = Pick<
3131
categoriesList: Category[];
3232
onChange: ( newCategory: string ) => void;
3333
selectedCategoryId?: Category[ 'id' ];
34-
__next40pxDefaultSize: boolean;
3534
};
3635

3736
export type AuthorSelectProps = Pick<
@@ -41,7 +40,6 @@ export type AuthorSelectProps = Pick<
4140
authorList?: Author[];
4241
onChange: ( newAuthor: string ) => void;
4342
selectedAuthorId?: Author[ 'id' ];
44-
__next40pxDefaultSize: boolean;
4543
};
4644

4745
type Order = 'asc' | 'desc';

tools/eslint/config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ const restrictedSyntax = [
173173
'BorderBoxControl',
174174
'BoxControl',
175175
'FontSizePicker',
176+
'QueryControls',
176177
'TextControl',
177178
].map( ( componentName ) => ( {
178179
selector: `JSXElement[openingElement.name.name="${ componentName }"] JSXAttribute[name.name="__next40pxDefaultSize"]`,

0 commit comments

Comments
 (0)