Skip to content

Commit

Permalink
Fix the title badge size and let the title text overflow with ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed May 16, 2024
1 parent 82dfa59 commit 078d1e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
11 changes: 8 additions & 3 deletions packages/edit-site/src/components/page-pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ export default function PagePages() {
__( '(no title)' ) }
</Link>
) : (
decodeEntities( item.title?.rendered ) ||
__( '(no title)' )
<span>
{ decodeEntities( item.title?.rendered ) ||
__( '(no title)' ) }
</span>
);

let suffix = '';
Expand All @@ -335,7 +337,10 @@ export default function PagePages() {
}

return (
<HStack justify="stretch">
<HStack
className="edit-site-page-pages-title"
justify="stretch"
>
{ title }
{ suffix }
</HStack>
Expand Down
7 changes: 6 additions & 1 deletion packages/edit-site/src/components/page-pages/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
}
}

.edit-site-page-pages-title span {
text-overflow: ellipsis;
overflow: hidden;
}

.edit-site-page-pages__title-badge {
background: $gray-100;
color: $gray-700;
Expand All @@ -60,5 +65,5 @@
border-radius: $radius-block-ui;
font-size: 12px;
font-weight: 400;
width: fit-content;
min-width: 80px !important; // Override HStack min-width: 0
}

0 comments on commit 078d1e5

Please sign in to comment.