Closed Bug 1322726 Opened 3 years ago Closed 3 years ago

Add a UITour API to open about:newtab in the same tab

Categories

(Firefox :: Tours, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 53
Tracking Status
firefox51 --- fixed
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
For context: for the automigration (release) funnelcake for 51, we want the "intro" page that invites signups to sync etc. to segue into about:newtab. Webpages can't link to about:newtab (this is intentional.) and so we need to make an API available for it to do that.
Comment on attachment 8818880 [details]
Bug 1322726 - add UITour API to support opening about:newtab in the current tab,

https://reviewboard.mozilla.org/r/98834/#review99164

Thanks for the test
Attachment #8818880 - Flags: review?(MattN+bmo) → review+
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/754a1e0b9dea
add UITour API to support opening about:newtab in the current tab, r=MattN
https://hg.mozilla.org/mozilla-central/rev/754a1e0b9dea
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Comment on attachment 8818880 [details]
Bug 1322726 - add UITour API to support opening about:newtab in the current tab,

Approval Request Comment
[Feature/Bug causing the regression]: bug 1322718 comment #1
[User impact if declined]: can't run the funnelcake
[Is this code covered by automated tests?]: Yes. The patch adds a test.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: this is related to all the other deps of bug 1322718, but the patch is standalone and can be uplifted independently.
[Is the change risky?]: no
[Why is the change risky/not risky?]: because it's a relatively small change covered by automated tests, that is strictly additive (doesn't modify existing functionality).
[String changes made/needed]: no.
Attachment #8818880 - Flags: approval-mozilla-beta?
Attachment #8818880 - Flags: approval-mozilla-aurora?
Comment on attachment 8818880 [details]
Bug 1322726 - add UITour API to support opening about:newtab in the current tab,

Adds new behavior for onboarding funnelcake experiment. OK for aurora and beta.
Attachment #8818880 - Flags: approval-mozilla-beta?
Attachment #8818880 - Flags: approval-mozilla-beta+
Attachment #8818880 - Flags: approval-mozilla-aurora?
Attachment #8818880 - Flags: approval-mozilla-aurora+
Hey Gijs,

I thought this landed three weeks ago, but my Nightly [53.0a1 (2017-01-12) (64-bit)] says that Mozilla.UITour.showNewTab is undefined…  Am I doing something wrong here?  (Mozilla.UITour.showHighlight is there, though, if that helps…)
(In reply to Blake Winton (:bwinton) (:☕️) from comment #10)
> I thought this landed three weeks ago, but my Nightly [53.0a1 (2017-01-12)
> (64-bit)] says that Mozilla.UITour.showNewTab is undefined…  Am I doing
> something wrong here?  (Mozilla.UITour.showHighlight is there, though, if
> that helps…)

The `Mozilla.UITour` namespace is part of the library which is included in various projects. Whatever scope you're running it in probably needs to update the library from https://dxr.mozilla.org/mozilla-central/source/browser/components/uitour/UITour-lib.js.

Where are you running that code?
Flags: needinfo?(bwinton)
I just opened up a console on about:home.  But it should eventually run on https://www.mozilla.org/en-US/firefox/50.0/firstrun/?f=99 and it looks like it's showing up on the custom copy of that that we're running, so that's cool.  :)

Having said that, it doesn't seem to do anything when called from the local instance at https://127.0.0.1:8111/en-US/firefox/50.0/firstrun/?f=99  I'm assuming that's because it's not allowed, but is there a pref we can set/change to enable it to test with?

(Cc-ing Erica who's doing the actual work here…  ;)
Flags: needinfo?(bwinton)
(In reply to Blake Winton (:bwinton) (:☕️) from comment #12)
> Having said that, it doesn't seem to do anything when called from the local
> instance at https://127.0.0.1:8111/en-US/firefox/50.0/firstrun/?f=99  I'm
> assuming that's because it's not allowed, but is there a pref we can
> set/change to enable it to test with?

From the code, looks like browser.uitour.testingOrigins can be set to a comma-separated list of origins (so e.g. "https://127.0.0.1:8111/" in your example). You'll need to also toggle browser.uitour.requireSecure to false if you want to use plain (non-TLS) http.

on about:home, I don't really know where the Mozilla.UITour bits come from, but _sendEvent with the right parameters there does also work, as a workaround if that's necessary or something... but it looks like it must be fetching an old version right now, maybe via snippets or something? Not sure off-hand and it's late here.
(In reply to Blake Winton (:bwinton) (:☕️) from comment #12)
> But it should eventually run on
> https://www.mozilla.org/en-US/firefox/50.0/firstrun/?f=99 and it looks like
> it's showing up on the custom copy of that that we're running, so that's
> cool. 

I understand what you're saying now. That lib was updated 10 days ago: https://github.com/mozilla/bedrock/commit/f04a95610e6e360526563cd4779ca0fa80beaa99
You need to log in before you can comment on or make changes to this bug.