Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Try grouping the two pieces of truncated text within the one parent
  • Loading branch information
andrewserong committed Aug 5, 2022
commit 2507d686c0352079d33dff1e39b992439e153fc5
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,19 @@ function ListViewBlockSelectButton(
spacing={ 1 }
>
<span className="block-editor-list-view-block-select-button__title">
<Truncate ellipsizeMode="auto">{ blockTitle }</Truncate>
</span>
{ !! partialContent && (
<span className="block-editor-list-view-block-select-button__partial-content">
<span className="block-editor-list-view-block-select-button__title__inner-wrapper">
<Truncate ellipsizeMode="auto">
{ partialContent }
{ blockTitle }
</Truncate>
{ !! partialContent && (
<span className="block-editor-list-view-block-select-button__partial-content">
<Truncate ellipsizeMode="auto">
{ partialContent }
</Truncate>
</span>
) }
</span>
) }
</span>
{ blockInformation?.anchor && (
<span className="block-editor-list-view-block-select-button__anchor">
{ blockInformation.anchor }
Expand Down
5 changes: 2 additions & 3 deletions packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,11 @@
min-width: 120px;
}

.block-editor-list-view-block-select-button__title,
.block-editor-list-view-block-select-button__partial-content {
.block-editor-list-view-block-select-button__title {
flex: 1;
position: relative;

.components-truncate {
.block-editor-list-view-block-select-button__title__inner-wrapper {
position: absolute;
width: 100%;
transform: translateY(-50%);
Expand Down