Skip to content

Commit

Permalink
Page List block: Don't wrap Edit button with ToolsPanelItem component (
Browse files Browse the repository at this point in the history
…#68248)

Co-authored-by: t-hamano <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: talldan <[email protected]>
  • Loading branch information
4 people authored Dec 24, 2024
1 parent 182752e commit cdace81
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions packages/block-library/src/page-list/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,24 +359,18 @@ export default function PageListEdit( {
) }

{ allowConvertToLinks && (
<ToolsPanelItem
label={ __( 'Edit Menu' ) }
isShownByDefault
hasValue={ () => false }
>
<div>
<p>{ convertDescription }</p>
<Button
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ ! hasResolvedPages }
onClick={ convertToNavigationLinks }
>
{ __( 'Edit' ) }
</Button>
</div>
</ToolsPanelItem>
<div style={ { gridColumn: '1 / -1' } }>
<p>{ convertDescription }</p>
<Button
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ ! hasResolvedPages }
onClick={ convertToNavigationLinks }
>
{ __( 'Edit' ) }
</Button>
</div>
) }
</ToolsPanel>
</InspectorControls>
Expand Down

1 comment on commit cdace81

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in cdace81.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12476305301
📝 Reported issues:

Please sign in to comment.