Skip to content

[#72454] Fix CollapsibleHeader title truncation when multi_line: false#421

Merged
HDinger merged 4 commits intomainfrom
fix/72454-collapsible-header-title-not-truncated
Mar 3, 2026
Merged

[#72454] Fix CollapsibleHeader title truncation when multi_line: false#421
HDinger merged 4 commits intomainfrom
fix/72454-collapsible-header-title-not-truncated

Conversation

@myabc
Copy link
Collaborator

@myabc myabc commented Mar 3, 2026

What are you trying to accomplish?

Screenshots

Integration

List the issues that this change affects.

https://community.openproject.org/wp/72454

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

Anything you want to highlight for special attention from reviewers?

Accessibility

  • Fixes axe scan violation - This change fixes an existing axe scan violation.
  • No new axe scan violation - This change does not introduce any new axe scan violations.
  • New axe violation - This change introduces a new axe scan violation. Please describe why the violation cannot be resolved below.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Copilot AI review requested due to automatic review settings March 3, 2026 10:52
@changeset-bot
Copy link

changeset-bot bot commented Mar 3, 2026

🦋 Changeset detected

Latest commit: f45501e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@openproject/primer-view-components Patch

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

@myabc myabc changed the title fix/72454 collapsible header title not truncated [#72454] Fix CollapsibleHeader title truncation when multi_line: false Mar 3, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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::Truncate to enable ellipsis truncation.
  • Adjust CollapsibleHeader flex/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.

Comment on lines 69 to +75
.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%;
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

.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.

Copilot uses AI. Check for mistakes.
myabc and others added 2 commits March 3, 2026 07:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

⚠️ Visual or ARIA snapshot differences found

Our visual and ARIA snapshot tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.

Review differences

@HDinger HDinger merged commit 697edc6 into main Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants