Skip to content

chore(ui): add light mode to code elements - #9031

Open
avivkeller wants to merge 4 commits into
mainfrom
light-mode
Open

chore(ui): add light mode to code elements#9031
avivkeller wants to merge 4 commits into
mainfrom
light-mode

Conversation

@avivkeller

@avivkeller avivkeller commented Jul 28, 2026

Copy link
Copy Markdown
Member

Fixes nodejs/doc-kit#940 by using github-light when light mode is selected

image

Copilot AI review requested due to automatic review settings July 28, 2026 22:44
@avivkeller
avivkeller requested a review from a team as a code owner July 28, 2026 22:44

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Jul 29, 2026 6:26pm

Request Review

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Theming and presentation changes only; highlighter behavior for custom themes is preserved and coverage is added for dual-theme options.

Overview
Code syntax highlighting now uses Shiki’s dual-theme output: GitHub Light Default as the inline default and the existing Nord palette (with the same comment contrast tweak) as dark, with defaultColor: 'light'. Custom theme/themes in highlighter options are left unchanged.

New CSS applies the dark token palette when [data-theme='dark'] is set (including spans without a .shiki wrapper). Twoslash popup code blocks get light neutrals by default and revert to the previous dark styling under dark theme.

UI around code (BaseCodeBox, CodeTabs, neutral BaseButton) switches from dark-only surfaces to light defaults (white/light neutrals) with dark: variants so chrome matches site light mode while dark mode behavior is preserved.

Reviewed by Cursor Bugbot for commit 017f4ad. Bugbot is set up for automated code reviews on this repo. Configure here.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.09%. Comparing base (c086c54) to head (017f4ad).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/rehype-shiki/src/highlighter.mjs 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9031      +/-   ##
==========================================
- Coverage   75.10%   75.09%   -0.01%     
==========================================
  Files         102      102              
  Lines        9109     9124      +15     
  Branches      372      375       +3     
==========================================
+ Hits         6841     6852      +11     
- Misses       2264     2268       +4     
  Partials        4        4              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI review requested due to automatic review settings July 28, 2026 22:49

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total First Load JS 10.65 MB
New Total First Load JS 10.71 MB
Delta 61.38 KB (+0.56%)

Changes

🔄 Modified Routes (4)
Route Old First Load JS New First Load JS Delta
/[locale] 2.54 MB 2.56 MB 📈 15.35 KB (+0.59%)
/[locale]/[...path] 2.54 MB 2.56 MB 📈 15.35 KB (+0.59%)
/[locale]/blog/[...path] 2.54 MB 2.56 MB 📈 15.35 KB (+0.59%)
/[locale]/download/archive/[version] 2.54 MB 2.56 MB 📈 15.35 KB (+0.59%)

@AugustinMauroy AugustinMauroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

WOW I love it. download page is much more easier to read for me.

@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Jul 29, 2026
@github-actions github-actions Bot removed the github_actions:pull-request Trigger Pull Request Checks label Jul 29, 2026
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 98 🟢 93 🟢 96 🟢 100 🔗
/en/about 🟢 99 🟢 94 🟢 96 🟠 88 🔗
/en/about/previous-releases 🟢 97 🟢 97 🟢 96 🟢 100 🔗
/en/download 🟢 99 🟢 96 🟠 78 🟢 100 🔗
/en/download/archive/current 🟢 100 🟢 97 🟢 96 🟢 100 🔗
/en/blog 🟢 100 🟢 97 🟢 96 🟢 100 🔗

@ovflowd

ovflowd commented Jul 29, 2026

Copy link
Copy Markdown
Member

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 99 🟠 89 🟢 96 🟢 100 🔗
/en/about 🟢 100 🟢 90 🟢 96 🟠 88 🔗
/en/about/previous-releases 🟢 99 🟢 97 🟢 96 🟢 100 🔗
/en/download 🟢 100 🟢 92 🟠 81 🟢 100 🔗
/en/download/archive/current 🟢 99 🟢 97 🟢 96 🟢 100 🔗
/en/blog 🟢 99 🟢 97 🟢 96 🟢 100 🔗

Accessbility scores went down?

Copilot AI review requested due to automatic review settings July 29, 2026 18:19

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@avivkeller

Copy link
Copy Markdown
Member Author

@ovflowd Fixed! (github-light -> github-light-default)

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f35a334. Configure here.

Comment thread .changeset/young-breads-fall.md
Signed-off-by: Aviv Keller <me@aviv.sh>
Copilot AI review requested due to automatic review settings July 29, 2026 18:25

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback: Colour contrast used for function parameter type names is too harsh

5 participants