Skip to content

Commit d2cefee

Browse files
committed
[#72454] Fix title truncation when multi_line: false
1 parent 32c2fd9 commit d2cefee

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

app/components/primer/open_project/border_box/collapsible_header.pcss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
align-items: center;
2727
column-gap: var(--stack-gap-normal);
2828
row-gap: var(--base-size-4);
29+
overflow: hidden;
2930

3031
.CollapsibleHeader > & {
3132
flex: 1;
@@ -66,10 +67,12 @@
6667
}
6768

6869
.CollapsibleHeader-title-line {
70+
flex-basis: 66%;
6971
display: flex;
7072
align-items: center;
7173
gap: var(--stack-gap-condensed);
72-
min-width: fit-content;
74+
overflow: hidden;
75+
max-width: 100%;
7376
}
7477

7578
.CollapsibleHeader-description {

app/components/primer/open_project/border_box/collapsible_header.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CollapsibleHeader < Primer::Component
2222
"Box-title"
2323
)
2424

25-
Primer::Beta::Heading.new(tag: fetch_or_fallback(TITLE_TAG_OPTIONS, tag, TITLE_TAG_DEFAULT), **system_arguments)
25+
Beta::Truncate.new(tag: fetch_or_fallback(TITLE_TAG_OPTIONS, tag, TITLE_TAG_DEFAULT), **system_arguments)
2626
}
2727

2828
# Optional count

0 commit comments

Comments
 (0)