Skip to content

refactor(styles): theme-adaptive shared code theme#8023

Open
talissoncosta wants to merge 9 commits into
mainfrom
refactor/hljs-theme-adaptive
Open

refactor(styles): theme-adaptive shared code theme#8023
talissoncosta wants to merge 9 commits into
mainfrom
refactor/hljs-theme-adaptive

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Reviewing this

Code snippets in the app (SDK examples, flag values) now switch with light/dark mode instead of always being light. Almost all of it is CSS in _tokens.scss + _hljs.scss; the other files just use it. The only fiddly part: making our colours win over the support-chat widget (Pylon), which injects its own code CSS, and only on deployed envs. The accordion header above code blocks is left unchanged.

Now also carries the rest of the code-snippet work (moved off #7989 plus Slack review feedback): markup tag colours, the corrected React snippet, and Copy Code no longer pasting < entities.

  • 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

Code snippets in the app (SDK examples, flag values, etc.) now follow light/dark mode instead of always being dark.

  • New --color-code-* colour tokens for syntax, separate from the UI text colours
  • Shared code styling now lives in one place; the onboarding card reuses it
  • Our colours override the support-chat widget's (Pylon) own code CSS, deployed envs only
  • Markup tag names render blue, not red (red reads as an error); the < > brackets stay grey, like an IDE
  • Corrected the React init snippet to use FlagsmithProvider + useFlags
  • Copy Code now copies real < >: snippet sources were pre-escaped HTML entities, so pasting into an editor produced &lt;FlagsmithProvider
  • Embedded code scrollbar only shows on overflow
  • Adds Storybook stories; removes dead variables.

How did you test this code?

Toggle light/dark and check code snippets are readable in both (not always dark):

  • Onboarding code cards - /getting-started ( behind ff - onboarding_quickstart_flow ); scrollbar only when the snippet overflows
  • A modal with a code example (e.g. Create Webhook)
  • Flag value editor (edit a feature's value)
  • An SDK snippet (CodeHelp, e.g. features page): React snippet reads FlagsmithProvider + useFlags; tag names blue, < > grey
  • Copy Code on the React snippet, paste into an editor: real < >, no &lt; entities
  • Accordion header above code blocks looks the same as before
  • On the deploy preview (not localhost): open the support chat, code colours still ours and nothing broken (Pylon only loads on deployed)

Optional (Storybook): from the frontend/ directory run npm run storybook (serves on http://localhost:6006), then check the Components/Highlight stories, both in light + dark.

Plus CI visual-regression (light + dark). lint + typecheck pass.

Screenshots

Before (dark) After (light) After (dark)
Onboarding card image image
Modal code image image image
Create/Edit feature modal image image image
SDK snippet (⚠️ after-shots predate the blue tag names + corrected React snippet, recapture pending) image image image

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard refactor labels Jul 15, 2026
@vercel

vercel Bot commented Jul 15, 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, Comment Jul 17, 2026 4:34pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jul 17, 2026 4:34pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jul 17, 2026 4:34pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a Storybook documentation page covering CodeHelp setup and embedded states, and fixes missing Button imports. Refactors Highlight to centralise raw HTML selection and escaping. Replaces hardcoded Highlight.js colours with design-system tokens and adds an embedded modifier. The onboarding code card now uses that modifier, while its local syntax-colour rules are removed.

Estimated code review effort: 4 (Complex) | ~45 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.

@talissoncosta
talissoncosta marked this pull request as ready for review July 15, 2026 18:52
@talissoncosta
talissoncosta requested a review from a team as a code owner July 15, 2026 18:52
@talissoncosta
talissoncosta requested review from kyle-ssg and removed request for a team July 15, 2026 18:52
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-8023 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-8023 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-8023 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-8023 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8023 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-8023 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: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 541e0da9-4ac1-4a1d-bfe5-aae4eb6f2199

📥 Commits

Reviewing files that changed from the base of the PR and between b51e6b7 and dba3f38.

📒 Files selected for processing (6)
  • frontend/documentation/pages/CodeHelp.stories.tsx
  • frontend/web/components/CodeHelp.tsx
  • frontend/web/components/Highlight.js
  • frontend/web/components/pages/onboarding/OnboardingConnectPanel/CodeCard.tsx
  • frontend/web/components/pages/onboarding/OnboardingConnectPanel/OnboardingConnectPanel.scss
  • frontend/web/styles/3rdParty/_hljs.scss

Comment thread frontend/web/components/CodeHelp.tsx Outdated
Comment thread frontend/web/components/Highlight.js
Comment thread frontend/web/styles/3rdParty/_hljs.scss Outdated
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  40.4 seconds
commit  dba3f38
info  🔄 Run: #18321 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 4 suites
duration  7.6 seconds
commit  dba3f38
info  🔄 Run: #18321 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 3 suites
duration  6.8 seconds
commit  dba3f38
info  🔄 Run: #18321 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 4 suites
duration  12.5 seconds
commit  dba3f38
info  🔄 Run: #18321 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 3 suites
duration  42.4 seconds
commit  b1c981e
info  🔄 Run: #18322 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 4 suites
duration  45.8 seconds
commit  b1c981e
info  🔄 Run: #18322 (attempt 1)

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

passed  6 passed

Details

stats  6 tests across 6 suites
duration  7.6 seconds
commit  b1c981e
info  🔄 Run: #18322 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 4 suites
duration  41.5 seconds
commit  b1c981e
info  🔄 Run: #18322 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.1 seconds
commit  aabba13
info  🔄 Run: #18349 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.9 seconds
commit  aabba13
info  🔄 Run: #18349 (attempt 1)

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

failed  1 failed

Details

stats  1 test across 1 suite
duration  12.4 seconds
commit  aabba13
info  📦 Artifacts: View test results and HTML report
🔄 Run: #18349 (attempt 1)

Failed tests

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.1 seconds
commit  168e086
info  🔄 Run: #18351 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  44.4 seconds
commit  168e086
info  🔄 Run: #18351 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 5 suites
duration  32.3 seconds
commit  168e086
info  🔄 Run: #18351 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  43.6 seconds
commit  168e086
info  🔄 Run: #18351 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.3 seconds
commit  a1a038c
info  🔄 Run: #18410 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  45.7 seconds
commit  a1a038c
info  🔄 Run: #18410 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  37.2 seconds
commit  a1a038c
info  🔄 Run: #18410 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  34.1 seconds
commit  a1a038c
info  🔄 Run: #18410 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.6 seconds
commit  ef3dd01
info  🔄 Run: #18411 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  47.2 seconds
commit  ef3dd01
info  🔄 Run: #18411 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32.1 seconds
commit  ef3dd01
info  🔄 Run: #18411 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  6.7 seconds
commit  ef3dd01
info  🔄 Run: #18411 (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  7c6e6cf
info  🔄 Run: #18412 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  45.2 seconds
commit  7c6e6cf
info  🔄 Run: #18412 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  7.2 seconds
commit  7c6e6cf
info  🔄 Run: #18412 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  6.5 seconds
commit  7c6e6cf
info  🔄 Run: #18412 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  35.2 seconds
commit  5523da5
info  🔄 Run: #18413 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  46 seconds
commit  5523da5
info  🔄 Run: #18413 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  46.1 seconds
commit  5523da5
info  🔄 Run: #18413 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 2 seconds
commit  5523da5
info  🔄 Run: #18413 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  33.3 seconds
commit  5cdcf2e
info  🔄 Run: #18415 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  44 seconds
commit  5cdcf2e
info  🔄 Run: #18415 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.4 seconds
commit  d7e582f
info  🔄 Run: #18416 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  38.8 seconds
commit  d7e582f
info  🔄 Run: #18416 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  34.2 seconds
commit  a0098b2
info  🔄 Run: #18417 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  44.6 seconds
commit  a0098b2
info  🔄 Run: #18417 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.8 seconds
commit  96dae5a
info  🔄 Run: #18418 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  4.2 seconds
commit  96dae5a
info  🔄 Run: #18418 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.1 seconds
commit  8a3ebce
info  🔄 Run: #18419 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  43.4 seconds
commit  8a3ebce
info  🔄 Run: #18419 (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  54c9106
info  🔄 Run: #18420 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  44.6 seconds
commit  54c9106
info  🔄 Run: #18420 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.2 seconds
commit  6f73568
info  🔄 Run: #18421 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  42.7 seconds
commit  6f73568
info  🔄 Run: #18421 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.7 seconds
commit  9355d1e
info  🔄 Run: #18423 (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  9355d1e
info  🔄 Run: #18423 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32 seconds
commit  9355d1e
info  🔄 Run: #18423 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 10 seconds
commit  9355d1e
info  🔄 Run: #18423 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.3 seconds
commit  67fac4d
info  🔄 Run: #18424 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  4.8 seconds
commit  ee08b16
info  🔄 Run: #18425 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  47.3 seconds
commit  67fac4d
info  🔄 Run: #18424 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  42.7 seconds
commit  ee08b16
info  🔄 Run: #18425 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  6.3 seconds
commit  ee08b16
info  🔄 Run: #18425 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  37.4 seconds
commit  ee08b16
info  🔄 Run: #18425 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  35.6 seconds
commit  67fac4d
info  🔄 Run: #18424 (attempt 1)

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

failed  2 failed

Details

stats  2 tests across 2 suites
duration  1 minute, 1 second
commit  67fac4d
info  📦 Artifacts: View test results and HTML report
🔄 Run: #18424 (attempt 1)

Failed tests

firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise
firefox › tests/project-permission-test.pw.ts › Project Permission Tests › Project-level permissions control access to features, environments, audit logs, and segments @enterprise

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  6.3 seconds
commit  abaf49d
info  🔄 Run: #18427 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.3 seconds
commit  abaf49d
info  🔄 Run: #18427 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 5 suites
duration  31.9 seconds
commit  abaf49d
info  🔄 Run: #18427 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  6.6 seconds
commit  abaf49d
info  🔄 Run: #18427 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.9 seconds
commit  de8ab3a
info  🔄 Run: #18429 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  42.6 seconds
commit  de8ab3a
info  🔄 Run: #18429 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32 seconds
commit  de8ab3a
info  🔄 Run: #18429 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  6.5 seconds
commit  de8ab3a
info  🔄 Run: #18429 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.1 seconds
commit  b43e6bd
info  🔄 Run: #18430 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  47.4 seconds
commit  b43e6bd
info  🔄 Run: #18430 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  37.3 seconds
commit  b43e6bd
info  🔄 Run: #18430 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  53.7 seconds
commit  b43e6bd
info  🔄 Run: #18430 (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  bd4c0c1
info  🔄 Run: #18434 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  6.6 seconds
commit  bd4c0c1
info  🔄 Run: #18434 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  56.4 seconds
commit  bd4c0c1
info  🔄 Run: #18434 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  1 minute, 1 second
commit  bd4c0c1
info  🔄 Run: #18434 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.2 seconds
commit  066b2f3
info  🔄 Run: #18435 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  7.5 seconds
commit  066b2f3
info  🔄 Run: #18435 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  31.5 seconds
commit  066b2f3
info  🔄 Run: #18435 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  59.8 seconds
commit  066b2f3
info  🔄 Run: #18435 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  7.3 seconds
commit  8c3aaec
info  🔄 Run: #18438 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  41.3 seconds
commit  8c3aaec
info  🔄 Run: #18438 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  6 seconds
commit  8c3aaec
info  🔄 Run: #18438 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 5 suites
duration  1 minute, 2 seconds
commit  8c3aaec
info  🔄 Run: #18438 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.9 seconds
commit  2b8c0b6
info  🔄 Run: #18439 (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  2b8c0b6
info  🔄 Run: #18439 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  12.8 seconds
commit  2b8c0b6
info  🔄 Run: #18439 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 3 seconds
commit  2b8c0b6
info  🔄 Run: #18439 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  42.4 seconds
commit  64027e3
info  🔄 Run: #18440 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  45.6 seconds
commit  64027e3
info  🔄 Run: #18440 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  32.3 seconds
commit  64027e3
info  🔄 Run: #18440 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  1 minute, 3 seconds
commit  64027e3
info  🔄 Run: #18440 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  37.4 seconds
commit  904981b
info  🔄 Run: #18443 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  54.1 seconds
commit  904981b
info  🔄 Run: #18443 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  6.9 seconds
commit  904981b
info  🔄 Run: #18443 (attempt 1)

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  7.7 seconds
commit  904981b
info  🔄 Run: #18443 (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  a1f42d2
info  🔄 Run: #18445 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.4 seconds
commit  a1f42d2
info  🔄 Run: #18445 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  32.2 seconds
commit  a1f42d2
info  🔄 Run: #18445 (attempt 1)

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

passed  5 passed

Details

stats  5 tests across 4 suites
duration  4.7 seconds
commit  a1f42d2
info  🔄 Run: #18445 (attempt 1)

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

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

@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

♻️ Duplicate comments (2)
frontend/web/components/Highlight.js (1)

3-3: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use the permitted component import path.

Relative import still present; this was already flagged in a prior review round.

Proposed fix
-import Button from './base/forms/Button'
+import Button from 'components/base/forms/Button'

As per coding guidelines, "Use only common/, components/, and project/ import paths; do not use relative imports."

Source: Coding guidelines

frontend/web/styles/3rdParty/_hljs.scss (1)

86-86: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Restore stylelint blank-line-before-comment compliance.

Still failing scss/double-slash-comment-empty-line-before at all three sites from the previous round.

Proposed fix
   padding: 0.5em;
+
   // Theme-adaptive surface: light in light mode, dark in dark, via tokens.
   padding: 18px;
+
   // Unmapped tokens inherit the base colour instead of the highlight.js greys;
   border-radius: 0;
+
   // Reserve the scrollbar gutter so hover doesn't shift layout; !important

Also applies to: 183-183, 290-290

Source: Linters/SAST tools


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 80921548-b746-48c3-b290-c6e8aca8b379

📥 Commits

Reviewing files that changed from the base of the PR and between dba3f38 and b1c981e.

📒 Files selected for processing (6)
  • frontend/documentation/pages/CodeHelp.stories.tsx
  • frontend/web/components/CodeHelp.tsx
  • frontend/web/components/Highlight.js
  • frontend/web/components/pages/onboarding/OnboardingConnectPanel/CodeCard.tsx
  • frontend/web/components/pages/onboarding/OnboardingConnectPanel/OnboardingConnectPanel.scss
  • frontend/web/styles/3rdParty/_hljs.scss

Comment thread frontend/web/styles/3rdParty/_hljs.scss

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/web/styles/3rdParty/_hljs.scss (1)

297-302: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Avoid forcing the scrollbar on non-hover states

overflow-x: scroll plus the unqualified ::-webkit-scrollbar rule keeps the bar visible even when the code fits. Use overflow-x: auto, add scrollbar-gutter: stable, and limit display: block !important to the :hover selector.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1505510c-624e-4fc5-8983-04c18188aa43

📥 Commits

Reviewing files that changed from the base of the PR and between b1c981e and aabba13.

📒 Files selected for processing (1)
  • frontend/web/styles/3rdParty/_hljs.scss

talissoncosta

This comment was marked as outdated.

@talissoncosta talissoncosta left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Self-review notes to speed this up.

</tr>
</tbody>
</table>
<h3>Colour: code</h3>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is just documentation

@talissoncosta talissoncosta left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Self-review notes to speed this up.

// Redefine Pylon's --hljs-* vars to our code tokens so its injected rules
// paint our theme (belt-and-braces with the palette specificity below).
--hljs-bg: var(--color-surface-subtle);
--hljs-text: var(--color-code-text);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Pylon (the support-chat widget) ships its own code-colour CSS that would override ours. These lines point its colour variables at our palette, so code stays on our theme. Only happens on deployed envs where Pylon loads.

}
// Nested under .hljs (0,2,0) to out-specify Pylon's global token rules
// (0,1,0). The catch-all sends unmapped tokens to base; groups re-colour.
[class*='hljs-'] {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Pylon's rules and ours style the same elements; nesting ours here makes the browser prefer ours. The first rule resets any token we don't explicitly colour back to the base text colour.


// The value to render before escaping: the live edit while focused, the
// current value when there's content, otherwise a disabled/empty placeholder.
getRawHtml = () => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Pure refactor of an old nested ternary, no behaviour change.

talissoncosta and others added 6 commits July 17, 2026 11:15
New --color-code-* semantic family for highlight.js syntax, mapped to the
nearest palette primitives (light in :root, lighter in .dark). Added to
tokens.json (source of truth) and regenerated; registered in the Semantic
Colour Tokens story so it shows the group.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Point the shared .hljs palette (and the Pylon --hljs-* var-feed) at the
--color-code-* tokens so code blocks follow light/dark. Add .hljs--embedded
for containers that own their surface (onboarding's CodeCard opts in via
Highlight's embedded prop and drops its bespoke palette) and a theme-adaptive
scrollbar. Nest the palette under .hljs to out-specify Pylon's injected rules.
Drop the dead $code-color/$code-bg vars and the legacy .yaml override. Header
chrome untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…awHtml

Add an `embedded` boolean prop that applies the .hljs--embedded modifier,
instead of callers concatenating the class into the language string. Import
Button (via the components/ alias) instead of the global, since the Highlight
story renders it and Storybook doesn't stub the global. Extract the nested
raw-html ternary into a getRawHtml method. No behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cover the code wrapper across languages plus the embedded variant. Stub the
isMobile global so components that read it render in Storybook.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review (Kyle): red tag names read as errors. Tags now render like an IDE:
grey angle brackets (base text via the catch-all), blue tag name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Covers markup tags inside JavaScript, mirroring the React code-help
snippet, so the tag colour renders in Chromatic.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
talissoncosta and others added 3 commits July 17, 2026 13:29
The shared React init snippet was two files mashed into one - two 'export
default function' (App and HomePage, invalid JS), duplicate imports, an unused
useFlagsmith import, and an App that never rendered HomePage. Make it one
coherent example: a named HomePage using useFlags, rendered inside the default
App wrapped in FlagsmithProvider. Shared via codeHelp.INIT, so this fixes the
snippet app-wide, including the onboarding wire step.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ports the onboarding code-card fix (was on #7989) to the shared embedded
variant: overflow-x auto instead of a permanently reserved gutter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Snippet sources were pre-escaped (&lt; &gt;) because CodeHelp rendered
them as raw HTML via preventEscape, so Copy Code shipped the entities
to the clipboard. Store plain < > and let Highlight's default escaping
handle rendering, like the onboarding code card already does.
preventEscape now has no users, so the prop is gone.

Co-Authored-By: Claude Fable 5 <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.

1 participant