Closed Bug 1003048 Opened 12 years ago Closed 12 years ago

Tour pages should try to detect if Mozilla.UITour APIs are working or not

Categories

(www.mozilla.org :: Pages & Content, defect)

Production
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Unfocused, Assigned: agibson)

Details

(Whiteboard: [kb=1349233])

Attachments

(1 file)

So, we've just had bug 1003031 on the Australis release version. For some reason, the www.mozilla.org domain was never given permissions to use the UITour APIs in this person's Firefox profile. I have currently no reason to believe this is anything but a outlier issue. Nevertheless, the result was that the tour page was broken. There was the modal overlay blocking all normal page content, and no doorhanger to start/dismiss the tour. This got me thinking - the page should be able to detect if the UITour APIs are working or not. If they're not, then it should probably just display the content as if the tour was dismissed. IIRC, on page load, it calls Mozilla.UITour.getConfiguration(), and waits for the callback. If it doesn't receive the callback within a reasonable amount of time, it should just assume the API is unavailable. Now, getConfiguration() for this is overloading it a bit, and firefox needs to do a decent amount of processing to get it's result to return - so it is in fact async. So eventually we could introduce an API call that is dedicated to this and that is designed to return the callback event as quickly as possible. ie, a ping-pong API.
Only starting the tour/ door hanger inside the callback for getConfiguration seems to work, so let's get this added.
Assignee: nobody → agibson
Status: NEW → ASSIGNED
Attached file GitHub pull request
Whiteboard: [kb=1349233]
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/c080ceb947ccd9087ed8bd67858a35a52c982578 [fix bug 1003048] Tour pages should try to detect if Mozilla.UITour APIs https://github.com/mozilla/bedrock/commit/571a38e563829e8ef7f53d2d9963620f00bc3356 Merge pull request #1938 from alexgibson/1003048-detect-ui-tour [fix bug 1003048] Tour pages should try to detect if Mozilla.UITour APIs are working
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Just realised there's a much simpler way to test/verify this than what I first explained to Alex: * Open about:config * Set browser.uitour.enabled to false * Load tour page * Tour should act as though the tour was dismissed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: