Closed Bug 935823 Opened 11 years ago Closed 10 years ago

UITour: Add close button to info panel

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 30
Tracking Status
firefox29 --- verified
firefox30 --- verified

People

(Reporter: Unfocused, Assigned: MattN)

References

(Depends on 1 open bug)

Details

(Whiteboard: [Australis:P4])

Attachments

(1 file)

Current thinking is we'd like a close button on the info panels. This is going against the established norm for Firefox, but we also have to be more careful with new users unfamiliar with Firefox here.
Priority: -- → P3
Priority: P3 → P2
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
Depends on: 938079
Details regarding the logic of the 'x' button:
Many users will select 'x' and remove the Update doorhanger when seeing it for the first time. However, we would like one more chance to catch these users the next time they open their browser. 

Selecting 'x' will act as "Not Now" ONLY the first time the user selects the 'x'. Selecting 'x' the first time the user sees the doorhanger means that the next time the browser opens we will display the doorhanger once more. Selecting 'x' to close the doorhanger for a second time means we will not show this to them ever again.


Question: Can the amount of times we recall the doorhanger after selecting 'x' be a variable so that we have control over it? At this time I don't think we would want to show the doorhanger more than once more, but there may be a situation in the future where we would want to do so more than once. 


How is this different than clicking the "Not Now" link?  
The user can select "Not Now" over and over until we discontinue this experience from our end. So each time the user selects "Not Now" we will show them the doorhanger and Update page the next time they open the browser.
It is also important to note that this doesn't apply to just the doorhanger, but the URL/webpage that accompanies it.
Assignee: MattN+bmo → nobody
Status: ASSIGNED → NEW
Button added in the patch in bug 958673, but without the behaviour described in comment 1. So leaving this open for that to be fixed.
Whiteboard: [maybe-fix-on-aurora]
Whiteboard: [maybe-fix-on-aurora] → [can-fix-on-aurora]
Bumping to P4 since there are other ways to exit the tour and other styling bugs are more important.
Priority: P2 → P3
Priority: P3 → P4
(In reply to Alex Gibson [:agibson] from comment #28)
> Blair, can the web page tell if the user has clicked the close (x) button in
> the new style door hanger? 
> 
> Currently the door-hanger closes but nothing else happens.

Seems we want some form of callback too.
Note: Although the button was added in bug 958673, it's been temporarily disabled in bug 966913 at least until we can get the callback implemented.
No longer depends on: 966933
Priority: P4 → P3
See Also: → 938079
I think this bug should just focus on making the close button visible and calling a callback. Bug 938079 will handle re-displaying the tour at later times.

Holly, there are concerns that users aren't going to understand the difference between the X and "Not now" so for now I think they should have the same behaviour if this gets implemented.
Priority: P3 → --
Whiteboard: [can-fix-on-aurora] → [Australis:P4]
Having the close button visible will help make the desired design for bug 971108.
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
Attachment #8387369 - Flags: review?(bmcbride)
Comment on attachment 8387369 [details] [diff] [review]
v.1 Add a close callback argument

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

::: browser/modules/UITour.jsm
@@ +861,5 @@
>  
>      this._setAppMenuStateForAnnotation(aWindow, "highlight", false);
>    },
>  
> +  showInfo: function(aContentDocument, aAnchor, aTitle = "", aDescription = "", aIconURL = "", aButtons = [], closeCallbackID = null) {

This could do with some wrapping.

::: browser/modules/test/browser_UITour3.js
@@ +135,5 @@
> +    function closeButtonCallback() {
> +      ok(true, "Close button callback called");
> +      done();
> +    }
> +    gContentAPI.showInfo("urlbar", "Close me", "X marks the spot", null, null, closeButtonCallback);

Hm, I'm starting to worry about the parameters we have for this method - with the latest addition it feels unwieldy. How about a general options param we can put all the extra misc additions into:


  gContentAPI.showInfo("urlbar", "Close me", "X marks the spot", null, null, {
    onClose: closeCallback
  });

(Not intending any structural change to how it's actually sent via _sendEvent, though I don't think it needs to be called "closeButtonCallback" per se.)
Attachment #8387369 - Flags: review?(bmcbride) → review+
https://hg.mozilla.org/integration/fx-team/rev/048536bb76ef
Flags: in-testsuite+
Whiteboard: [Australis:P4] → [Australis:P4][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/048536bb76ef
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:P4][fixed-in-fx-team] → [Australis:P4]
Target Milestone: --- → Firefox 30
Blair / Matt - could one of you please update australis-uitour.js so I know what to use for the callback here?

Thanks
Flags: needinfo?(bmcbride)
Flags: needinfo?(MattN+bmo)
I can see the close button in the menu panel now, but I can't seem to get the callback to fire? Perhaps the code for the callback has not made it in just yet, so will try again tomorrow.
Ugh, wish we had a smoother process for this. It's in the library on Github now:
https://github.com/Unfocused/mozilla-uitour/commit/51fad56eea77b5cb224032b05baccfbedde80fa2

It has *not* landed on Aurora yet. So if you're expecting to be able to test it, you'll need to be running Nightly for now.
Flags: needinfo?(bmcbride)
Flags: needinfo?(MattN+bmo)
Comment on attachment 8387369 [details] [diff] [review]
v.1 Add a close callback argument

[Approval Request Comment]
Bug caused by (feature/regressing bug #): None
User impact if declined: No close button on tour info panel. Can use one of the main buttons, but some people expect to see a close button.
Testing completed (on m-c, etc.): Unit tests on m-c
Risk to taking this patch (and alternatives if risky): Minimal
String or IDL/UUID changes made by this patch: None, strings were already in tree
Attachment #8387369 - Flags: approval-mozilla-aurora?
Attachment #8387369 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: