Closed Bug 1510335 Opened 6 years ago Closed 5 years ago

ASR Snippets: Provide a way to preview snippets in other themes

Categories

(Firefox :: New Tab Page, enhancement, P3)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 68
Iteration:
68.1 - Mar 18 - 31
Tracking Status
firefox68 --- verified

People

(Reporter: giorgos, Assigned: andreio)

References

Details

(Keywords: github-merged)

Attachments

(1 file, 1 obsolete file)

Currently ASR Snippets preview always displays the default theme. We need a way to preview in other themes as well.
Hi Andrei,

I brought that up in our mtg during AH and you mentioned that it works but it doesn't work for me.

I've selected the Dark theme in Firefox and every preview link I open uses the default, light theme.

I'm testing on Linux.

Any ideas?
Flags: needinfo?(andrei.br92)
Assignee: nobody → andrei.br92
Flags: needinfo?(andrei.br92)
Iteration: --- → 66.1 - Dec 10-23
Priority: -- → P3
Iteration: 66.1 - Dec 10-23 → ---
Blocks: 1522166

Comment on attachment 9051334 [details]
Bug 1510335 - ASR Snippets: Provide a way to preview snippets in other themes

This is part of a devtool feature for Snippets that allows content creators to preview snippets + content in a newtab.
By whitelisting a host (browser.newtab.activity-stream.asrouter.whitelistHosts) we fetch snippet content from a URL passed in using query parameters.
The issue here is that LightweightThemeChild.jsm is not whitelisted for about:newtab?endpoint=..., LightweightTheme:Set never fires and the newtab loaded will have the default light theme even if the browser has dark theme set.

Attachment #9051334 - Flags: feedback?(kmaglione+bmo)

Andrei could we get this to allow theme selection in the URL?

something like

about:newtab?endpoint=....&theme=light

Flags: needinfo?(andrei.br92)

(In reply to GitHub Bugzilla PR Linker from comment #5)

I made a PR implementing this, waiting on review to see if there are any concerns.

Flags: needinfo?(andrei.br92)

I see the PR is merged, w00t!

Which release version is planned to get this?

Also how do we use this? Is there supporting documentation?

ThankS!

Flags: needinfo?(andrei.br92)
Attachment #9051334 - Attachment is obsolete: true
Attachment #9051334 - Flags: feedback?(kmaglione+bmo)

This will be available in 68, it's not in Nightly yet (will be when this bug is closed). I'll add some documentation about it but it works as you described, no pref or config required.

about:newtab?endpoint=http://foo.com&theme=light // or "dark"
Flags: needinfo?(andrei.br92)
Blocks: 1541502
Iteration: --- → 68.1 - Mar 18 - 31
Status: NEW → RESOLVED
Closed: 5 years ago
Keywords: github-merged
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

I have verified this issue with the latest Firefox Nightly (68.0a1 Build ID - 20190407214820) installed, on Windows 10 x64, Arch Linux and Mac 10.13.3. Now the Snippets can be also previewed in other themes.

Status: RESOLVED → VERIFIED
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: