Closed Bug 2050976 Opened 2 months ago Closed 2 months ago

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)

enhancement

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: maxx, Assigned: dgrant)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

No description provided.

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.

Assignee: nobody → dgrant
Status: NEW → ASSIGNED
Attachment #9603707 - Attachment description: Bug 2050976 - Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r?#home-newtab-reviewers → Bug 2050976 - Picture of the Day: Fetch the daily picture from Merino and show it as the widget background. r?#home-newtab-reviewers
Attachment #9603707 - Attachment description: Bug 2050976 - Picture of the Day: Fetch the daily picture from Merino and show it as the widget background. r?#home-newtab-reviewers → Bug 2050976 - Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r?#home-newtab-reviewers

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 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.

Attachment #9605812 - Attachment is obsolete: true
Pushed by mcrawford@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/45511f956ee2 https://hg.mozilla.org/integration/autoland/rev/d5db27e44ace Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r=Dre
Pushed by csabou@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/af7da16c5469 https://hg.mozilla.org/integration/autoland/rev/1adfaf1f1b10 Revert "Bug 2050976 - Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r=Dre"

Backed out for causing node failures.

Push with failures

Failure log

Backout link

Pushed by mcrawford@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ced331401ec4 https://hg.mozilla.org/integration/autoland/rev/c1e16ca3befa Picture of the Day: fetch the daily picture from Merino and show it as the widget background. r=Dre
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

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

QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: