Closed Bug 1463836 Opened 6 years ago Closed 6 years ago

AS Router Remote Provider Message Previewing

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 63
Iteration:
62.4 - Jul 2
Tracking Status
firefox63 --- fixed

People

(Reporter: k88hudson, Assigned: andreio)

References

(Blocks 1 open bug)

Details

User Story

https://docs.google.com/document/d/1Vua9edeAvqGCjrRCsKzV-IvTOy_CYUWfEeSf-JZDBZQ
Content creators must be able to preview a particular message they are editing in the snippets service via the new AS Router system.

We'd like to move to a previewing system that works with Firefox directly rather than with a simulated version in the current snippets service.

See also https://github.com/mozmeao/snippets-service/issues/522
Severity: normal → enhancement
Iteration: --- → 62.2 - Jun 4
Priority: -- → P1
The solution we settled on would require:
* hiding the preview feature behind a preference. The user has to change this only once to activate it. (this way we can ship the functionality for all release channels)
* paste-ing the preview url in the address bar to access the preview (link is not clickable). Instead of having an intermediate page or other steps to go through, we can use the current about:newtab 

An example:
Given a profile where the "preview pref" has been turned on.
The user has the url "about:newtab#asrouter?endpoint=https://snippets.cdn.mozilla.net/show/8290/". They would copy and paste it into the address bar and press enter.
AS would fetch the snippet at that endpoint and directly display it without other intermediary steps.

We would be able to whitelist several hosts in order to make the development process easier (if needed) as long as they are all https links.

What do you think about this solution?
Flags: needinfo?(giorgos)
Flags: needinfo?(giorgos)
Capturing yesterday's mtg with Andrei:

 - Agreed on using the "about:newtab#asrouter?endpoint=..." URL. 
 - Hitting enter would directly load the AS page with the snippet to be previewed loaded (i.e. skip the Admin page)
 - Agreed to have the Snippet Admin page in AS for dev purposes
 - Hitting reload on that page would re-fetch the endpoint URL and refresh the preview without extra step
 - Agreed on whitelisting domains 
  - Domain to be whitelisted https://snippets-admin.moz.works

Not discussed / open questions:

 1. Whitelisting should follow a similar pattern to UITour: [0]
   - Configurable via prefs to set new endpoints and allow insecure connections for development
 2. Since we have domain whitelisting and we can also add a visual indication that the content is a preview, why hide the preview feature behind a pref? 
 3. We are going to add visual indication that this is a preview? 


NI Andrei for the open questions.


[0] https://bedrock.readthedocs.io/en/latest/uitour.html#local-development
Flags: needinfo?(andrei.br92)
Update on the domain to be white-listed:

 - https://snippets-admin.mozilla.org
Iteration: 62.2 - Jun 4 → 62.3 - Jun 18
Iteration: 62.3 - Jun 18 → 62.4 - Jul 2
1. browser.newtabpage.activity-stream.asrouter.snippetsUrl
2. Looks like we're going ahead without hiding this behind a pref
3. I've requested some design ideas for this.

PR https://github.com/mozilla/activity-stream/pull/4173
Flags: needinfo?(andrei.br92)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Blocks: 1472302
Component: Activity Streams: Newtab → Messaging System
You need to log in before you can comment on or make changes to this bug.