-
Notifications
You must be signed in to change notification settings - Fork 646
Adjust ActionList.Item danger variant CSS to support trailing count/keybinding hint
#7211
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
Conversation
🦋 Changeset detectedLatest commit: ba83cda 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 |
|
Adjusts the CSS for the danger variant of ActionList.Item to support a trailing count or keybinding hint.
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 adjusts the CSS for the ActionList.Item danger variant to properly support trailing count labels and keyboard binding hints, particularly focusing on the hover state styling. The previous implementation used overly broad selectors (& * :not([popover], .TrailingVisual)) which didn't adequately handle the new trailing elements.
Key Changes:
- Replaced broad wildcard selectors with specific class-based selectors for danger variant styling
- Added explicit styling for keyboard binding hints (
[data-kbd-chord]) in hover and active states - Added two new Storybook stories demonstrating keyboard shortcuts and trailing counts with the danger variant
Reviewed Changes
Copilot reviewed 4 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/react/src/ActionList/ActionList.module.css |
Updated danger variant CSS selectors and added keybinding hint styles for hover/active states |
packages/react/src/ActionList/ActionList.features.stories.tsx |
Added WithKeyboardShortcuts and WithTrailingCount stories with danger variant examples |
e2e/components/ActionList.test.ts |
Added E2E test entries for the two new stories |
.playwright/snapshots/**/*.png |
Visual regression test snapshots for new stories across all themes |
.changeset/selfish-pigs-chew.md |
Changeset documenting the patch-level change |
Comments suppressed due to low confidence (1)
packages/react/src/ActionList/ActionList.module.css:204
- Missing comma in CSS selector list. The selector
.LeadingVisual,on line 203 should be followed by&for the next selector to maintain proper specificity. The current code has:
& .LeadingAction,
.LeadingVisual,
.ItemLabel {This means .LeadingVisual and .ItemLabel are being selected globally, not scoped to the [data-variant='danger'] element. It should be:
& .LeadingAction,
& .LeadingVisual,
& .ItemLabel {The same issue exists on lines 214-215 (hover state) and lines 231-232 (active state).
}
/* active state [aria-current] */
|
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/7187 |
|
🟢 ci completed with status |
Just making sure that KeybindingHint and count look alright in ActionList with the
dangervariant (hover state is the critical one).CleanShot.2025-11-18.at.15.54.00.mp4
CleanShot.2025-11-18.at.15.54.28.mp4
Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
Merge checklist