Skip to content

refactor(styles): semantic colors on links - #8181

Merged
talissoncosta merged 3 commits into
mainfrom
refactor/link-colour-token
Aug 3, 2026
Merged

refactor(styles): semantic colors on links#8181
talissoncosta merged 3 commits into
mainfrom
refactor/link-colour-token

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #8180

In dark mode a link was #906af6 inside a list item, #6837fc elsewhere, and #e1e1e1 on hover. Every link colour now reads --color-text-action, and the .dark blocks that only restated a value are gone.

Light mode is unchanged. Dark settles on #906af6, already what list items used.

  • _buttons.scss: .btn-link base, hover, active. Dropped .dark .btn-link and the dark hover.
  • _list-item.scss: the two $primary400 rules and the icon fill.
  • _panel.scss: the !important override keeps !important, value only.

Leaves the global a rule alone. #1E0D26 / #e1e1e1 is body text, not a link colour.

Makes #8178 safe: .link and .btn-link then match by construction, so migrating a call site is not a visual change.

How did you test this code?

  • rspack build: compiles, 24 pre-existing bootstrap warnings.
  • Built CSS: .btn-link resolves to the token, nothing hardcodes the old dark purple.
  • Brace balance checked against main, since whole rules were deleted.

Dark mode is the whole risk and wants a visual regression run. One screen per rule is enough:

  • Audit Log — list item links, _list-item.scss
  • Integrations — the !important override, _panel.scss
  • Login — link-styled buttons, .btn-link base and hover

Watch for: links inside and outside a list item now matching, hover no longer going near-white, and light mode not moving.

Link colours were spread across five declarations and three SCSS variables,
and they disagreed. In dark mode a link was $primary400 (#906af6) inside a list
item, $primary (#6837fc) everywhere else, and $dark-highlight-color (#e1e1e1) on
hover, so the same element changed hue depending on where it sat and whether the
pointer was over it.

--color-text-action already carries both purples the codebase reaches for:
#6837fc in light, #906af6 in dark. Every link colour now reads from it, so the
.dark duplicates that existed only to restate a value are gone.

Light mode is unchanged. Dark mode settles on #906af6, which is what list items
already used and holds up better against a dark background than #6837fc.

This is the step that makes the Link component migration safe: .link and
.btn-link resolve to the same colour by construction, so moving a call site
between them is not a visual change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview Jul 31, 2026 1:35pm
flagsmith-frontend-staging Ready Ready Preview Jul 31, 2026 1:35pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jul 31, 2026 1:35pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f577721d-b836-4770-8637-73ece536c790

📥 Commits

Reviewing files that changed from the base of the PR and between 4576eb8 and 498633b.

📒 Files selected for processing (1)
  • frontend/web/styles/components/_panel.scss

📝 Walkthrough

Walkthrough

The stylesheet changes replace legacy Sass colour variables with --color-text-action for button-link states, list-item SVG paths, and dark-panel links. Dark-theme button-link colour overrides are removed.

Estimated code review effort: 1 (Trivial) | ~3 minutes


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Jul 31, 2026
@talissoncosta talissoncosta changed the title refactor(styles): standardise link colours on --color-text-action refactor(styles): semantic colors on links Jul 31, 2026
@talissoncosta
talissoncosta marked this pull request as ready for review July 31, 2026 13:16
@talissoncosta
talissoncosta requested a review from a team as a code owner July 31, 2026 13:16
@talissoncosta
talissoncosta requested review from Zaimwa9 and kyle-ssg and removed request for a team July 31, 2026 13:16
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-8181 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-8181 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-8181 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8181 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-8181 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-8181 Finished ✅ Results

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c7c2f764-c47d-435d-8cd4-08cf1b238407

📥 Commits

Reviewing files that changed from the base of the PR and between 10a3bb7 and 11a54b9.

📒 Files selected for processing (3)
  • frontend/web/styles/components/_list-item.scss
  • frontend/web/styles/components/_panel.scss
  • frontend/web/styles/project/_buttons.scss

Comment thread frontend/web/styles/components/_panel.scss
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-16 — run #18912 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  56.3 seconds
commit  498633b
info  🔄 Run: #18912 (attempt 1)

🗂️ Previous results
✅ oss · depot-ubuntu-latest-arm-16 — run #18912 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  45.7 seconds
commit  498633b
info  🔄 Run: #18912 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #18912 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  22 passed
skipped  1 skipped

Details

stats  23 tests across 18 suites
duration  1 minute, 20 seconds
commit  498633b
info  🔄 Run: #18912 (attempt 1)

Skipped tests

firefox › tests/onboarding-tests.pw.ts › Onboarding › New user connects via the single-page onboarding flow @oss

✅ private-cloud · depot-ubuntu-latest-16 — run #18911 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  49.2 seconds
commit  4576eb8
info  🔄 Run: #18911 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #18912 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.1 seconds
commit  498633b
info  🔄 Run: #18912 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #18911 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  38.2 seconds
commit  4576eb8
info  🔄 Run: #18911 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #18911 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  47.2 seconds
commit  4576eb8
info  🔄 Run: #18911 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #18911 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.2 seconds
commit  4576eb8
info  🔄 Run: #18911 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #18909 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  38.5 seconds
commit  11a54b9
info  🔄 Run: #18909 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #18909 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32.8 seconds
commit  11a54b9
info  🔄 Run: #18909 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #18909 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  45.1 seconds
commit  11a54b9
info  🔄 Run: #18909 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #18909 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  33.5 seconds
commit  11a54b9
info  🔄 Run: #18909 (attempt 1)

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

.dark .panel a:hover is also !important and one element more specific than
.dark .panel .btn-link, so a hovered link-styled anchor in a dark panel kept
going near-white. Spelling out :hover on the btn-link override outranks it.

List item links were already fine, .list-item:hover a carries an extra class.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 470722f5-2578-4c26-b6fa-851a7b41c271

📥 Commits

Reviewing files that changed from the base of the PR and between 11a54b9 and 4576eb8.

📒 Files selected for processing (1)
  • frontend/web/styles/components/_panel.scss

Comment thread frontend/web/styles/components/_panel.scss
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@Zaimwa9 Zaimwa9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@talissoncosta talissoncosta linked an issue Jul 31, 2026 that may be closed by this pull request
@talissoncosta
talissoncosta merged commit fce1bcd into main Aug 3, 2026
29 checks passed
@talissoncosta
talissoncosta deleted the refactor/link-colour-token branch August 3, 2026 11:43
talissoncosta added a commit that referenced this pull request Aug 3, 2026
btn-link now reads the same token, so dark no longer differs and .dark .btn-link
is gone. The .dark .link selector stays: body.dark a is untouched and still
outranks a bare .link.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front-end Issue related to the React Front End Dashboard refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardise Link on project Link: standardise colour and introduce the component

2 participants