Closed Bug 998934 Opened 6 years ago Closed 5 years ago

Whitelist Sync marketing page to allow ability to link directly to about:accounts?action=signup

Categories

(Firefox :: General, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 33
Tracking Status
firefox31 --- fixed
firefox32 --- fixed
firefox33 --- fixed

People

(Reporter: Habber, Assigned: markh)

References

Details

(Whiteboard: p=5 s=33.1 [qa-])

Attachments

(2 files, 1 obsolete file)

Problem: 
A path to the Sync flow does not exist from the Sync marketing page. 

To enter the Sync flow, a user must go to 'about:accounts'. This is where the Sync specific sign up/in flow exists. This is not a standard web page and therefore can not be directly linked to from http://www.mozilla.org/en-US/firefox/sync/ It is accessed via the new menu panel, found in the Firefox 29 design. 

Note that 'accounts.firefox.com' is a web page that supports account creation, but does not mention Sync specifically because accounts are used for multiple products. It currently contains no mention of Sync and is not an appropriate flow to send potential and current Sync users through.  


Details:
/firstrun and /whatsnew have the ability to interact with the browser chrome to support Firefox onboarding. This means that the web can trigger reactions in the chrome. e.g.: When landing on /whatsnew, an infopanel is displayed, menu panel can be opened, and items in the chrome can be highlighted to teach user where they are located. See - https://bugzilla.mozilla.org/show_bug.cgi?id=862998


Solution:
Whitelist the Sync marketing page, so that when clicking on a Sync sign up CTA
in the webpage, the menu panel will open and Sync item will be highlighted. This CTA will only be shown to Firefox users. If the Sync flow exists in a web page at some point, we can test both methods to see what is best for this context.
Additional bug is needed to add ability to highlight animation to Sync item in menu panel.
OS: Mac OS X → All
Product: www.mozilla.org → Firefox
Hardware: x86 → All
Version: Production → unspecified
Flags: firefox-backlog+
Summary: Whitelist Sync marketing page to allow ability to interact with browser chrome → Whitelist Sync marketing page to allow ability to link directly to about:accounts?action=signup
Sorry, for not following-up on this bug sooner, but I don't think there is anything for us to do in product for this since www.mozilla.org is already whitelisted (for the tours). The only caveat is that it only works on https (whereas your link was http) and I don't think we'd be willing to remove that restriction. You can have mozilla.org folks redirect users to https for that specific page and then use the same UITour library[1] that agibson used for the tour pages. 

The whitelist is here if you ever want to look at it: browser.uitour.whitelist.add… https://mxr.mozilla.org/mozilla-central/source/browser/app/profile/firefox.js#254

Holly, can we close this bug as WFM?

[1] https://github.com/Unfocused/mozilla-uitour
Flags: needinfo?(hhabstritt.bugzilla)
Oh, sorry, I see now that Gavin changed the summary to allow direct-linking which would require a product change.
Flags: needinfo?(hhabstritt.bugzilla)
Sorry I didn't comment - morphed this after meeting with Holly earlier. The goal is to get a link/button on mozilla.org that does the same thing as about:accounts' "Get Started" button.

That'll require a whitelist and an event-based mechanism for triggering the open of about:accounts in the current tab.
Whiteboard: p=5 [qa+]
Assignee: nobody → mhammond
Status: NEW → ASSIGNED
Whiteboard: p=5 [qa+] → p=5 s=33.1 [qa+]
This adds a "firefoxAccounts" action to UITour - Gavin suggested we reuse the UITour for this so we get all the whitelisting etc for free.

Not sure if the name 'firefoxAccounts' is suitable, but I'm sure you will tell me :)
Attachment #8438147 - Flags: feedback?(bmcbride)
Comment on attachment 8438147 [details] [diff] [review]
0001-Bug-998934-add-a-firefoxAccounts-command-to-the-UITo.patch

Review of attachment 8438147 [details] [diff] [review]:
-----------------------------------------------------------------

How about "showFirefoxAccounts", to match with the style of the other actions?

One important question: If a malicious site were to use this, could it do any harm by passing anything as the |action| param? For this API, we need to assume mozilla.com will be compromised one day. So, I think we should be ensuring |action| is only one of the current three (?) valid values (or rather, the ones that are both safe *and* useful). That way we can be sure we're eliminating the possibility of passing an additional URL param, or passing something like "wipe" which may (hypothetically) be implemented in the future.

::: browser/modules/UITour.jsm
@@ +286,5 @@
>              effect = data.effect;
>            }
>            this.showHighlight(target, effect);
> +        }).then(null, err => {
> +          dump("Ooops - " + err.stack);

Debugging leftover?
Attachment #8438147 - Flags: feedback?(bmcbride) → feedback+
Thanks - in this version:

* renamed to showFirefoxAccounts.
* dropped support for the 'action' param entirely - none of the other currently-valid action params make sense in this context - and before they did we'd need additional functions to query the state of FxA etc, so we can tackle that if it ever becomes a requirement.
* removed debugging cruft.
Attachment #8438147 - Attachment is obsolete: true
Attachment #8438859 - Flags: review?(bmcbride)
Comment on attachment 8438859 [details] [diff] [review]
0001-Bug-998934-add-a-firefoxAccounts-command-to-the-UITo.patch

Review of attachment 8438859 [details] [diff] [review]:
-----------------------------------------------------------------

Ship it!

Also, can you make a pull request to the JS lib repo, with the change to the Mozilla.UITour API? https://github.com/Unfocused/mozilla-uitour/
Attachment #8438859 - Flags: review?(bmcbride) → review+
(In reply to Blair McBride [:Unfocused] from comment #8)
> Ship it!

Thanks!

https://hg.mozilla.org/integration/fx-team/rev/be0de0e5b985

> Also, can you make a pull request to the JS lib repo, with the change to the
> Mozilla.UITour API? https://github.com/Unfocused/mozilla-uitour/

https://github.com/Unfocused/mozilla-uitour/pull/6
https://hg.mozilla.org/mozilla-central/rev/be0de0e5b985
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Thanks everyone. When would this be ready for Webprod to test on the /sync page? Aurora or Beta?
Mark, let's uplift this to beta - can you do the approval requests?
Flags: needinfo?(mhammond)
Holly: this will be testable in Nightly tomorrow's build.

Assuming all goes well, it should be available for testing in Beta 31/Aurora 32 in a week or two (depends on approval time and build schedules).
Comment on attachment 8438859 [details] [diff] [review]
0001-Bug-998934-add-a-firefoxAccounts-command-to-the-UITo.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined: Users will not be able to initiate sync setup via mozilla.org
Testing completed (on m-c, etc.): Landed on m-c, has tests.
Risk to taking this patch (and alternatives if risky): None
String or IDL/UUID changes made by this patch: None
Attachment #8438859 - Flags: approval-mozilla-beta?
Attachment #8438859 - Flags: approval-mozilla-aurora?
Flags: needinfo?(mhammond)
Attachment #8438859 - Flags: approval-mozilla-beta?
Attachment #8438859 - Flags: approval-mozilla-beta+
Attachment #8438859 - Flags: approval-mozilla-aurora?
Attachment #8438859 - Flags: approval-mozilla-aurora+
Assigning to Tracy for verification, since it impacts the Sync setup flow.
QA Contact: twalker
Is the bug summary accurate for what was finally implemented here?  I ask because I don't see any "direct" link to about accounts. I do see, via the UI tour, a path to a button "Get Started with Sync," which when clicked, opens the Menu and uses UI tour styled highlighting of the Sync icon next to "Sign in to Sync."
(In reply to [:tracy] Tracy Walker - QA Mentor from comment #18)
> Is the bug summary accurate for what was finally implemented here?  I ask
> because I don't see any "direct" link to about accounts. I do see, via the
> UI tour, a path to a button "Get Started with Sync," which when clicked,
> opens the Menu and uses UI tour styled highlighting of the Sync icon next to
> "Sign in to Sync."

This bug has added the ability for certain pages on mozilla.org to open about:accounts?action=signup.  It doesn't change the existing UI Tour functionality that users see.  AFAIK, nothing on mozilla.org actually takes advantage of that yet - I believe bug 1024581 is for that, and that this bug doesn't directly need any QA (ie, it will be verified as a side-effect of verifying that other bug)
Mark, thank you for clarifying.

Marco, should bug 1024581 be added to a 33.x iteration?
Flags: needinfo?(mmucci)
Whiteboard: p=5 s=33.1 [qa+] → p=5 s=33.1 [qa-]
Hi Tracy, thanks for pointing that out.  I'll double-check with Gavin.
Flags: needinfo?(mmucci)
Bug 1024581 is a mozilla.org website bug, no need to track it in our backlog.
Tracy, if you want to verify this, you can generate your own page that triggers the showFirefoxAccounts DOM event, whitelist it for UITour (involves adding a browser.uitour.whitelist.add.* pref), and then see that the DOM event opens the right page as expected. As Mark said, though, we'll be doing that in bug 1024581 anyways so there's probably not much benefit.
Depends on: 1049155
You need to log in before you can comment on or make changes to this bug.