fix: update tokens from figma, address hc issues#8407
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR regenerates PatternFly design token SCSS files across the theme suite, updating generation timestamps and adding new high-contrast theme token variants. The high-contrast dark and light themes receive substantive token additions for brand-accent and brand-subtle color families, on-brand icon and text color variants, sticky and glass-related backgrounds, and refined status/border/shadow mappings. ChangesToken File Regeneration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview: https://pf-pr-8407.surge.sh A11y report: https://pf-pr-8407-a11y.surge.sh |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/patternfly/base/tokens/tokens-highcontrast-dark.scss`:
- Around line 281-283: The three accent alias variables
(--pf-t--global--color--brand--accent--clicked,
--pf-t--global--color--brand--accent--default,
--pf-t--global--color--brand--accent--hover) are currently pointed at the
regular brand tokens; update their right-hand side to reference the actual
accent tokens so downstream accent borders/icons get the accent variants (for
example use the corresponding accent tokens such as
var(--pf-global--color--brand--accent--clicked),
var(--pf-global--color--brand--accent--default),
var(--pf-global--color--brand--accent--hover) instead of the non-accent brand
tokens).
In `@src/patternfly/base/tokens/tokens-highcontrast.scss`:
- Around line 595-597: The three brand-accent semantic tokens
(--pf-t--global--color--brand--accent--clicked,
--pf-t--global--color--brand--accent--default,
--pf-t--global--color--brand--accent--hover) are incorrectly aliased to the
regular brand tokens; update each RHS to reference the corresponding accent
tokens (e.g. use --pf-t--global--color--accent--clicked,
--pf-t--global--color--accent--default, --pf-t--global--color--accent--hover) so
accent-specific styling propagates to downstream accent border/icon tokens.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: d0e24f64-f8b3-4664-9365-4ea4bf521cb5
📒 Files selected for processing (17)
src/patternfly/base/tokens/tokens-charts-dark.scsssrc/patternfly/base/tokens/tokens-charts-highcontrast-dark.scsssrc/patternfly/base/tokens/tokens-charts-highcontrast.scsssrc/patternfly/base/tokens/tokens-charts.scsssrc/patternfly/base/tokens/tokens-dark.scsssrc/patternfly/base/tokens/tokens-default.scsssrc/patternfly/base/tokens/tokens-felt-dark.scsssrc/patternfly/base/tokens/tokens-felt-glass-dark.scsssrc/patternfly/base/tokens/tokens-felt-glass.scsssrc/patternfly/base/tokens/tokens-felt-highcontrast-dark.scsssrc/patternfly/base/tokens/tokens-felt-highcontrast.scsssrc/patternfly/base/tokens/tokens-felt.scsssrc/patternfly/base/tokens/tokens-glass-dark.scsssrc/patternfly/base/tokens/tokens-glass.scsssrc/patternfly/base/tokens/tokens-highcontrast-dark.scsssrc/patternfly/base/tokens/tokens-highcontrast.scsssrc/patternfly/base/tokens/tokens-palette.scss
| --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--clicked); | ||
| --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--default); | ||
| --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--hover); |
There was a problem hiding this comment.
Brand-accent aliases are wired to regular brand tokens instead of accent tokens.
The new semantic accent aliases currently resolve to regular brand colors, so accent-specific border/icon tokens downstream won’t render an actual accent variant.
Suggested fix
- --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--clicked);
- --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--default);
- --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--hover);
+ --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--dark--color--brand--accent--200);
+ --pf-t--global--color--brand--accent--default: var(--pf-t--global--dark--color--brand--accent--100);
+ --pf-t--global--color--brand--accent--hover: var(--pf-t--global--dark--color--brand--accent--200);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--clicked); | |
| --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--default); | |
| --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--hover); | |
| --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--dark--color--brand--accent--200); | |
| --pf-t--global--color--brand--accent--default: var(--pf-t--global--dark--color--brand--accent--100); | |
| --pf-t--global--color--brand--accent--hover: var(--pf-t--global--dark--color--brand--accent--200); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/patternfly/base/tokens/tokens-highcontrast-dark.scss` around lines 281 -
283, The three accent alias variables
(--pf-t--global--color--brand--accent--clicked,
--pf-t--global--color--brand--accent--default,
--pf-t--global--color--brand--accent--hover) are currently pointed at the
regular brand tokens; update their right-hand side to reference the actual
accent tokens so downstream accent borders/icons get the accent variants (for
example use the corresponding accent tokens such as
var(--pf-global--color--brand--accent--clicked),
var(--pf-global--color--brand--accent--default),
var(--pf-global--color--brand--accent--hover) instead of the non-accent brand
tokens).
| --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--clicked); | ||
| --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--default); | ||
| --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--hover); |
There was a problem hiding this comment.
Brand-accent semantic tokens are aliased to brand, not accent.
Lines 595-597 map accent states to regular brand states, which prevents accent-specific styling from taking effect for downstream accent border/icon tokens.
Suggested fix
- --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--clicked);
- --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--default);
- --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--hover);
+ --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--accent--200);
+ --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--accent--100);
+ --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--accent--200);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--clicked); | |
| --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--default); | |
| --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--hover); | |
| --pf-t--global--color--brand--accent--clicked: var(--pf-t--global--color--brand--accent--200); | |
| --pf-t--global--color--brand--accent--default: var(--pf-t--global--color--brand--accent--100); | |
| --pf-t--global--color--brand--accent--hover: var(--pf-t--global--color--brand--accent--200); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/patternfly/base/tokens/tokens-highcontrast.scss` around lines 595 - 597,
The three brand-accent semantic tokens
(--pf-t--global--color--brand--accent--clicked,
--pf-t--global--color--brand--accent--default,
--pf-t--global--color--brand--accent--hover) are incorrectly aliased to the
regular brand tokens; update each RHS to reference the corresponding accent
tokens (e.g. use --pf-t--global--color--accent--clicked,
--pf-t--global--color--accent--default, --pf-t--global--color--accent--hover) so
accent-specific styling propagates to downstream accent border/icon tokens.
jcmill
left a comment
There was a problem hiding this comment.
Looks like its mapped correctly.
lboehling
left a comment
There was a problem hiding this comment.
looks right to me! thank you for the quick fix!! 🪄
|
🎉 This PR is included in version 6.5.0-prerelease.93 🎉 The release is available on: Your semantic-release bot 📦🚀 |
fixes #8408
Looks like at some point we changed the directory structure of where the JSON exports from figma were stored in the design tokens repo, but our HC token config was not updated to look at the new structure and was looking at the old structure. This means we stopped getting updates to HC tokens from figma at that point, since new JSON exports from figma were stored in a different directory than our config referenced. Fixed that issue in patternfly/design-tokens#152
This PR consumes the SCSS generated from patternfly/design-tokens#152.
Also here are backstop tests. There are a lot of failures because it's probably bringing in all HC theme changes that were made since we introduced felt tokens 😲
Just spot checking, everything looks as expected. The main changes I saw were
Backstop reports:
Full reports - open the "html_report" dirs and open "index.html"
PDF reports - these just show errors.
Summary by CodeRabbit