Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
7 changes: 0 additions & 7 deletions packages/components/src/query-controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,3 @@ The selected category for the `categoriesList` prop.

- Required: No
- Platform: Web

#### `__next40pxDefaultSize`: `boolean`

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

- Required: No
- Default: `false`
3 changes: 1 addition & 2 deletions packages/components/src/query-controls/author-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import TreeSelect from '../tree-select';
import type { AuthorSelectProps } from './types';

export default function AuthorSelect( {
__next40pxDefaultSize,
label,
noOptionLabel,
authorList,
Expand All @@ -30,7 +29,7 @@ export default function AuthorSelect( {
? String( selectedAuthorId )
: undefined
}
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import TreeSelect from '../tree-select';
import type { CategorySelectProps } from './types';

export default function CategorySelect( {
__next40pxDefaultSize,
label,
noOptionLabel,
categoriesList,
Expand All @@ -30,7 +29,7 @@ export default function CategorySelect( {
: undefined
}
{ ...props }
__next40pxDefaultSize={ __next40pxDefaultSize }
__next40pxDefaultSize
/>
);
}
2 changes: 0 additions & 2 deletions packages/components/src/query-controls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export function QueryControls( {
props.categoriesList &&
props.onCategoryChange && (
<CategorySelect
__next40pxDefaultSize
key="query-controls-category-select"
categoriesList={ props.categoriesList }
label={ __( 'Category' ) }
Expand Down Expand Up @@ -175,7 +174,6 @@ export function QueryControls( {
),
onAuthorChange && (
<AuthorSelect
__next40pxDefaultSize
key="query-controls-author-select"
authorList={ authorList }
label={ __( 'Author' ) }
Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/query-controls/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export type CategorySelectProps = Pick<
categoriesList: Category[];
onChange: ( newCategory: string ) => void;
selectedCategoryId?: Category[ 'id' ];
__next40pxDefaultSize: boolean;
};

export type AuthorSelectProps = Pick<
Expand All @@ -41,7 +40,6 @@ export type AuthorSelectProps = Pick<
authorList?: Author[];
onChange: ( newAuthor: string ) => void;
selectedAuthorId?: Author[ 'id' ];
__next40pxDefaultSize: boolean;
};

type Order = 'asc' | 'desc';
Expand Down
10 changes: 6 additions & 4 deletions tools/eslint/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ const restrictedSyntax = [
selector: 'JSXAttribute[name.name="__nextHasNoMarginBottom"]',
message: 'The `__nextHasNoMarginBottom` prop is no longer needed.',
},
...[ 'BoxControl', 'TextControl' ].map( ( componentName ) => ( {
selector: `JSXElement[openingElement.name.name="${ componentName }"] JSXAttribute[name.name="__next40pxDefaultSize"]`,
message: `The \`__next40pxDefaultSize\` prop is no longer needed on \`${ componentName }\`.`,
} ) ),
...[ 'BoxControl', 'QueryControls', 'TextControl' ].map(
( componentName ) => ( {
selector: `JSXElement[openingElement.name.name="${ componentName }"] JSXAttribute[name.name="__next40pxDefaultSize"]`,
message: `The \`__next40pxDefaultSize\` prop is no longer needed on \`${ componentName }\`.`,
} )
),
{
selector:
'CallExpression[callee.name="withDispatch"] > :function > BlockStatement > :not(VariableDeclaration,ReturnStatement)',
Expand Down
Loading