Skip to content

(feat)rebrand: NTP - Omnibar rebrand - #2912

Open
borgateo wants to merge 3 commits into
mainfrom
matteo/rebrand/ntp-omnibar
Open

(feat)rebrand: NTP - Omnibar rebrand#2912
borgateo wants to merge 3 commits into
mainfrom
matteo/rebrand/ntp-omnibar

Conversation

@borgateo

@borgateo borgateo commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/72649045549333/task/1216270925937867?focus=true

Description

Gates omnibar rebrand styles behind newTabPageRebranding (body[data-rebrand="true"]): 24px radius, new rest-state shadow/border, wider search-row padding, and a fully round close button. The 24px radius is kept in the focused/typing, attachment-limit-warning, and suggestions-open states so it doesn't shrink back down to the legacy 15px while the omnibar is active.

Testing Steps

  • Open NTP with ?rebrand=enabled → omnibar pill has 24px corners, updated rest-state shadow, wider left padding on the search row, and a round close (X) button
  • Focus the input / open suggestions / trigger the attachment-limit warning → radius stays 24px, not the legacy 15px
  • Same page with ?rebrand=disabled (or omit) → live/legacy omnibar styles, pixel-unchanged

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

Behind the rebrand flag: bump the omnibar's border-radius/box-shadow to the
new DS tokens, keep that radius when focused/typing/suggestions-open, widen
the search row's padding, and make the close button fully round.

Co-authored-by: Cursor <cursoragent@cursor.com>
@borgateo borgateo changed the title (feat)rebrand: NTP - Omnibar radius, shadow, and padding (feat)rebrand: NTP - Omnibar rebrand Jul 28, 2026

@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

Web Compatibility & Security Review

Scope: 2 files changed — Omnibar.module.css and SearchForm.module.css (special-pages NTP omnibar rebrand CSS only). No injected/ changes.

Web Compatibility Assessment

File Lines Severity Finding
Omnibar.module.css 164–178 info Rebrand rules are correctly gated behind :global(body[data-rebrand="true"]), matching the established NTP rebrand pattern (index.js sets body.dataset.rebrand from native settings). With the flag off, omnibar rendering is unchanged.
Omnibar.module.css 173–176 info Reuses existing :has() selectors already present in base rules (lines 83–133). Acceptable for embedded NTP WebViews; no third-party page impact.
Omnibar.module.css 167–169 warning Uses --ds-radius-x06, which is not defined in @duckduckgo/design-tokens v0.30.0 (current special-pages/package.json). border-radius will be ignored when rebrand is enabled until design-tokens is bumped (other rebrand PRs use v0.33.0).
SearchForm.module.css 106–114 warning Uses --ds-space-x05 and --ds-radius-full, also absent from design-tokens v0.30.0. Rebrand padding/radius on the input row and close button will not apply.
SearchForm.module.css 106, 110 info Hardcoded 7px vertical padding (not a design token). Acceptable short-term but harder to keep in sync if spacing scale changes.

Security Assessment

No findings. Changes are presentational CSS in the privileged NTP embedded page. No messaging, API overrides, captured-globals, DOM injection from page-controlled data, postMessage, or config-trust boundary changes.

Risk Level

Low Risk — special-pages-only CSS scoped behind the data-rebrand feature flag; no injected runtime or security-sensitive code paths touched.

Recommendations

  1. (warning) Bump @duckduckgo/design-tokens to a version that defines --ds-radius-x06, --ds-space-x05, and --ds-radius-full (v0.33.0 per sibling rebrand PRs), or add a companion PR before merge.
  2. (info) Consider a rebrand-on screenshot test for the omnibar rest/focused states once tokens resolve.
  3. (info) Verify visually on Windows/iOS that the 7px padding keeps suffix-spacer text aligned (the inline comment documents the constraint well).
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[Beta] Generated file diff

Time updated: Tue, 28 Jul 2026 03:03:52 GMT

Apple
    - apple/pages/new-tab/dist/index.css

File has changed

Integration
    - integration/pages/new-tab/dist/index.css

File has changed

Windows
    - windows/pages/new-tab/dist/index.css

File has changed

@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 7cc7ef6. Configure here.

border-radius: var(--ds-radius-x06);
box-shadow: 0 10px 20px 0 rgba(0, 0, 0, 0.02), 0 2px 6px 0 rgba(0, 0, 0, 0.06), 0 0 0 1px var(--ds-color-theme-container-border-secondary);
outline: none;
}

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.

Rebrand outline: none loses to dark theme specificity

Medium Severity

The rebrand rest-state rule sets outline: none on .popup with specificity (0, 2, 1) (body[data-rebrand="true"] .popup). However, the existing dark-mode nested rule at lines 64–69 ([data-background-kind="color"] [data-theme="dark"] .popup) has specificity (0, 3, 0), which wins. In dark mode with color or gradient backgrounds, the old outline: 1px solid rgba(0, 0, 0, 0.12) persists alongside the new box-shadow border (0 0 0 1px …), producing a double-border effect.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7cc7ef6. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Cursor review was not successful.

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

Consolidate the duplicated border-radius into a local custom property,
align data-rebrand quoting/comments with the rest of the codebase, and
use --ds-space-* tokens consistently instead of mixing in legacy --sp-*.

Co-authored-by: Cursor <cursoragent@cursor.com>
@borgateo borgateo self-assigned this Jul 28, 2026
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Build Branch

Branch pr-releases/matteo/rebrand/ntp-omnibar
Commit c45e2c8cef
Updated July 28, 2026 at 3:03:32 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-omnibar

Swift Package Manager (Apple):

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

git submodule (Windows):

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

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#c45e2c8cefa7660bfca12bc28f0e09f7981edc88

Swift Package Manager (Apple):

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

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/matteo/rebrand/ntp-omnibar
git -C submodules/content-scope-scripts checkout c45e2c8cefa7660bfca12bc28f0e09f7981edc88

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

@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

Web Compatibility & Security Review

Scope: 2 files changed — Omnibar.module.css and SearchForm.module.css (special-pages NTP omnibar rebrand CSS only). No injected/ changes.

Delta since last review (1563d0de): Omnibar rebrand CSS consolidated via --omnibar-radius; SearchForm padding now uses --ds-space-x01 / --ds-space-x08 instead of the locally-defined --sp-1 / --sp-8.

Web Compatibility Assessment

File Lines Severity Finding
Omnibar.module.css 164–179 info Rebrand rules correctly gated behind :global(body[data-rebrand="true"]), matching the established NTP pattern (index.js sets body.dataset.rebrand from native settings). With the flag off, omnibar rendering is unchanged.
Omnibar.module.css 168–172 info Reuses existing :has() selectors already present in base rules (lines 83–133). Acceptable for embedded NTP WebViews; no third-party page impact.
Omnibar.module.css 165 warning --ds-radius-x06 is not defined in @duckduckgo/design-tokens v0.30.0 (current special-pages/package.json). Rebrand border-radius will be ignored until design-tokens is bumped (sibling rebrand PRs use v0.33.0).
SearchForm.module.css 106–116 warning --ds-space-x01, --ds-space-x05, --ds-space-x08, and --ds-radius-full are all absent from design-tokens v0.30.0. The latest commit replaced working local --sp-1 / --sp-8 tokens with undefined --ds-space-x* tokens, so rebrand padding and close-button radius will not apply even though the equivalent --sp-* values were available.
SearchForm.module.css 107, 111 info Hardcoded 7px vertical padding (not a design token). Acceptable short-term; the inline comment correctly documents the suffix-spacer alignment constraint.

Security Assessment

No findings. Changes are presentational CSS in the privileged NTP embedded page. No messaging, API overrides, captured-globals, DOM injection from page-controlled data, postMessage, or config-trust boundary changes.

Risk Level

Low Risk — special-pages-only CSS scoped behind the data-rebrand feature flag; no injected runtime or security-sensitive code paths touched.

Recommendations

  1. (warning) Bump @duckduckgo/design-tokens to a version defining --ds-radius-x06, --ds-space-x01, --ds-space-x05, --ds-space-x08, and --ds-radius-full (v0.33.0 per sibling rebrand PRs), or restore --sp-1 / --sp-8 until that bump lands.
  2. (info) Consider a rebrand-on screenshot test for omnibar rest/focused states once tokens resolve.
  3. (info) Verify visually on Windows/iOS that the 7px padding keeps suffix-spacer text aligned.
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

*/
:global(body[data-rebrand="true"]) {
.form {
padding: 7px var(--ds-space-x01) 7px var(--ds-space-x05);

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.

This commit swaps locally-defined --sp-1 / --sp-8 (from shared/styles/variables.css) for --ds-space-x01 / --ds-space-x08, which are not present in design-tokens v0.30.0. Until the tokens package is bumped, the entire padding declaration is invalid at computed-value time and rebrand padding won't apply. Consider reverting to --sp-* here or bundling the design-tokens bump in this PR.

Behind the rebrand flag, .textarea and .buttons now use the same 20px
left inset as SearchForm's .input/.form, so text/icons stay aligned
when switching between the Search and Duck.ai omnibar tabs.

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

Re-assessed at 0ae5480b (synchronize). Scope unchanged: 3 special-pages NTP omnibar CSS files (+66 lines), all gated behind body[data-rebrand="true"]. No injected/, messaging, API override, or captured-globals changes.

Web Compatibility Assessment

File Lines Severity Finding
SearchForm.module.css, Omnibar.module.css, AiChatForm.module.css 106–134, 164–179, 126–133 info Rebrand rules are correctly scoped to body[data-rebrand="true"]. With the flag OFF, omnibar rendering is unchanged — good rollback pattern.
SearchForm.module.css, Omnibar.module.css, AiChatForm.module.css 108–116, 165, 128–132 warning New rules reference --ds-space-x01, --ds-space-x05, --ds-space-x08, --ds-radius-x06, and --ds-radius-full. These tokens exist in design-tokens/build/static-pages/ but are not exported in desktop-browsers/tokens.css (v0.30.0) that shared/styles/design-tokens.css imports. Undefined custom properties invalidate the entire declaration at computed-value time, so rebrand padding/radius won't apply until the tokens package is bumped or spacing/radius tokens are wired into the NTP import chain. New in 0ae5480b: AiChatForm.module.css now uses --ds-space-x05 for the same reason.
Omnibar.module.css 176–178 vs 64–68 warning Rebrand rest-state sets outline: none at specificity (0, 2, 1), but the existing dark-mode nested rule [data-background-kind="color"] [data-theme="dark"] .popup at lines 64–68 has specificity (0, 3, 0) and still applies outline: 1px solid rgba(0, 0, 0, 0.12). In dark mode with color/gradient backgrounds, the new box-shadow border (0 0 0 1px …) may stack with the legacy outline, producing a double-border effect.
SearchForm.module.css 108, 112 info Hardcoded 7px vertical padding in rebrand rules while horizontal spacing uses design tokens. Consider tokenizing vertical padding for consistency once tokens are available.

Security Assessment

No findings. Changes are presentational CSS in the embedded NTP special-page. No messaging, nativeData, bridge, origin validation, prototype patching, or user-controlled value injection paths are touched.

Risk Level

Low Risk — Special-pages NTP omnibar CSS only; no injected runtime code; all visual changes are feature-flag gated.

Recommendations

  1. (warning) Bundle a design-tokens bump (v0.33.0 as in sibling rebrand PRs) or revert to existing --sp-* equivalents (--sp-1/--sp-5/--sp-8) until spacing/radius tokens are available in the NTP import chain.
  2. (warning) Fix dark-mode outline stacking — either nest the rebrand outline: none under the same [data-theme="dark"] selectors, or raise specificity to beat (0, 3, 0).
  3. (info) Add a rebrand-on omnibar screenshot test once tokens are wired, to catch padding/radius/shadow regressions across Search and Duck.ai tabs.
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

*/
:global(body[data-rebrand="true"]) {
.textarea {
padding-left: var(--ds-space-x05);

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.

New in 0ae5480b: Duck.ai row left-padding alignment mirrors SearchForm, which is the right UX intent. Same caveat as the search row — --ds-space-x05 is not in desktop-browsers/tokens.css v0.30.0, so this padding-left declaration is invalid until spacing tokens are wired into the NTP import chain (or you revert to --sp-5, which is already 20px).

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