-
Notifications
You must be signed in to change notification settings - Fork 648
Change actionlist item inline description styling #7427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 25531d8 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 |
|
👋 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 |
…for handling overflow to be on the next line below the label text
a6ce70e to
0d62018
Compare
There was a problem hiding this 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 |
|
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
EDIT |
This comment was marked as off-topic.
This comment was marked as off-topic.
…e inline description variant
| /* stylelint-disable-next-line primer/typography */ | ||
| line-height: normal; |
There was a problem hiding this comment.
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
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/10057 |




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)
This overflow behavior is consistent with the reviewers for pull requests for example

Removed
na
Rollout strategy
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