Skip to content

Conversation

@barmo
Copy link
Contributor

@barmo barmo commented Jan 6, 2026

Closes https://github.com/github/memex/issues/23884

Changelog

New

na

Changed

Actionlist item inline description styling change from flex to block for handling overflow to be on the next line below the label text. Change can be seen with "The everything bagel" example (prod storybook)

Before After
Screenshot of example before the code change where both the label and inline description overflows to the next line within their component bounds Screenshot of example after the code change where only the inline description overflows to the next line

This overflow behavior is consistent with the reviewers for pull requests for example
screenshot of example mentioned above

Removed

na

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Planning to go to OH today to ask more about this, but I added the "All combination" storybook in the vrt in a different pr so that this change can be better documented/visible for review via the vrt. Will update later today

Merge checklist

@barmo barmo self-assigned this Jan 6, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

🦋 Changeset detected

Latest commit: 25531d8

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jan 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the integration-tests: skipped manually label to skip these checks.

barmo added 2 commits January 6, 2026 16:50
…for handling overflow to be on the next line below the label text
@barmo barmo force-pushed the clara/actionlist-item-inline-description-overflow branch from a6ce70e to 0d62018 Compare January 6, 2026 16:50
@github-actions github-actions bot requested a deployment to storybook-preview-7427 January 6, 2026 16:54 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-7427 January 6, 2026 17:04 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-7427 January 6, 2026 23:51 Inactive
@primer primer deleted a comment from github-actions bot Jan 7, 2026
@barmo barmo marked this pull request as ready for review January 7, 2026 18:08
@barmo barmo requested a review from a team as a code owner January 7, 2026 18:08
@barmo barmo requested review from Copilot and hectahertz January 7, 2026 18:08
Copy link
Contributor

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

This PR fixes the overflow behavior of ActionList items with inline descriptions by changing the layout from flex to block/inline display model. Previously, when an ActionList item's label and inline description together exceeded the available width, both would overflow to the next line within their flex container bounds. After this change, the label stays on the first line and only the inline description wraps to the next line below the label text.

Key Changes:

  • Modified the inline description layout from flexbox to block/inline display model for proper text wrapping
  • Removed flex-specific properties (flex-direction, align-items, gap) and added inline display with margin-left spacing
  • Added overflow-wrap property to ensure the inline description breaks words appropriately

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/react/src/ActionList/ActionList.module.css Changed inline description styling from flex layout to block/inline display model with appropriate spacing and overflow handling
.changeset/deep-impalas-wave.md Added changeset documenting the patch-level fix for inline description overflow

@barmo
Copy link
Contributor Author

barmo commented Jan 7, 2026

Here is a loom recording of the before (prod) and after (deploy preview) with the changes of this pr on dotcom

deploy preview link (expires ~6pm CT)

Otherwise here's a table with screenshots testing this ui fix in two different places

Before After
Selector in Projects table screenshot of inline description does not overflow below the label screenshot of inline description does overflow below the label
Selector within issues screenshot of inline description does not overflow below the label creenshot of inline description does overflow below the label

EDIT
The loom video is not up to date (the vertical spacing is a smidge too big) with this commit 9f6ac86. The deploy preview and the screenshots ARE up to date with the latest code changing commit 25531d8

@github-actions

This comment was marked as off-topic.

@barmo barmo added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jan 7, 2026
@github-actions github-actions bot temporarily deployed to storybook-preview-7427 January 7, 2026 22:36 Inactive
@primer primer bot requested a review from a team as a code owner January 7, 2026 22:45
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Jan 7, 2026
Comment on lines +633 to +634
/* stylelint-disable-next-line primer/typography */
line-height: normal;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting the line-height was necessary because with flex previously, the container height is determined by the tallest item's content. With the display:block, the block/inline layout inherits line-height from ancestor elements, which can vary depending on context and create extra vertical spacing. We need to reset this to prevent the spacing mismatch.

Including the disable instead of using a Primer typography variable was necessary because

  • There's no Primer variable that represents a "reset" or "normal" line-height
  • Using explicit values like 20px or var(--control-medium-lineBoxHeight) didn't work consistently across all contexts - some VRT tests passed while others failed
  • line-height: normal lets the browser calculate the natural line-height based on the font metrics, which produces consistent results that match the original flex baseline alignment behavior across all usage contexts

@github-actions github-actions bot requested a deployment to storybook-preview-7427 January 7, 2026 22:49 Abandoned
@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/10057

@primer-integration
Copy link

🔬 github-ui Integration Test Results

Check Status Details
CI ✅ Passed View run
Projects (Memex) ✅ Passed View run
VRT ✅ Passed View run

All checks passed! Your integration PR is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants