Conversation
🦋 Changeset detectedLatest commit: f45501e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CollapsibleHeader title truncation when multi_line: false
There was a problem hiding this comment.
Pull request overview
Fixes Primer::OpenProject::BorderBox::CollapsibleHeader title truncation when rendered in single-line mode (multi_line: false) in the OpenProject-specific Primer fork.
Changes:
- Render the header title using
Primer::Beta::Truncateto enable ellipsis truncation. - Adjust
CollapsibleHeaderflex/overflow styling to allow the title row to shrink and truncate correctly. - Add a changeset documenting the patch release.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/components/primer/open_project/border_box/collapsible_header.rb | Switches the title slot component from Primer::Beta::Heading to Beta::Truncate to support truncation. |
| app/components/primer/open_project/border_box/collapsible_header.pcss | Updates overflow/flex sizing rules to make the title line truncatable in single-line layout. |
| .changeset/easy-cobras-design.md | Declares a patch release and describes the truncation fix. |
app/components/primer/open_project/border_box/collapsible_header.rb
Outdated
Show resolved
Hide resolved
| .CollapsibleHeader-title-line { | ||
| flex-basis: 66%; | ||
| display: flex; | ||
| align-items: center; | ||
| gap: var(--stack-gap-condensed); | ||
| min-width: fit-content; | ||
| overflow: hidden; | ||
| max-width: 100%; |
There was a problem hiding this comment.
.CollapsibleHeader-title-line { flex-basis: 66%; } is a hard-coded percentage that affects the flex item’s main size. Since the trigger area switches to flex-direction: column in the container query and in --multi-line mode, this flex-basis can become confusing and may behave inconsistently across browsers (percentage basis on an auto-sized column flex container). Consider replacing this with a more explicit/robust sizing approach (e.g., flex grow/shrink rules) or scoping the percentage sizing to only the row layout.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
What are you trying to accomplish?
Screenshots
Integration
List the issues that this change affects.
https://community.openproject.org/wp/72454
Risk Assessment
What approach did you choose and why?
Anything you want to highlight for special attention from reviewers?
Accessibility
Merge checklist