Respect wallpaper "visible" and "visibility_group" fields in the New Tab Customize picker
Categories
(Firefox :: New Tab Page, enhancement)
Tracking
()
People
(Reporter: maxx, Assigned: maxx)
References
(Depends on 1 open bug)
Details
(Whiteboard: [hnt])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
Support the new visible boolean field on newtab-wallpapers-v2 records (see 2055857).
When a wallpaper is marked visible: false, it should be removed from the Customize wallpaper picker so it can no longer be selected, but people who already have it selected can continue to see it applied.
Implementation notes:
- WallpaperFeed.sys.mjs (updateWallpapers): normalize the field (
visible: record.visible !== false) and keep hidden records in the wallpaperList array. Do not filter them out here, because Base.jsx updateWallpaper() looks up the active wallpaper by title in wallpaperList, so removing it would break the already-selected case. Exclude categories that contain only non-visible wallpapers from the category list. - WallpaperCategories.jsx (the wallpaperList.filter(...) calls (See both https://searchfox.org/firefox-main/source/browser/extensions/newtab/content-src/components/WallpaperCategories/WallpaperCategories.jsx#497): drop wallpapers where
visible === false, except keep the currently-active one (title === activeWallpaper) so an existing selector still sees theirs. - No change needed in Base.jsx, since the background lookup keeps working because
wallpaperListretains hidden records.
The client defaults visible to true, so behavior is unchanged for records without the field.
| Assignee | ||
Updated•2 months ago
|
Comment 1•1 month ago
|
||
Maxx can we close this as duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=2055857?
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
This isn't a duplicate. This is the client-side implementation part.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 3•1 month ago
|
||
Expanding scope: this bug now covers both visibility fields on newtab-wallpapers-v2, since they gate the same picker and land in the same file.
visible(Bug 2055857, schema landed)
A record with visible: false is not offered in the Customize picker. A record with no visible key, or visible: true, is offered as today.
Correction to comment #0: that comment said to keep the currently-active wallpaper in the picker via a title === activeWallpaper exception. That is no longer the plan. A retired wallpaper is hidden from the picker for everyone, including the person who has it selected. Their background keeps rendering it - the record stays in wallpaperList, so Base.jsx's lookup by title still resolves. Accepted consequence: that person sees no checked radio in the category (and no category tile at all if every wallpaper in it is retired) while their background still shows the retired image.
visibility_group(Bug 2068600, schema in PR #827)
A record with an empty or absent visibility_group is offered normally. A record with a value is offered only when that value appears in the user's active-group list. That list is a comma-separated string, so several groups can be live at once, resolved from two sources in precedence order:
- trainhopConfig.wallpapers.visibilityGroups - the Nimbus override, shippable via the newtab XPI without a release-train dependency.
- browser.newtabpage.activity-stream.newtabWallpapers.visibilityGroups - the pref, which holds the default and is what you set for local testing.
Note that both gates apply together: a record needs visible !== false AND a satisfied group to be offered.
- no-op for today's collection
All 74 shipped records carry neither field, so behavior is unchanged for every existing wallpaper. This is verifiable before PR #827 merges and is the primary pre-landing check.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 4•1 month ago
|
||
Updated•1 month ago
|
Comment 6•1 month ago
|
||
| bugherder | ||
| Assignee | ||
Comment 7•1 month ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D323031
Updated•1 month ago
|
Comment 8•1 month ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Default users may see exclusive wallpapers for Wrexham repack marketing initiative.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: See testing steps in https://phabricator.services.mozilla.com/D323031
- Risk associated with taking this patch: low
- Explanation of risk level: The code was written explicitly to maintain default visibility, so there should be no visual or behavior changes with this code change.
- String changes made/needed?: No
- Is Android affected?: no
Updated•1 month ago
|
Updated•1 month ago
|
Comment 10•1 month ago
|
||
Beta backout incoming, Bug 2067903 is on beta only
Comment 11•1 month ago
|
||
| uplift | ||
Comment 12•1 month ago
|
||
Backed out of beta for causing CI failures
https://treeherder.mozilla.org/jobs?repo=mozilla-beta&resultStatus=testfailed%2Cbusted%2Cexception&searchStr=linux%2C24.04%2Copt%2Cnode%2Ctests%2Csource-test-node-newtab-unit-tests%2Cnewtab&revision=2c983f8e2ebbd4a9670675b6cca92eac892ae09c
Updated•1 month ago
|
| Assignee | ||
Comment 13•1 month ago
|
||
Ahh! It's causing CI failures on beta, because https://bugzilla.mozilla.org/show_bug.cgi?id=2025793 is backed out there. I need to run the bundle step on that patch. I'll get this solved.
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Comment 14•1 month ago
|
||
| uplift | ||
Comment 15•28 days ago
|
||
Verified that this is working correctly on Firefox 157.0a1 (2026-09-06) and Firefox 156.0b4 (treeherder build) by following the STR mentioned in Comment 8. Tests were performed on macOS 27, Windows 11 and Ubuntu 26.04.
Description
•