Repository navigation
Remove note feedback color and use its blue for info (#792) - #800
Conversation
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the feedback-color consolidation from note to info.
No open issues 🎉
What changed in this PR
Consolidates informative feedback colors by removing note and assigning its blue (#007bff) to info, as requested in #792. This is a breaking change: consumers must migrate note props, tokens, and utilities to their info equivalents.
Changes:
- Remove
notefrom shared types, theme tokens, CSS utilities, and color-class handling. - Make
infothe default for Alert and Badge while preserving link colors through separate$linkconstants. - Update documentation examples and remove the shared
notetest case.
| File | Description |
|---|---|
| tests/playwright/propTests/feedbackColorPropTest.ts | Remove the note color test case. |
| src/types/colors.ts | Remove note from FeedbackColor. |
| src/theme.scss | Remove note tokens and use independent link constants. |
| src/styles/theme-constants/_colors.scss | Set info to blue and define link constants. |
| src/styles/settings/_utilities.scss | Remove text-note and bg-note utilities. |
| src/styles/settings/_collections.scss | Remove note from the feedback collection. |
| src/docs/foundation/colors.md | Explain info and help; remove note swatches. |
| src/docs/foundation/collections.md | Update available feedback colors. |
| src/docs/css-helpers/colors.md | Remove note utility examples. |
| src/components/Modal/README.md | Remove the note demo option. |
| src/components/Card/README.md | Remove the note card example. |
| src/components/Button/README.md | Remove note button examples. |
| src/components/Badge/README.md | Show info as the default badge color. |
| src/components/Badge/Badge.tsx | Default Badge to info. |
| src/components/Alert/README.md | Document the default info alert. |
| src/components/Alert/Alert.tsx | Default Alert to info. |
| src/components/_helpers/getRootColorClassName.ts | Remove note class resolution. |
Review effort: Balanced
bedrich-schindler
left a comment
There was a problem hiding this comment.
1. Leftover note snapshot
src/components/Alert/__tests__/Alert.spec.tsx-snapshots/Alert-visual-color-note-1-chromium-linux.png is still in the repo. It uses the old naming (color-note, without string) and no test produces it, so CI doesn't flag it. Please delete it so no note is left. The other five orphans with the same old naming, Alert-visual-color-{danger,dark,help,info,warning}-1, could go too, here or in a separate PR.
2. Migration notes miss some removed tokens
The globs in the Migration section don't match every removed custom property:
--rui-color-feedback-note*doesn't cover--rui-color-feedback-on-note.--rui-<Component>--note*doesn't cover--rui-Badge--filled--note__*,--rui-Badge--outline--note__coloror--rui-Button--<priority>--note--<state>__*.
A downstream theme that overrides these would silently stop applying. Maybe list them as --rui-color-feedback-*note* and --rui-<Component>--*note*, or name them explicitly.
|
@bedrich-schindler Thanks, both are addressed:
|
`note` and `info` both stood for informative feedback. `info` now takes the blue of `note` and becomes the default color of `Alert` and `Badge`. Migration: - Replace `note` with `info` in the `color` prop. It looks the same in the default theme. - Replace `--rui-color-feedback-*note*`, `--rui-color-background-note`, `--rui-<Component>--*note*`, `.text-note` and `.bg-note` with their `info` equivalents. - Existing `info` usages change from teal to blue.
No test produces them. The current ones are named `color-string-*`.
def1083 to
a86366f
Compare
noteandinfoboth stood for informative feedback. Removenoteand giveinfoits blue (#007bff). This is a breaking change.Closes #792
Changes
notefromFeedbackColor, thenotetheme tokens and$note*constants, and thetext-noteandbg-noteutilities.$infoto#007bff.infois now the default color ofAlertandBadge.$linkconstant instead of$note.infoandhelpin Foundation › Colors.infosnapshots, and removenotetests and snapshots.Alertcolor snapshots.Migration
notewithinfoin thecolorprop. In the default theme it looks the same.--rui-color-feedback-*note*,--rui-color-background-note,--rui-<Component>--*note*,.text-noteand.bg-notewith theirinfoequivalents.infousages change from teal (#17a2b8) to blue (#007bff).Testing
npm run build,npm run lint,npm run test:jest,npm run test:playwrightandmkdocs buildpass.Review notes
infonow shares#007bffwithselectedand links. This is intended per Removenotefeedback color #792.#007bffhas a contrast ratio of about 4.0:1, below WCAG AA for small text. This affects filledinfoBadge and Button.