Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions packages/block-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- Borders: rename the "Border & Shadow" panel to "Borders", whichever of its controls are available, and always show the Border and Shadow controls' visible labels. A stable panel title is what lets the Border label render unconditionally, so its "Unlink sides" toggle lines up with the border radius one ([#82163](https://github.com/WordPress/gutenberg/pull/82163)).
- `ListView`: Updated to use `outset-ring__focus()` mixin for focus outline wherever applicable instead of the previous box-shadow implementation. ([#82129](https://github.com/WordPress/gutenberg/pull/82129))
- `BlockCard`: Migrate the block-type badge from the private Components `Badge` to `@wordpress/ui` `Badge`. ([#82503](https://github.com/WordPress/gutenberg/pull/82503)).

### Deprecations

Expand Down
12 changes: 3 additions & 9 deletions packages/block-editor/src/components/block-card/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import clsx from 'clsx';
import {
Button,
Icon as WCIcon,
privateApis as componentsPrivateApis,
} from '@wordpress/components';
import { Text, Stack } from '@wordpress/ui';
import { Button, Icon as WCIcon } from '@wordpress/components';
import { Badge, Text, Stack } from '@wordpress/ui';
import { useDispatch, useSelect } from '@wordpress/data';
import deprecated from '@wordpress/deprecated';
import { __, sprintf, isRTL } from '@wordpress/i18n';
Expand All @@ -19,8 +15,6 @@ import { unlock } from '../../lock-unlock';
import { store as blockEditorStore } from '../../store';
import BlockIcon from '../block-icon';

const { Badge: WCBadge } = unlock( componentsPrivateApis );

function OptionalParentSelectButton( { children, onClick } ) {
if ( ! onClick ) {
return children;
Expand Down Expand Up @@ -185,7 +179,7 @@ function BlockCard( {
{ ! parentClientId &&
! isChild &&
!! name?.length && (
<WCBadge>{ title }</WCBadge>
<Badge>{ title }</Badge>
) }
</TitleElement>
{ children }
Expand Down

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Applying overflow-wrap to .block-editor-block-card__title should be sufficient.

diff --git a/packages/block-editor/src/components/block-card/style.scss b/packages/block-editor/src/components/block-card/style.scss
index c5298fd5289..4c94793aa7f 100644
--- a/packages/block-editor/src/components/block-card/style.scss
+++ b/packages/block-editor/src/components/block-card/style.scss
@@ -27,7 +27,6 @@
        align-items: center;
        flex-wrap: wrap;
        gap: calc($grid-unit-10 / 2) $grid-unit-10;
-       min-width: 0;
        overflow-wrap: anywhere;
 
        &.block-editor-block-card__title {
@@ -39,8 +38,6 @@
 
 .block-editor-block-card__name {
        padding: 3px 0; // This makes the title as high as the icon.
-       min-width: 0;
-       overflow-wrap: anywhere;
 }
 
 .block-editor-block-card .block-editor-block-icon,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in e83c04c

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
align-items: center;
flex-wrap: wrap;
gap: calc($grid-unit-10 / 2) $grid-unit-10;
overflow-wrap: anywhere;

&.block-editor-block-card__title {
font-size: $default-font-size;
Expand Down
Loading