From 6fcb1ff8cd33f385515a72db2168bef8bf0f330a Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Tue, 27 Aug 2024 23:14:30 +0900 Subject: [PATCH 1/5] Fix in URLPopover story --- .../src/components/url-popover/stories/index.story.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/url-popover/stories/index.story.js b/packages/block-editor/src/components/url-popover/stories/index.story.js index 5d548f964062a4..ceed23eed6b841 100644 --- a/packages/block-editor/src/components/url-popover/stories/index.story.js +++ b/packages/block-editor/src/components/url-popover/stories/index.story.js @@ -22,7 +22,12 @@ const TestURLPopover = () => { return ( <> - + { isVisible && ( {
- From b84aea461c447a6bf874262ffeac54e7db08f2f7 Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Tue, 27 Aug 2024 23:17:54 +0900 Subject: [PATCH 3/5] Fix in WithDispatch test --- packages/data/src/components/with-dispatch/test/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/data/src/components/with-dispatch/test/index.js b/packages/data/src/components/with-dispatch/test/index.js index f4e38d28edba0a..6bcda99ba9c0f0 100644 --- a/packages/data/src/components/with-dispatch/test/index.js +++ b/packages/data/src/components/with-dispatch/test/index.js @@ -58,7 +58,9 @@ describe( 'withDispatch', () => { } ); }, }; - } )( ( props ) => ); diff --git a/packages/block-directory/src/plugins/get-install-missing/install-button.js b/packages/block-directory/src/plugins/get-install-missing/install-button.js index 9dcd45f67760f4..3b05b53a380b9a 100644 --- a/packages/block-directory/src/plugins/get-install-missing/install-button.js +++ b/packages/block-directory/src/plugins/get-install-missing/install-button.js @@ -22,6 +22,8 @@ export default function InstallButton( { attributes, block, clientId } ) { return ( diff --git a/packages/block-editor/src/components/block-edit/multiple-usage-warning.js b/packages/block-editor/src/components/block-edit/multiple-usage-warning.js index 4acd4d1f349dd0..bff12342904537 100644 --- a/packages/block-editor/src/components/block-edit/multiple-usage-warning.js +++ b/packages/block-editor/src/components/block-edit/multiple-usage-warning.js @@ -24,6 +24,8 @@ export function MultipleUsageWarning( { selectBlock( originalBlockClientId ) } @@ -31,6 +33,8 @@ export function MultipleUsageWarning( { { __( 'Find original' ) } , @@ -31,6 +36,8 @@ const CarouselNavigation = ( { } ) => (
diff --git a/packages/block-editor/src/components/block-variation-transforms/index.js b/packages/block-editor/src/components/block-variation-transforms/index.js index b7ecaad635e44c..97a3f980541842 100644 --- a/packages/block-editor/src/components/block-variation-transforms/index.js +++ b/packages/block-editor/src/components/block-variation-transforms/index.js @@ -35,6 +35,8 @@ function VariationsButtons( { { variations.map( ( variation ) => ( ; + return ( + + ); } } /> ); diff --git a/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js b/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js index bc5e4d37ab2c28..95de775e48eef8 100644 --- a/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +++ b/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js @@ -15,6 +15,8 @@ function PatternCategoriesList( { { patternCategories.map( ( { name, label } ) => { return ( - diff --git a/packages/block-editor/src/components/inserter/media-tab/media-tab.js b/packages/block-editor/src/components/inserter/media-tab/media-tab.js index 2f3985aef569cb..07fce9ee6d80b0 100644 --- a/packages/block-editor/src/components/inserter/media-tab/media-tab.js +++ b/packages/block-editor/src/components/inserter/media-tab/media-tab.js @@ -71,6 +71,8 @@ function MediaTab( { allowedTypes={ ALLOWED_MEDIA_TYPES } render={ ( { open } ) => ( { ' ' } - diff --git a/packages/block-library/src/freeform/modal.js b/packages/block-library/src/freeform/modal.js index c1b10a61de808d..1768022377a432 100644 --- a/packages/block-library/src/freeform/modal.js +++ b/packages/block-library/src/freeform/modal.js @@ -25,6 +25,8 @@ function ModalAuxiliaryActions( { onClick, isModalFullScreen } ) { return ( ); diff --git a/packages/block-library/src/navigation-link/link-ui.js b/packages/block-library/src/navigation-link/link-ui.js index deed35145d6dea..fb3e6d40196127 100644 --- a/packages/block-library/src/navigation-link/link-ui.js +++ b/packages/block-library/src/navigation-link/link-ui.js @@ -310,6 +310,8 @@ const LinkUITools = ( { setAddingBlock, focusAddBlockButton } ) => { return ( ' ), { - button: diff --git a/packages/block-library/src/query/edit/query-placeholder.js b/packages/block-library/src/query/edit/query-placeholder.js index eec982c9750cf8..098c29f0ec512b 100644 --- a/packages/block-library/src/query/edit/query-placeholder.js +++ b/packages/block-library/src/query/edit/query-placeholder.js @@ -79,6 +79,8 @@ export default function QueryPlaceholder( { > { !! hasPatterns && ( ) } { ! isResolving && isBlockBasedTheme && canCreateTemplatePart && ( ); diff --git a/packages/customize-widgets/src/components/inserter/index.js b/packages/customize-widgets/src/components/inserter/index.js index c0156cf774ddc6..41fc037cf673c9 100644 --- a/packages/customize-widgets/src/components/inserter/index.js +++ b/packages/customize-widgets/src/components/inserter/index.js @@ -37,6 +37,8 @@ function Inserter( { setIsOpened } ) { { __( 'Add a block' ) } ); diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js b/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js index 8728e5d61b22a0..7ecfa431ac8d20 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/font-card.js @@ -28,6 +28,8 @@ function FontCard( { font, onClick, variantsText, navigatorPath } ) { return ( - @@ -373,7 +380,12 @@ function ShadowItem( { shadow, onChange, canRemove, onRemove } ) { return ( - ); diff --git a/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js b/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js index 2374b35ad2d699..085ca38a3e182a 100644 --- a/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js +++ b/packages/edit-widgets/src/components/secondary-sidebar/inserter-sidebar.js @@ -44,6 +44,8 @@ export default function InserterSidebar() { > ); diff --git a/packages/editor/src/components/post-excerpt/panel.js b/packages/editor/src/components/post-excerpt/panel.js index 0c800c1a360b9b..9a37e9134775aa 100644 --- a/packages/editor/src/components/post-excerpt/panel.js +++ b/packages/editor/src/components/post-excerpt/panel.js @@ -198,6 +198,8 @@ function PrivateExcerpt() { ref={ setPopoverAnchor } renderToggle={ ( { onToggle } ) => ( ) } - diff --git a/packages/editor/src/components/post-publish-panel/index.js b/packages/editor/src/components/post-publish-panel/index.js index 28567c60780219..3e411e91db4724 100644 --- a/packages/editor/src/components/post-publish-panel/index.js +++ b/packages/editor/src/components/post-publish-panel/index.js @@ -78,6 +78,8 @@ export class PostPublishPanel extends Component {
{ isPostPublish ? ( ) } diff --git a/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js b/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js index 112bfaabd0c8ec..4913cef9b4c86f 100644 --- a/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js +++ b/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js @@ -428,6 +428,8 @@ export function HierarchicalTermSelector( { slug } ) { { ! loading && hasCreateAction && ( diff --git a/packages/editor/src/components/table-of-contents/index.js b/packages/editor/src/components/table-of-contents/index.js index 74a535240833d6..f2c79fb0347446 100644 --- a/packages/editor/src/components/table-of-contents/index.js +++ b/packages/editor/src/components/table-of-contents/index.js @@ -30,6 +30,8 @@ function TableOfContents( contentClassName="table-of-contents__popover" renderToggle={ ( { isOpen, onToggle } ) => (

- From 31b084a607064908965bef60b6edd651ed839f0e Mon Sep 17 00:00:00 2001 From: Lena Morita Date: Tue, 27 Aug 2024 23:22:24 +0900 Subject: [PATCH 5/5] Add lint rule --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 03c4fd78385277..8b7fbc89af97f2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -344,7 +344,7 @@ module.exports = { 'FormFileUpload should have the `__next40pxDefaultSize` prop to opt-in to the new default size.', }, // Temporary rules until all existing components have the `__next40pxDefaultSize` prop. - ...[ 'SelectControl', 'UnitControl' ].map( + ...[ 'Button', 'SelectControl', 'UnitControl' ].map( ( componentName ) => ( { // Not strict. Allows pre-existing __next40pxDefaultSize={ false } usage until they are all manually updated. selector: `JSXOpeningElement[name.name="${ componentName }"]:not(:has(JSXAttribute[name.name="__next40pxDefaultSize"])):not(:has(JSXAttribute[name.name="size"]))`,