Connect Picture of the day widget to the Merino endpoint to set the background of the widget to the current picture
Categories
(Firefox :: New Tab Page, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox154 | --- | fixed |
People
(Reporter: maxx, Assigned: dgrant)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
Behavior: the Picture of the Day widget now shows the real daily picture. A
new main-process PictureOfTheDayFeed fetches the Wikimedia Commons picture from
Merino once per (local) day, caches it, and broadcasts PICTURE_OF_THE_DAY_UPDATE
to a new PictureOfTheDay reducer slice; the widget renders the full-bleed image
with a source eyebrow, and falls back to the sunrise-gradient empty state when
there is no picture.
Details:
- Fetch goes through a new TemporaryMerinoClientShim.fetchPictureOfTheDay
(endpointUrl + Accept-Language, like Weather), guarded by the shared
discoverystream.endpoints allowlist so a mis-set pref cannot point the fetch
at an arbitrary host. - Enablement uses the registry's isWidgetEnabled() (widgets container on, widget
addable, enabled pref set), matching PrivacyFeed, so the global widgets toggle
and trainhop rollouts are honored and the feed does not fetch when widgets are
off.
Risk: main-process only; no metrics.yaml change. Gated by widgets.enabled,
widgets.system.pictureOfTheDay.enabled and widgets.pictureOfTheDay.enabled.
Validation: ./mach lint; newtab jest (PictureOfTheDay); xpcshell
test_PictureOfTheDayFeed.js. Generated bundle/CSS regenerated at this commit.
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Renders the attribution line under the title once a picture loads: the author
credit, a "Wikimedia Commons" link to the source page, and a link to the
license. The title uses newtab-picture-header-main (the shorter string from Bug
2053514); the author credit and the "Wikimedia Commons" link text are hardcoded
since nothing there is localizable. Also finishes the design-token cleanup that
removing the file-wide stylelint-disable exposed in the feed, description, and
set-wallpaper styles.
Comment 3•2 months ago
|
||
Comment on attachment 9605812 [details]
Bug 2050976 - Picture of the Day: surface the author and license attribution. r?#home-newtab-reviewers
Revision D311168 was moved to bug 2053933. Setting attachment 9605812 [details] to obsolete.
Comment 6•2 months ago
|
||
Comment 8•2 months ago
|
||
| bugherder | ||
Comment 9•2 months ago
|
||
Authored by Dre Grant
https://github.com/mozilla/enterprise-firefox/commit/45511f956ee264da99997b508214c93eff038752
[enterprise-main] Bug 2050976 - Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r=Dre
Authored by https://github.com/CosminSabou
https://github.com/mozilla/enterprise-firefox/commit/af7da16c54697f8307efc9096d8d2143b1d3548f
[enterprise-main] Revert "Bug 2050976 - Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r=Dre"
Authored by Dre Grant
https://github.com/mozilla/enterprise-firefox/commit/ced331401ec4b38bee9c937d19bfcca8da195578
[enterprise-main] Bug 2050976 - Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r=Dre
Updated•1 month ago
|
Description
•