Skip to content

NTP: Restyle Customize drawer behind rebrand flag - #2890

Open
borgateo wants to merge 4 commits into
mainfrom
matteo/rebrand/ntp-settings-sidebar
Open

NTP: Restyle Customize drawer behind rebrand flag#2890
borgateo wants to merge 4 commits into
mainfrom
matteo/rebrand/ntp-settings-sidebar

Conversation

@borgateo

@borgateo borgateo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Asana Task/Github Issue:

Description

Restyle the New Tab Customize button and drawer (shell, Theme segmented control, Background tiles, Sections rows + Windows switches, footer spacing) to match Desktop Components, gated behind newTabPageRebranding / body[data-rebrand="true"]. FF-off styles remain unchanged.

Testing Steps

  • Open NTP locally with ?rebrand=enabled&autoOpen=true&themeVariant=default
  • Compare Customize button (long + short <800px) and drawer vs Desktop Components (Mac)
  • Repeat with &platform=windows and confirm Windows switch size/thumb + Customize button fill states
  • Confirm ?rebrand=disabled (or omit rebrand) keeps the previous Customize button/drawer look

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

Made with Cursor

borgateo and others added 2 commits July 22, 2026 13:01
Update long/short variants to match Desktop Components, with Mac/Windows control-fill states.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align shell spacing, Theme/Background/Sections, Windows switches, and footer gap with Desktop Components while keeping FF-off unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Build Branch

Branch pr-releases/matteo/rebrand/ntp-settings-sidebar
Commit 98c2cc74e9
Updated July 28, 2026 at 12:43:26 AM UTC

Static preview entry points

QR codes (mobile preview)
Entry point QR code
Docs QR for docs preview
Static pages QR for static pages preview
Integration pages QR for integration pages preview

Integration commands

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#pr-releases/matteo/rebrand/ntp-settings-sidebar

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/matteo/rebrand/ntp-settings-sidebar")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/matteo/rebrand/ntp-settings-sidebar
git -C submodules/content-scope-scripts checkout origin/pr-releases/matteo/rebrand/ntp-settings-sidebar
Pin to exact commit

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#98c2cc74e9c475bfc842d8166c34cb514625b969

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "98c2cc74e9c475bfc842d8166c34cb514625b969")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/matteo/rebrand/ntp-settings-sidebar
git -C submodules/content-scope-scripts checkout 98c2cc74e9c475bfc842d8166c34cb514625b969

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

Stale comment

Injected PR Evaluation: Web Compatibility & Security

PR: NTP: Restyle Customize drawer behind rebrand flag (c5b51e53)
Scope: 6 CSS files (+191 lines) in special-pages/ only. No injected/, messaging/, or runtime JavaScript changes.


Web Compatibility Assessment

File Lines Severity Finding
All changed files info Changes are CSS-only in the embedded NTP special-page, not injected into third-party pages. Standard injected web-compat categories (API fidelity, prototype chain, DOM timing, platform API shims) do not apply.
Customizer.module.css, CustomizerDrawerInner.module.css, ThemeSection.module.css, VisibilityMenu.module.css 46–338 info All visual overrides are gated behind [data-rebrand="true"], driven by newTabPageRebranding (default disabled) → body[data-rebrand] in index.js. Legacy layout preserved when flag is off.
ntp-theme.css 44–47 info Rebrand-only drawer width bump (256px264px for theme-variant drawers). Layout change is scoped to rebrand; no viewport <meta> manipulation.
Customizer.module.css 47 info backdrop-filter: none on the customize button removes blur in rebrand mode — visual-only; no functional regression expected.
ThemeSection.module.css 121–131 info macOS-only inset box-shadow on selected segmented-control segment — platform-scoped, rebrand-only.
Switch.module.css (shared) 100–110, 233–235 info Windows medium switch sizing recolored under :global([data-rebrand="true"]). Only activates when an ancestor sets data-rebrand (currently NTP-only via installGlobalSideEffects). Onboarding/omnibar switches unaffected unless those pages adopt the same flag.
Customizer integration tests info Existing customizer.spec.js suite runs with rebrand off by default. No rebrand-on visual/integration coverage for drawer restyle.

No warnings or errors identified.


Security Assessment

File Lines Severity Finding
All changed files info No changes to captured-globals.js, message bridge, messaging transports, postMessage, config parsing, or load()-time code.
All changed files info CSS uses static design-token variables only — no page-derived values interpolated into styles, no url() with user data, no dynamic code execution.
All changed files info Feature is remotely disableable via existing newTabPageRebranding setting; no new un-gated functionality.

No warnings, errors, or critical findings identified.


Risk Level

Low Risk — CSS-only NTP customizer restyle behind an existing remote-config feature flag; no injected runtime, API overrides, or messaging surface changes.


Recommendations

  1. (info) Manually QA the Customize drawer with newTabPageRebranding enabled on Windows, macOS, iOS, and Android — especially drawer width, background-panel selection ring (::after pseudo-element), and Windows medium switches in VisibilityMenu.
  2. (info) Consider a lightweight integration test opening the customizer with rebrand: 'enabled' mock param (pattern from new-tab.spec.js) to guard against accidental selector regressions.
  3. (info) If other special-pages adopt data-rebrand in future, the shared Switch.module.css Windows-medium overrides will apply there too — document or scope further if that becomes a concern.
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

@github-actions github-actions Bot added the semver-minor New feature — triggers minor version bump label Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[Beta] Generated file diff

Time updated: Tue, 28 Jul 2026 00:44:05 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/onboarding/dist/index.css
  • 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/onboarding/dist/index.css
  • 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/onboarding/dist/index.css
  • windows/pages/release-notes/dist/index.css
  • windows/pages/special-error/dist/index.css
  • windows/pages/special-error/index.html

File has changed

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Cursor assessed this PR as unknown Risk (only Low Risk is auto-approved).

This PR requires a manual review and approval from a member of one of the following teams:

  • @duckduckgo/content-scope-scripts-owners
  • @duckduckgo/apple-devs
  • @duckduckgo/android-devs
  • @duckduckgo/team-windows-development
  • @duckduckgo/extension-owners
  • @duckduckgo/config-aor
  • @duckduckgo/breakage-aor
  • @duckduckgo/breakage

@borgateo borgateo self-assigned this Jul 27, 2026
@borgateo
borgateo requested a review from vkraucunas July 27, 2026 21:33
…e rebrand

Co-authored-by: Cursor <cursoragent@cursor.com>
@borgateo
borgateo requested review from a team and daxtheduck as code owners July 27, 2026 21:41

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

Stale comment

Injected PR Evaluation: Web Compatibility & Security

PR: NTP: Restyle Customize drawer behind rebrand flag (c103d9f4)
Scope: 6 CSS files + design-tokens bump (v0.30.0v0.33.0) in special-pages/ only. No injected/, messaging/, or runtime JavaScript changes.

Re-assessed after synchronize; latest commit adds design-tokens bump and space-token refactors.


Web Compatibility Assessment

File Lines Severity Finding
All changed files info CSS-only changes in the embedded NTP special-page, not injected into third-party pages. Standard injected web-compat categories (API fidelity, prototype chain, DOM timing, platform API shims) do not apply.
Customizer.module.css, CustomizerDrawerInner.module.css, ThemeSection.module.css, VisibilityMenu.module.css 46–338 info Visual overrides gated behind [data-rebrand="true"], driven by newTabPageRebranding (default disabled) → body[data-rebrand] in index.js. Legacy layout preserved when flag is off.
ntp-theme.css 44–47 info Rebrand-only drawer width bump (256px264px for theme-variant drawers). Layout change scoped to rebrand; no viewport <meta> manipulation.
Customizer.module.css 47 info backdrop-filter: none on the customize button removes blur in rebrand mode — visual-only.
ThemeSection.module.css 121–131 info macOS-only inset box-shadow on selected segmented-control segment — platform-scoped, rebrand-only.
ThemeSection.module.css 141–142 info .variantButton selection-ring vars moved from hard-coded 2px to var(--ds-space-x-5) outside the rebrand block, so legacy UI is affected too. Value is equivalent (--ds-space-x-5: 2px in v0.33.0) — refactor only, not a visual regression.
Switch.module.css (shared) 100–110, 233–235 info Windows medium switch sizing recolored under :global([data-rebrand="true"]). Only activates when an ancestor sets data-rebrand (currently NTP-only). Onboarding/omnibar switches unaffected unless those pages adopt the flag.
package.json / package-lock.json 31 warning design-tokens v0.30.0v0.33.0 removes --ds-color-palette-* tokens. onboarding/.../ComparisonTable.module.css:119 still references --ds-color-palette-red-50 — unrelated to this PR's CSS but now unresolved at build time (CSS silently drops). Consider fixing in a companion PR or rebasing onto a palette-token migration.
Customizer integration tests info Existing customizer.spec.js suite runs with rebrand off by default. No rebrand-on visual/integration coverage for drawer restyle.

No errors identified.


Security Assessment

File Lines Severity Finding
All changed files info No changes to captured-globals.js, message bridge, messaging transports, postMessage, config parsing, or load()-time code.
All changed files info CSS uses static design-token variables only — no page-derived values interpolated into styles, no url() with user data, no dynamic code execution.
All changed files info Feature is remotely disableable via existing newTabPageRebranding setting; no new un-gated functionality.
package.json 31 info design-tokens is a devDependency used at build time for CSS token resolution — no runtime injection surface.

No warnings, errors, or critical findings identified.


Risk Level

Low Risk — CSS-only NTP customizer restyle behind an existing remote-config feature flag, plus a devDependency token bump; no injected runtime, API overrides, or messaging surface changes.


Recommendations

  1. (warning) Address the removed --ds-color-palette-red-50 reference in ComparisonTable.module.css before or alongside the design-tokens v0.33.0 bump (migrate to a theme token or local variable).
  2. (info) Manually QA the Customize drawer with newTabPageRebranding enabled on Windows, macOS, iOS, and Android — especially drawer width, background-panel selection ring (::after pseudo-element), and Windows medium switches in VisibilityMenu.
  3. (info) Consider a lightweight integration test opening the customizer with rebrand: 'enabled' mock param (pattern from new-tab.spec.js) to guard against accidental selector regressions.
  4. (info) If other special-pages adopt data-rebrand in future, the shared Switch.module.css Windows-medium overrides will apply there too — document or scope further if that becomes a concern.
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

Comment thread special-pages/package.json

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

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

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit c103d9f. Configure here.

--selection-ring-offset: 2px;
--selection-ring-width: 2px;
--selection-ring-offset: var(--ds-space-x-5);
--selection-ring-width: var(--ds-space-x-5);

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.

Non-gated token change affects all users' selection ring

Low Severity

The --selection-ring-offset and --selection-ring-width in the base .variantButton rule are changed from hardcoded 2px to var(--ds-space-x-5) without being gated behind [data-rebrand="true"]. This affects non-rebrand users. The equivalent change in CustomizerDrawerInner.module.css (line 312-313) is properly inside a [data-rebrand="true"] block. If --ds-space-x-5 is undefined or resolves to a value other than 2px, the theme variant selection ring breaks for all users. A fallback like var(--ds-space-x-5, 2px) would make this safe regardless of token availability.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c103d9f. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

Injected PR Evaluation: Web Compatibility & Security

PR: NTP: Restyle Customize drawer behind rebrand flag (3da8c5ef)
Scope: 7 CSS files + design-tokens bump (v0.30.0v0.33.0) in special-pages/ only. No injected/, messaging/, or runtime JavaScript changes.

Re-assessed after synchronize; latest commit 3da8c5ef hardcodes the DDG icon color in onboarding after palette-token removal.


Web Compatibility Assessment

File Lines Severity Finding
All changed files info CSS-only changes in the embedded NTP special-page, not injected into third-party pages. Standard injected web-compat categories (API fidelity, prototype chain, DOM timing, platform API shims) do not apply.
Customizer.module.css, CustomizerDrawerInner.module.css, ThemeSection.module.css, VisibilityMenu.module.css 46–338 info Visual overrides gated behind [data-rebrand="true"], driven by newTabPageRebranding (default disabled) → body[data-rebrand] in index.js. Legacy layout preserved when flag is off.
ntp-theme.css 44–47 info Rebrand-only drawer width bump (256px264px for theme-variant drawers). Layout change scoped to rebrand; no viewport <meta> manipulation.
Customizer.module.css 47 info backdrop-filter: none on the customize button removes blur in rebrand mode — visual-only.
ThemeSection.module.css 121–131 info macOS-only inset box-shadow on selected segmented-control segment — platform-scoped, rebrand-only.
ThemeSection.module.css 141–142 info .variantButton selection-ring vars moved from hard-coded 2px to var(--ds-space-x-5) outside the rebrand block, so legacy UI is affected too. Value is equivalent (--ds-space-x-5: 2px in v0.33.0) — refactor only, not a visual regression.
Switch.module.css (shared) 100–110, 233–235 info Windows medium switch sizing recolored under :global([data-rebrand="true"]). Only activates when an ancestor sets data-rebrand (currently NTP-only).
ComparisonTable.module.css 118–122 info Collateral design-tokens bump: --ds-color-palette-red-50 replaced with hardcoded #de5833 and explanatory comment. Restores onboarding DDG icon background after palette removal in v0.31+.
Customizer integration tests info Existing customizer.spec.js suite runs with rebrand off by default. No rebrand-on visual/integration coverage for drawer restyle.

No errors identified.


Security Assessment

File Lines Severity Finding
All changed files info No changes to captured-globals.js, message bridge, messaging transports, postMessage, config parsing, or load()-time code.
All changed files info CSS uses static design-token variables and a hardcoded hex color — no page-derived values interpolated into styles, no url() with user data, no dynamic code execution.
All changed files info Feature is remotely disableable via existing newTabPageRebranding setting; no new un-gated functionality.
package.json 31 info design-tokens is a devDependency used at build time for CSS token resolution — no runtime injection surface.

No warnings, errors, or critical findings identified.


Risk Level

Low Risk — CSS-only NTP customizer restyle behind an existing remote-config feature flag, plus a devDependency token bump with collateral onboarding fix; no injected runtime, API overrides, or messaging surface changes.


Recommendations

  1. (info) Manually QA the Customize drawer with newTabPageRebranding enabled on Windows, macOS, iOS, and Android — especially drawer width, background-panel selection ring (::after pseudo-element), and Windows medium switches in VisibilityMenu.
  2. (info) Consider a lightweight integration test opening the customizer with rebrand: 'enabled' mock param (pattern from new-tab.spec.js) to guard against accidental selector regressions.
  3. (info) If other special-pages adopt data-rebrand in future, the shared Switch.module.css Windows-medium overrides will apply there too — document or scope further if that becomes a concern.
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

/* Hardcoded: --ds-color-palette-red-50 (legacy SERP palette) is no longer exported
by design-tokens desktop-browsers build (v0.31+). No current token matches this
exact value (closest is Mandarin 50, a different hex). Revisit if one is added. */
background-color: #de5833;

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.

resolved: Prior warning about unresolved --ds-color-palette-red-50 after the design-tokens v0.33.0 bump is addressed here. Hardcoded #de5833 with an explanatory comment is appropriate given no equivalent theme token exists in the desktop-browsers build.

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

Labels

semver-minor New feature — triggers minor version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant