Skip to content

(feat)rebrand: NTP - Remote Messaging Framework styles and icons - #2882

Open
borgateo wants to merge 5 commits into
mainfrom
matteo/rebrand/ntp-rmf
Open

(feat)rebrand: NTP - Remote Messaging Framework styles and icons#2882
borgateo wants to merge 5 commits into
mainfrom
matteo/rebrand/ntp-rmf

Conversation

@borgateo

@borgateo borgateo commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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

Description

Gates RMF rebrand styles behind newTabPageRebranding and shows the message icon.

Testing Steps

  • Open NTP with ?rebrand=enabled and an RMF message that has an icon → rebrand styles + icons/rebrand/*-96.svg
  • Same message with rebrand off → live styles + icons/*-96.svg
  • Small RMF message → no icon block
  • Message without icon → no icon block

Test all rmf.*:

small, medium, big_single_action, big_two_action, big_two_action_overflow, big_single_action_announce, big_single_action_app_update, big_single_action_critical_update, big_single_action_very_critical_update, big_single_action_pir, big_single_action_radar, big_single_action_radar_check_purple, big_single_action_subscription, big_single_action_preview, big_single_action_youtube_new

Screen recording

Screen.Recording.2026-07-20.at.23.41.03.mov

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

Low Risk
UI-only NTP changes gated by existing rebrand config; no auth, messaging protocol, or data-handling changes beyond new static assets and CSS.

Overview
Adds NTP rebrand styling for Remote Messaging Framework (RMF) banners when newTabPageRebranding is on (body[data-rebrand="true"]): design-token spacing, shadows, typography, and a restyled dismiss control.

RMF now picks icon assets from ./icons/rebrand/*-96.svg under rebrand vs legacy ./icons/*-96.svg, and only shows the icon block for non-small messages that include an icon.

Bumps @duckduckgo/design-tokens to v0.33.0, imports NTP token CSS in App.module.css, adds a full rebrand icon set, registers PrivacyPro in the RMF schema/types, and updates the PrivacyPro SVG asset.

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

@borgateo borgateo self-assigned this Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

[Beta] Generated file diff

Time updated: Mon, 27 Jul 2026 21:29:56 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/new-tab/icons/PrivacyPro.svg
  • 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/new-tab/dist/index.js
  • integration/pages/new-tab/icons/PrivacyPro.svg
  • 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/new-tab/dist/index.js
  • windows/pages/new-tab/icons/PrivacyPro.svg
  • 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

New Files
    - apple/pages/new-tab/icons/PrivacyPro-96.svg
  • apple/pages/new-tab/icons/rebrand/Announce-96.svg
  • apple/pages/new-tab/icons/rebrand/AppUpdate-96.svg
  • apple/pages/new-tab/icons/rebrand/CriticalUpdate-96.svg
  • apple/pages/new-tab/icons/rebrand/DDGAnnounce-96.svg
  • apple/pages/new-tab/icons/rebrand/DuckAi-96.svg
  • apple/pages/new-tab/icons/rebrand/PIR-96.svg
  • apple/pages/new-tab/icons/rebrand/Preview-96.svg
  • apple/pages/new-tab/icons/rebrand/PrivacyPro-96.svg
  • apple/pages/new-tab/icons/rebrand/Radar-96.svg
  • apple/pages/new-tab/icons/rebrand/RadarCheckGreen-96.svg
  • apple/pages/new-tab/icons/rebrand/RadarCheckPurple-96.svg
  • apple/pages/new-tab/icons/rebrand/Subscription-96.svg
  • apple/pages/new-tab/icons/rebrand/VeryCriticalUpdate-96.svg
  • apple/pages/new-tab/icons/rebrand/YoutubeNew-96.svg
  • integration/pages/new-tab/icons/PrivacyPro-96.svg
  • integration/pages/new-tab/icons/rebrand/Announce-96.svg
  • integration/pages/new-tab/icons/rebrand/AppUpdate-96.svg
  • integration/pages/new-tab/icons/rebrand/CriticalUpdate-96.svg
  • integration/pages/new-tab/icons/rebrand/DDGAnnounce-96.svg
  • integration/pages/new-tab/icons/rebrand/DuckAi-96.svg
  • integration/pages/new-tab/icons/rebrand/PIR-96.svg
  • integration/pages/new-tab/icons/rebrand/Preview-96.svg
  • integration/pages/new-tab/icons/rebrand/PrivacyPro-96.svg
  • integration/pages/new-tab/icons/rebrand/Radar-96.svg
  • integration/pages/new-tab/icons/rebrand/RadarCheckGreen-96.svg
  • integration/pages/new-tab/icons/rebrand/RadarCheckPurple-96.svg
  • integration/pages/new-tab/icons/rebrand/Subscription-96.svg
  • integration/pages/new-tab/icons/rebrand/VeryCriticalUpdate-96.svg
  • integration/pages/new-tab/icons/rebrand/YoutubeNew-96.svg
  • windows/pages/new-tab/icons/PrivacyPro-96.svg
  • windows/pages/new-tab/icons/rebrand/Announce-96.svg
  • windows/pages/new-tab/icons/rebrand/AppUpdate-96.svg
  • windows/pages/new-tab/icons/rebrand/CriticalUpdate-96.svg
  • windows/pages/new-tab/icons/rebrand/DDGAnnounce-96.svg
  • windows/pages/new-tab/icons/rebrand/DuckAi-96.svg
  • windows/pages/new-tab/icons/rebrand/PIR-96.svg
  • windows/pages/new-tab/icons/rebrand/Preview-96.svg
  • windows/pages/new-tab/icons/rebrand/PrivacyPro-96.svg
  • windows/pages/new-tab/icons/rebrand/Radar-96.svg
  • windows/pages/new-tab/icons/rebrand/RadarCheckGreen-96.svg
  • windows/pages/new-tab/icons/rebrand/RadarCheckPurple-96.svg
  • windows/pages/new-tab/icons/rebrand/Subscription-96.svg
  • windows/pages/new-tab/icons/rebrand/VeryCriticalUpdate-96.svg
  • windows/pages/new-tab/icons/rebrand/YoutubeNew-96.svg

❌ File only exists in new changeset

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Build Branch

Branch pr-releases/matteo/rebrand/ntp-rmf
Commit 7441f5e2bf
Updated July 27, 2026 at 9:28:58 PM 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-rmf

Swift Package Manager (Apple):

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

git submodule (Windows):

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

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#7441f5e2bf63f67afbb45523b145a78d5ef596cf

Swift Package Manager (Apple):

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

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/matteo/rebrand/ntp-rmf
git -C submodules/content-scope-scripts checkout 7441f5e2bf63f67afbb45523b145a78d5ef596cf

Comment thread special-pages/pages/new-tab/app/next-steps-list/NextStepsList.js Outdated
const platform = usePlatformName();
const isRebrandEnabled = useNewTabPageRebranding();
const showIcon = messageType !== 'small' && Boolean(message.icon);
const iconSrc = showIcon ? (isRebrandEnabled ? `./icons/rebrand/${message.icon}-96.svg` : `./icons/${message.icon}-96.svg`) : undefined;

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.

infomessage.icon is schema-validated (enum in rmf-message.json), so path interpolation here is safe. 79c321c6f correctly preserves the legacy ./icons/ path when rebrand is off.

@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

Comment thread special-pages/pages/new-tab/app/protections/components/Protections.module.css Outdated
Comment thread special-pages/pages/new-tab/app/activity/components/ActivityItem.js Outdated
@borgateo
borgateo changed the base branch from main to matteo/rebrand/ntp-stats-and-next-steps July 22, 2026 15:30
@borgateo
borgateo changed the base branch from matteo/rebrand/ntp-stats-and-next-steps to main July 22, 2026 15:30
Comment thread special-pages/pages/new-tab/app/activity/components/ActivityItem.js Outdated
Comment thread special-pages/pages/new-tab/app/privacy-stats/components/PrivacyStats.module.css Outdated
borgateo and others added 3 commits July 24, 2026 11:46
@borgateo
borgateo force-pushed the matteo/rebrand/ntp-rmf branch from 0a24b8c to 9d486e1 Compare July 24, 2026 14:47
@github-actions github-actions Bot added the semver-minor New feature — triggers minor version bump label Jul 24, 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 Assessment

File Lines Severity Finding
(scope) info No injected/ changes. All 15 changed files are in special-pages/pages/new-tab/ — first-party embedded NTP UI, not injected into third-party pages. Injected web-compat categories (API shimming, prototype integrity, cross-frame leakage) do not apply.
special-pages/.../RemoteMessagingFramework.js 22–30 info RMF icon path correctly switches between ./icons/${icon}-96.svg (legacy) and ./icons/rebrand/${icon}-96.svg based on useNewTabPageRebranding(). showIcon logic unchanged (messageType !== 'small' && message.icon).
special-pages/.../RemoteMessagingFramework.module.css 77–122 info Rebrand visual refresh (padding, box-shadow, typography, dismiss button) scoped under :global(body[data-rebrand="true"]). Legacy styles preserved when rebrand is off.
special-pages/.../rebrand/*.svg info 11 static SVG assets added; all RMFIcon enum values covered. Latest commit (9d486e1b) corrects CriticalUpdate/VeryCriticalUpdate artwork only.

Scope note: PR now contains only RMF changes vs main (15 files). Prior warnings about ungated Privacy Stats / Protections / ActivityItem changes are out of scope for this PR (likely split to other rebrand PRs).

Security Assessment

File Lines Severity Finding
(scope) info No changes to injected/, messaging/, captured-globals.js, message-bridge, or API overrides. No new security surface for hostile third-party pages.
special-pages/.../RemoteMessagingFramework.js 24 info Icon src built from native-supplied message.icon into static relative paths. RMFIcon is enum-constrained in rmf-message.json; no page-controlled input, no postMessage/nativeData leakage.
special-pages/.../settings.provider.js 42–44 info Rebrand flag read from native settings (newTabPageRebranding.state === 'enabled'). Remote-disable path exists; no new messaging schemas introduced.

Risk Level

Low Risk — special-pages NTP RMF visual rebrand only (gated CSS + icon asset swap). No injected runtime, browser API overrides, or messaging security-boundary changes.

Recommendations

  1. (info) Ensure native clients ship the newTabPageRebranding setting before enabling rebrand assets in production.
  2. (info) 4/4 RMF integration tests pass locally; consider adding rebrand-on coverage to assert ./icons/rebrand/ paths render when data-rebrand="true".

Re-assessed at 9d486e1b (synchronize). PR scope vs main is now RMF-only (15 files); RMF file content unchanged from prior 0a24b8c01 assessment (rebase). Prior cross-component warnings removed as those files are no longer in this PR.

Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

Replace DuckAi, PIR, and Subscription rebrand SVGs with the final vector assets, and add PrivacyPro-96 so Windows PrivacyShield messages resolve under the shared -96 path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread special-pages/pages/new-tab/public/icons/PrivacyPro-96.svg
…tokens

Restore the pre-regression Privacy Pro shield (plus) for FF-off paths, bump design-tokens to v0.33.0 with ntp.css, and replace NTP/local aliases in RMF rebrand styles with DS font and dismiss-border tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
@borgateo
borgateo marked this pull request as ready for review July 27, 2026 21:28
@borgateo
borgateo requested review from a team and daxtheduck as code owners July 27, 2026 21:28

@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

Re-assessed at a51c7eb36 (synchronize). Scope: 23 files, special-pages NTP RMF rebrand only — no injected/ changes.

Web Compatibility Assessment

File Lines Severity Finding
(scope) info No injected/ changes. This PR does not touch browser API overrides, wrapper utilities, captured globals, or message-bridge code — zero third-party web page compatibility surface.
RemoteMessagingFramework.js 22–24 info Rebrand icon switching is correctly gated via useNewTabPageRebranding(); legacy ./icons/${message.icon}-96.svg path preserved when rebrand is off. Refactor to showIcon/iconSrc is behavior-neutral.
RemoteMessagingFramework.module.css 77–118 info Rebrand styles scoped under :global(body[data-rebrand="true"]) — remotely rollback-able via native newTabPageRebranding setting. Uses DS NTP tokens (--ds-ntp-dismiss-btn-*).
App.module.css 3 info New @import of ntp.css from design-tokens v0.33.0 loads NTP token definitions page-wide. Non-rebrand users inherit any token value shifts from the 0.30→0.33 bump; monitor for collateral layout changes outside RMF.
public/icons/ info All 14 RMFIcon enum values have matching assets in both ./icons/ and ./icons/rebrand/. PrivacyPro-96.svg is now distinct from Subscription-96.svg (fixed in a51c7eb36).
integration-tests/ warning RMF screenshot tests (8 variants: 4 message types × light/dark) fail locally — visual diffs from rebrand CSS + design-tokens bump, but no snapshot rebaselines included in this PR. CI screenshot job will fail until baselines are updated.
integration-tests/ info Existing RMF screenshot tests run with default data-rebrand="false"; no coverage for rebrand-on icon path (./icons/rebrand/) or rebrand CSS block.

Security Assessment

File Lines Severity Finding
(scope) info No changes to messaging transports, message-bridge trust boundary, captured-globals.js, or nativeData handling.
RemoteMessagingFramework.js 24 info message.icon interpolated into <img src> — safe because value is schema-validated enum (rmf-message.json / RMFIcon type), not page-controlled input. Paths are static relative URLs within the NTP origin.
settings.provider.js 42–44 info Rebrand feature gated via native-injected settings.newTabPageRebranding.state — supports remote kill-switch without code deploy.
rmf-message.json 145 info PrivacyPro added to icon enum — expands native-allowed icon set; no security regression (still closed enum).

Risk Level

Low Risk — Special-pages UI-only changes (CSS, SVG assets, icon path toggle) with no injected runtime, API shimming, or messaging security surface.

Recommendations

  1. Rebaseline RMF screenshot snapshots before merge (8 failing tests: rmf-small, rmf-medium, rmf-big-single-action, rmf-big-two-action × light/dark).
  2. PrivacyPro legacy icon — resolved in a51c7eb36; distinct artwork now served for non-rebrand builds.
  3. (Optional) Add rebrand-on RMF screenshot coverage (data-rebrand="true") to validate ./icons/rebrand/ path and rebrand CSS block.
  4. (Optional) Smoke-test non-RMF NTP widgets after the design-tokens 0.33.0 bump + ntp.css import for collateral token shifts.
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

@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: #2882 — NTP RMF rebrand styles and icons (a51c7eb)
Scope: 23 files, all under special-pages/zero injected/ changes


Web Compatibility Assessment

File Lines Severity Finding
(entire PR) info No injected/ changes. This PR does not touch browser API overrides, wrapper-utils, DDGProxy, captured-globals, or content-script injection. Injected-specific compatibility criteria (toString masking, prototype chain integrity, stack-trace exemptions, etc.) do not apply.
special-pages/pages/new-tab/app/components/App.module.css 3 info Adds @import of @duckduckgo/design-tokens ntp.css (tokens bumped v0.30.0 → v0.33.0). Collateral styling changes to other NTP surfaces are possible via shared design-token variables — not third-party site breakage, but worth visual QA beyond RMF.
RemoteMessagingFramework.js 22–24 info Rebrand icon path (./icons/rebrand/${message.icon}-96.svg) is selected via useNewTabPageRebranding(), gated by native newTabPageRebranding settings. When rebrand is off, legacy paths are unchanged. All 14 RMFIcon enum values have matching assets in both icons/ and icons/rebrand/ (verified locally).
RemoteMessagingFramework.js 24 info message.icon is interpolated into a relative asset path. The JSON schema enum constrains values to known icon names (no / or ..), so path-traversal into arbitrary files is not a realistic vector. A native-side schema violation would produce a 404 image — UX degradation only within the privileged NTP page.
RemoteMessagingFramework.module.css 77–119 info Rebrand styles scoped under body[data-rebrand="true"], consistent with existing NTP rebrand pattern (App.module.css, settings.provider.js). No viewport/meta manipulation or global prototype changes.
rmf-message.json / new-tab.ts 145 / 192 info PrivacyPro added to RMFIcon enum with dedicated legacy + rebrand SVG assets. Latest commit (a51c7eb) restores a distinct legacy PrivacyPro-96.svg (no longer duplicates Subscription-96.svg).
integration-tests/rmf.spec.js info 4/4 RMF integration tests pass. No test covers rebrand-on icon path switching (?rebrand=enabled); optional coverage gap, not a compatibility regression.

No warnings or errors for web compatibility.


Security Assessment

File Lines Severity Finding
(entire PR) info No changes to messaging transports, message bridge, captured-globals, origin validation, postMessage, or shouldExemptMethod().
RemoteMessagingFramework.js 34–35, 70–71 info titleText and descriptionText rendered as Preact text children — auto-escaped, no dangerouslySetInnerHTML. Pre-existing pattern, unchanged.
RemoteMessagingFramework.js 24, 30 info Icon src built from schema-enumerated message.icon into a relative path under ./icons/. No user-controlled URL construction or external fetches.
rmf.service.js info Unchanged. Outbound notify() calls pass only { id } — no nativeData leakage risk introduced.
RemoteMessagingFramework.js 27 info id from native used as DOM id attribute — pre-existing; not introduced by this PR.

No warnings, errors, or critical findings for security.


Risk Level

Low Risk — Special-pages-only NTP RMF visual rebrand (CSS, SVG assets, design-token bump). No injected runtime, API shims, messaging security, or captured-globals changes.


Recommendations

  1. (info) Visual QA with ?rebrand=enabled across RMF message variants (medium, big_single_action, big_two_action) to confirm rebrand icons and dismiss-button styling.
  2. (info) Spot-check collateral NTP styling from design-tokens v0.33.0 import in App.module.css (Favorites, omnibar, etc.).
  3. (info, optional) Add a rebrand-on RMF integration or screenshot test (openPage({ rmf: 'medium', additional: { rebrand: 'enabled' } })) to lock in icon path switching.

Assessed at a51c7eb. 4/4 RMF integration tests pass locally.

Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

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

.title {
font-size: var(--ds-font-body-md-size);
font-weight: var(--ds-font-weight-bold);
line-height: var(--ds-font-body-md-size);

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.

Title line-height mistakenly uses font-size token

Medium Severity

The rebrand .title rule sets line-height to var(--ds-font-body-md-size) — the font-size token — instead of a line-height token. The sibling .description rule correctly uses var(--ds-font-body-md-line-height) for its line-height. This looks like a copy-paste slip that results in a line-height equal to the font-size (ratio of 1), causing cramped or overlapping text if the title wraps to multiple lines.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a51c7eb. Configure here.

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