sdds-platform-ai: Update theme#2884
Conversation
📝 WalkthroughWalkthroughUpdates the Changessdds_platform_ai Theme Token Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/plasma-tokens/data/themes/sdds_platform_ai.json (1)
1020-1030:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDisable inverse
textParagraphtokens too.The inverse text groups still omit
enabled: false, while the othertextParagraph*groups in this PR are disabled. If omittedenableddefaults to generated/enabled, inversetextParagraphtokens will survive even though the brand exports are being removed.Proposed fix
"textParagraphHover": { "value": "`#1717177A`", - "comment": "Инвертированный cплошной наборный текст" + "comment": "Инвертированный cплошной наборный текст", + "enabled": false }, "textParagraphActive": { "value": "`#171717A3`", - "comment": "Инвертированный cплошной наборный текст" + "comment": "Инвертированный cплошной наборный текст", + "enabled": false }, "textParagraph": { "value": "`#171717CC`", - "comment": "Инвертированный cплошной наборный текст" + "comment": "Инвертированный cплошной наборный текст", + "enabled": false },"textParagraphHover": { "value": "`#F5F5F57A`", - "comment": "Инвертированный cплошной наборный текст" + "comment": "Инвертированный cплошной наборный текст", + "enabled": false }, "textParagraphActive": { "value": "`#F5F5F5A3`", - "comment": "Инвертированный cплошной наборный текст" + "comment": "Инвертированный cплошной наборный текст", + "enabled": false }, "textParagraph": { "value": "`#F5F5F5CC`", - "comment": "Инвертированный cплошной наборный текст" + "comment": "Инвертированный cплошной наборный текст", + "enabled": false },Also applies to: 7123-7133
🤖 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 `@packages/plasma-tokens/data/themes/sdds_platform_ai.json` around lines 1020 - 1030, The inverse textParagraph tokens (textParagraphHover, textParagraphActive, and textParagraph) in the sdds_platform_ai.json theme file are missing the enabled: false property that has been added to other textParagraph groups in this PR. Add the property "enabled": false to each of these three inverse textParagraph token objects to ensure they are properly disabled and will not survive when the brand exports are removed.
🤖 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 `@packages/plasma-tokens/data/themes/sdds_platform_ai.json`:
- Around line 20-30: The textPrimaryHover and textPrimaryActive color values
across multiple locations in the sdds_platform_ai.json theme file have
insufficient contrast ratios against both light and dark backgrounds and do not
meet accessibility standards. In
packages/plasma-tokens/data/themes/sdds_platform_ai.json at lines 20-30
(textPrimaryHover and textPrimaryActive tokens), lines 344-354, lines 668-677,
lines 992-1001, lines 6439-6449, and lines 7087-7097, replace the current hex
color values with colors that maintain at least a 4.5:1 contrast ratio against
the theme's dark backgrounds (like `#171717`) and light backgrounds to ensure text
readability in hover and active states. Verify the new color values meet WCAG AA
contrast requirements before shipping.
---
Outside diff comments:
In `@packages/plasma-tokens/data/themes/sdds_platform_ai.json`:
- Around line 1020-1030: The inverse textParagraph tokens (textParagraphHover,
textParagraphActive, and textParagraph) in the sdds_platform_ai.json theme file
are missing the enabled: false property that has been added to other
textParagraph groups in this PR. Add the property "enabled": false to each of
these three inverse textParagraph token objects to ensure they are properly
disabled and will not survive when the brand exports are removed.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6a9aa4ba-4ded-4091-b1cf-e903a0520197
📒 Files selected for processing (4)
packages/plasma-tokens/data/themes/sdds_platform_ai.jsonpackages/plasma-tokens/src/brands/sdds_platform_ai/index.tspackages/plasma-tokens/src/themes/sdds_platform_ai__dark.tspackages/plasma-tokens/src/themes/sdds_platform_ai__light.ts
| "textPrimaryHover": { | ||
| "value": "#F5F5F593", | ||
| "value": "#7A7A7AFF", | ||
| "comment": "Основной цвет текста" | ||
| }, | ||
| "textPrimaryActive": { | ||
| "value": "#F5F5F5C4", | ||
| "comment": "Основной цвет текста" | ||
| }, | ||
| "textPrimary": { | ||
| "value": "#f5f5f5F5", | ||
| "value": "#5C5C5CFF", | ||
| "comment": "Основной цвет текста" | ||
| }, | ||
| "textPrimaryBrightness": { | ||
| "value": "#F6F6F6", | ||
| "value": "#FFFFFFFF", | ||
| "comment": "Основной цвет текста" |
There was a problem hiding this comment.
Recheck primary text hover/active contrast before shipping.
The new primary text state colors are too low-contrast for their target backgrounds: #5C5C5C/#7A7A7A on dark backgrounds like this theme’s #171717 background brightness fall below normal-text contrast, and #969696 on light backgrounds also falls below 4.5:1. Please use state colors that keep primary text readable in hover/active states.
Also applies to: 344-354, 668-677, 992-1001, 6439-6449, 7087-7097
🤖 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 `@packages/plasma-tokens/data/themes/sdds_platform_ai.json` around lines 20 -
30, The textPrimaryHover and textPrimaryActive color values across multiple
locations in the sdds_platform_ai.json theme file have insufficient contrast
ratios against both light and dark backgrounds and do not meet accessibility
standards. In packages/plasma-tokens/data/themes/sdds_platform_ai.json at lines
20-30 (textPrimaryHover and textPrimaryActive tokens), lines 344-354, lines
668-677, lines 992-1001, lines 6439-6449, and lines 7087-7097, replace the
current hex color values with colors that maintain at least a 4.5:1 contrast
ratio against the theme's dark backgrounds (like `#171717`) and light backgrounds
to ensure text readability in hover and active states. Verify the new color
values meet WCAG AA contrast requirements before shipping.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/themes/sdds-themes/src/css/sdds_platform_ai__light.css (1)
136-138:⚠️ Potential issue | 🟠 Major | ⚖️ Poor tradeoffIncomplete removal:
--inverse-text-paragraph*tokens should also be removed.The paragraph tokens were removed from
--text-paragraph*,--on-dark-text-paragraph*, and--on-light-text-paragraph*variants, but--inverse-text-paragraph*tokens remain at lines 136-138. This is inconsistent with the upstream source JSON, which setstextParagraphtokens to"enabled": false. All paragraph token variants should be removed to maintain data integrity across color modes.🗑️ Proposed fix to remove the remaining inverse paragraph tokens
--inverse-text-tertiary-hover: `#F5F5F5FF`; --inverse-text-tertiary-active: `#F5F5F556`; --inverse-text-tertiary: `#F5F5F548`; - --inverse-text-paragraph-hover: `#F5F5F57A`; - --inverse-text-paragraph-active: `#F5F5F5A3`; - --inverse-text-paragraph: `#F5F5F5CC`; --inverse-text-accent-hover: `#2BD44AFF`;🤖 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 `@packages/themes/sdds-themes/src/css/sdds_platform_ai__light.css` around lines 136 - 138, Remove the three CSS variable declarations for `--inverse-text-paragraph-hover`, `--inverse-text-paragraph-active`, and `--inverse-text-paragraph` from the CSS file to maintain consistency with the removal of paragraph tokens from other variants like `--text-paragraph*`, `--on-dark-text-paragraph*`, and `--on-light-text-paragraph*`. This aligns with the upstream source JSON configuration where textParagraph tokens are set to "enabled": false across all color modes.
🤖 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.
Outside diff comments:
In `@packages/themes/sdds-themes/src/css/sdds_platform_ai__light.css`:
- Around line 136-138: Remove the three CSS variable declarations for
`--inverse-text-paragraph-hover`, `--inverse-text-paragraph-active`, and
`--inverse-text-paragraph` from the CSS file to maintain consistency with the
removal of paragraph tokens from other variants like `--text-paragraph*`,
`--on-dark-text-paragraph*`, and `--on-light-text-paragraph*`. This aligns with
the upstream source JSON configuration where textParagraph tokens are set to
"enabled": false across all color modes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 80a7b582-5c25-4384-a630-f06a6cab5143
⛔ Files ignored due to path filters (10)
cypress/snapshots/platform-ai/chromium/Notification/Notification -- icon positions, show close icon.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/chromium/Notification/Notification -- long text, custom close icon.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/chromium/Notification/Notification -- placement bottom-left.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/chromium/Notification/Notification -- view=default, size=xs, layout=horizontal.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/chromium/TimePicker/TimePicker -- input time.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/webkit/Notification/Notification -- icon positions, show close icon.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/webkit/Notification/Notification -- long text, custom close icon.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/webkit/Notification/Notification -- placement bottom-left.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/webkit/Notification/Notification -- view=default, size=xs, layout=horizontal.snap.pngis excluded by!**/*.pngcypress/snapshots/platform-ai/webkit/Slider/Slider -- focus.snap.pngis excluded by!**/*.png
📒 Files selected for processing (6)
packages/themes/sdds-themes/src/css/sdds_platform_ai.module.csspackages/themes/sdds-themes/src/css/sdds_platform_ai__dark.csspackages/themes/sdds-themes/src/css/sdds_platform_ai__light.csspackages/themes/sdds-themes/src/themes/sdds_platform_ai__dark.tspackages/themes/sdds-themes/src/themes/sdds_platform_ai__light.tspackages/themes/sdds-themes/src/tokens/sdds_platform_ai/index.ts
✅ Files skipped from review due to trivial changes (3)
- packages/themes/sdds-themes/src/themes/sdds_platform_ai__light.ts
- packages/themes/sdds-themes/src/css/sdds_platform_ai.module.css
- packages/themes/sdds-themes/src/tokens/sdds_platform_ai/index.ts
SDDS-PLATFORM-AI
Theme
What/why changed
Summary by CodeRabbit
Release Notes
📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install @salutejs/plasma-asdk@0.381.0-canary.2884.27932274787.0 npm install @salutejs/plasma-b2c@1.623.0-canary.2884.27932274787.0 npm install @salutejs/plasma-core@1.230.0-canary.2884.27932274787.0 npm install @salutejs/plasma-giga@0.350.0-canary.2884.27932274787.0 npm install @salutejs/plasma-homeds@0.350.0-canary.2884.27932274787.0 npm install @salutejs/plasma-hope@1.377.0-canary.2884.27932274787.0 npm install @salutejs/plasma-new-hope@0.367.0-canary.2884.27932274787.0 npm install @salutejs/plasma-tokens@1.142.0-canary.2884.27932274787.0 npm install @salutejs/plasma-ui@1.353.0-canary.2884.27932274787.0 npm install @salutejs/plasma-web@1.625.0-canary.2884.27932274787.0 npm install @salutejs/sdds-bizcom@0.355.0-canary.2884.27932274787.0 npm install @salutejs/sdds-cs@0.359.0-canary.2884.27932274787.0 npm install @salutejs/sdds-dfa@0.353.0-canary.2884.27932274787.0 npm install @salutejs/sdds-finai@0.346.0-canary.2884.27932274787.0 npm install @salutejs/sdds-insol@0.350.0-canary.2884.27932274787.0 npm install @salutejs/sdds-netology@0.354.0-canary.2884.27932274787.0 npm install @salutejs/sdds-os@0.25.0-canary.2884.27932274787.0 npm install @salutejs/sdds-platform-ai@0.354.0-canary.2884.27932274787.0 npm install @salutejs/sdds-sbcom@0.355.0-canary.2884.27932274787.0 npm install @salutejs/sdds-scan@0.353.0-canary.2884.27932274787.0 npm install @salutejs/sdds-serv@0.354.0-canary.2884.27932274787.0 npm install @salutejs/sdds-themes@0.69.0-canary.2884.27932274787.0 npm install @salutejs/sdds-api-tests@0.12.0-canary.2884.27932274787.0 npm install @salutejs/plasma-cy-utils@0.160.0-canary.2884.27932274787.0 npm install @salutejs/plasma-sb-utils@0.231.0-canary.2884.27932274787.0 # or yarn add @salutejs/plasma-asdk@0.381.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-b2c@1.623.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-core@1.230.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-giga@0.350.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-homeds@0.350.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-hope@1.377.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-new-hope@0.367.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-tokens@1.142.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-ui@1.353.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-web@1.625.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-bizcom@0.355.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-cs@0.359.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-dfa@0.353.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-finai@0.346.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-insol@0.350.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-netology@0.354.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-os@0.25.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-platform-ai@0.354.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-sbcom@0.355.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-scan@0.353.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-serv@0.354.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-themes@0.69.0-canary.2884.27932274787.0 yarn add @salutejs/sdds-api-tests@0.12.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-cy-utils@0.160.0-canary.2884.27932274787.0 yarn add @salutejs/plasma-sb-utils@0.231.0-canary.2884.27932274787.0