Skip to content

Conversation

@noisysocks
Copy link
Contributor

@noisysocks noisysocks commented Dec 9, 2025

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1209121419454298/task/1210127348056256

Description

Based on #2085.

Swaps out the --ntp theme variables for their equivalent --ds theme variables (made available in #2085). This means that all components that are correctly using CSS variables for their colours will be coloured according to the theme variant sent by the browser.

Notes:

  • Some components use hardcoded colours. I considered auditing these but it’s a large task with a high chance of me making a mistake. I think a better approach is updating the --ntp theme variables and then fixing individual components that appear off during testing. Majority of the hardcoded colours are transparent whites and blacks which will work just fine in different theme variants.

  • I’m not feature flagging this change which means if C-S-S is updated then production users will get the updated palette for the default theme variant . Flagging is difficult and the differences are minor (e.g. different text / border opacities) so I think this is the right tradeoff. Non-default theme variants won’t be released to production users, these are feature flagged via the themeVariant setting.

Testing Steps

Test a few different UI configurations:

Plus whatever else you can think of.

Test different themeVariant params: default, coolGray, slateBlue, green, violet, rose, orange, desert.

Test light and dark mode (set &theme=dark).

Test that default variant (default) looks similar to how it did before.

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Replaces --ntp colors with --ds design system tokens across new tab and special pages, updates theme-variant mappings and defaults, and aligns tests and deps with the new palette.

  • Theming/Styles
    • Swap --ntp* variables to --ds-color-theme-* across NTP components and special pages (e.g., Activity*.module.css, App.module.css, ShowHide.module.css, NextSteps.module.css, Protections.module.css, Omnibar/*.module.css, SuggestionsList.module.css, TabSwitcher.module.css, PrivacyStats*.module.css, UpdateNotification.module.css, FreemiumPIRBanner.module.css, RemoteMessagingFramework.module.css).
    • Overhaul special-pages/pages/new-tab/app/styles/ntp-theme.css to define --ds token mappings for light/dark and all data-theme-variant values; set surface/canvas, control, accent, text/icon, shadow, and focus-ring variables.
    • Update background defaults and variant references in errorpage/index.css, history-theme.css, and special error variables.css to --ds-color-theme-*.
    • Set default surface-canvas colors and --ntp-surface-background-color based on --ds tokens.
    • Minor UI tweaks: change icon/text colors to --ds tokens; adjust hover/active fills to new control tokens.
  • App/Dev
    • Use customizerData() in Components.jsx for examples/demo data.
  • Tests
    • Update Playwright expectations for background colors to new --ds palette (e.g., default dark #1c1c1c, variant canvas colors).
  • Dependencies
    • Bump @duckduckgo/design-tokens to v0.2.0 in package-lock.json and special-pages/package.json.

Written by Cursor Bugbot for commit b98d206. This will update automatically on new commits. Configure here.

@noisysocks noisysocks requested review from a team, mgurgel and shakyShane as code owners December 9, 2025 04:41
@noisysocks noisysocks added the enhancement New feature or request label Dec 9, 2025
@noisysocks noisysocks marked this pull request as draft December 9, 2025 04:41
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

[Beta] Generated file diff

Time updated: Wed, 10 Dec 2025 00:43:54 GMT

Apple
    - apple/pages/errorpage/dist/index.css
  • apple/pages/errorpage/index.html
  • apple/pages/history/dist/index.css
  • apple/pages/new-tab/dist/index.css
  • apple/pages/new-tab/dist/index.js
  • apple/pages/release-notes/dist/index.css
  • apple/pages/special-error/dist/index.css
  • apple/pages/special-error/index.html

File has changed

Integration
    - integration/pages/errorpage/dist/index.css
  • integration/pages/example/dist/index.css
  • integration/pages/history/dist/index.css
  • integration/pages/new-tab/dist/index.css
  • integration/pages/new-tab/dist/index.js
  • integration/pages/release-notes/dist/index.css
  • integration/pages/special-error/dist/index.css

File has changed

Windows
    - windows/pages/history/dist/index.css
  • windows/pages/new-tab/dist/index.css
  • windows/pages/new-tab/dist/index.js
  • windows/pages/release-notes/dist/index.css
  • windows/pages/special-error/dist/index.css
  • windows/pages/special-error/index.html

File has changed

@noisysocks

This comment was marked as outdated.

@cursor

This comment was marked as outdated.

@cursor
Copy link

cursor bot commented Dec 9, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Base automatically changed from randerson/add-design-tokens to main December 9, 2025 10:06
@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit b98d206
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/6938c1ca8397ab000861d75e
😎 Deploy Preview https://deploy-preview-2095--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@noisysocks noisysocks force-pushed the randerson/new-tab-theme-styling branch from 3a1f53d to 57dccf3 Compare December 9, 2025 22:59
@noisysocks noisysocks marked this pull request as ready for review December 10, 2025 00:42
@noisysocks noisysocks mentioned this pull request Dec 10, 2025
8 tasks
@noisysocks
Copy link
Contributor Author

noisysocks commented Dec 10, 2025

Let’s merge #2096 first so that can be more confident about the changes to the default theme.

edit: did this locally, all good.

@noisysocks noisysocks added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit 791d0c2 Dec 10, 2025
25 checks passed
@noisysocks noisysocks deleted the randerson/new-tab-theme-styling branch December 10, 2025 08:49
@noisysocks noisysocks mentioned this pull request Dec 12, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants