Skip to content

Commit

Permalink
More Block: Make block name affect list view (#58160)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano authored Jan 24, 2024
1 parent 0d31be1 commit b395e43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/block-library/src/more/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export const settings = {
icon,
example: {},
__experimentalLabel( attributes, { context } ) {
const customName = attributes?.metadata?.name;

if ( context === 'list-view' && customName ) {
return customName;
}

if ( context === 'accessibility' ) {
return attributes.customText;
}
Expand Down

1 comment on commit b395e43

@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 b395e43.
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/7637374969
📝 Reported issues:

Please sign in to comment.