Closed
Bug 1177175
Opened 9 years ago
Closed 9 years ago
Add a UITour target inside the TP panel
Categories
(Firefox :: Tours, defect, P1)
Firefox
Tours
Tracking
()
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: MattN, Assigned: Paolo)
References
Details
(Whiteboard: [fxprivacy] [campaign])
Attachments
(1 file)
We may want to anchor a tour panel on the Tracking Protection panel for the first run experience.
The anchor should be on the side so we should use the infoPanelPosition property and maybe infoPanelOffsetY too.
Flags: firefox-backlog+
Updated•9 years ago
|
Rank: 17
Priority: -- → P1
Updated•9 years ago
|
Priority: P1 → P2
Updated•9 years ago
|
Flags: qe-verify-
Updated•9 years ago
|
Rank: 17
Updated•9 years ago
|
Points: --- → 8
Rank: 17
Priority: P2 → P1
Updated•9 years ago
|
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Iteration: --- → 42.2 - Jul 27
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Assignee | ||
Comment 2•9 years ago
|
||
Work in progress, mostly works but the tests and the panel close logic need adjustments. Also, the arrow of the UITour "tooltip" panel is hidden behind the Control Center panel.
Reporter | ||
Comment 3•9 years ago
|
||
https://reviewboard.mozilla.org/r/13527/#review12195
::: browser/components/uitour/UITour.jsm:125
(Diff revision 1)
> + ["controlCenter-tracking-action-unblock", {
Nit: "controlCenter-trackingUnblock"
::: browser/components/uitour/UITour.jsm:1833
(Diff revision 1)
> getAvailableTargets: function(aMessageManager, aChromeWindow, aCallbackID) {
Could you add a test that your new target isn't in available targets when the menu is closed but is when the menu opens. I updated my patch to invalidate the available targets cache.
::: browser/components/uitour/UITour.jsm:127
(Diff revision 1)
> + query: (aDocument) => {
Nit: feel free to use newer method syntax for new lines since you're not using `this` anyways:
`query(aDocument) {`
::: browser/components/uitour/test/browser.ini:54
(Diff revision 1)
> +[browser_UITour_trackingprotection.js]
Nit: The _UITour_ in the file name is legacy cruft from before the tests moved to their own component.
You can add this to browser_trackingProtection.js
::: browser/components/uitour/test/head.js:179
(Diff revision 1)
> -function loadUITourTestPage(callback, host = "https://example.com/") {
> +function loadUITourTestPage(callback, host = "https://tracking.example.org/") {
Try to leave "tracking." out of the domain as we discussed.
Assignee | ||
Comment 4•9 years ago
|
||
Somewhat unrelated, I've noticed that the browser_UITour_availableTargets.js test fails when run on its own because of a missing "accountStatus" target. I'm testing all the directory at once for now.
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Matthew N. [:MattN] from comment #3)
> You can add this to browser_trackingProtection.js
I actually had to create a separate browser_trackingProtection_tour.js file in order to use the test runner that load the content API (like browser_showMenu_controlCenter does).
Assignee | ||
Updated•9 years ago
|
Attachment #8635296 -
Flags: review?(MattN+bmo)
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8635296 [details]
MozReview Request: Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8635296 [details]
MozReview Request: Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Assignee | ||
Comment 8•9 years ago
|
||
So, the tooltip appeared behind the panel since the latter had level="top". The only way to solve that without changing the level of the Control Center is to open the tooltip with level="top" as well, which can be done by setting the attribute on the element just before opening the popup.
I think the patch in ready for a full review now.
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8635296 [details]
MozReview Request: Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Assignee | ||
Comment 10•9 years ago
|
||
Fixed an issue highlighted by a previous try run, caused by the fact that the first item in server-locations.txt is used to generate the CN of the Issued To field of the certificate. I still reordered the example.org entry to match the order in the HTTP section for clarity.
Reporter | ||
Comment 11•9 years ago
|
||
(In reply to :Paolo Amadini from comment #8)
> So, the tooltip appeared behind the panel since the latter had level="top".
> The only way to solve that without changing the level of the Control Center
> is to open the tooltip with level="top" as well, which can be done by
> setting the attribute on the element just before opening the popup.
level=top is almost always a bad thing in my experience (especially when combined with noautohide=true). I didn't realize the control center had that set to "top". It was added in http://hg.mozilla.org/mozilla-central/diff/fcc32ef59156/browser/base/content/browser.xul but the rationale isn't clear to me. While working on Australis, we removed level="top" from a few panels (most notably the new menu panel) because it caused problems and I think we'll those here too.
According to the definition from https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/panel.level, we wouldn't want level="top" since the identity panel shouldn't appear above other applications.
Masayuki, can you explain the difference in UX if we remove level="top" from the identity panel (aka. control center)? Note that during the UITour we will set @noautohide=true.
Flags: needinfo?(masayuki)
Reporter | ||
Comment 12•9 years ago
|
||
Comment on attachment 8635296 [details]
MozReview Request: Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
https://reviewboard.mozilla.org/r/13527/#review12207
::: browser/components/uitour/UITour.jsm:1750
(Diff revision 4)
> onPanelHidden: function(aEvent) {
> aEvent.target.removeAttribute("noautohide");
> UITour.recreatePopup(aEvent.target);
> this.availableTargetsCache.clear();
Would you mind fixing a mistake in my patch. This bottom line should be:
UITour.availableTargetsCache.clear();
::: browser/components/uitour/UITour.jsm:1505
(Diff revision 4)
> + if (aAnchor.infoPanelOnTop) {
> + tooltip.setAttribute("level", "top");
> + }
> tooltip.openPopup(aAnchorEl, alignment, xOffset || 0, yOffset || 0);
> + if (aAnchor.infoPanelOnTop) {
> + tooltip.removeAttribute("level");
> + }
I really think we should remove @level=top from teh control center instead. To see the problem, switch to another application while the control center is opened by showMenu. It will appear above the other application.
::: browser/components/uitour/UITour.jsm:132
(Diff revision 4)
> + if (popup.state != "open") {
> + return null;
> + }
You could use `UITour.isElementVisible` on the element instead which also handles other reasons why it may not be visible.
::: browser/components/uitour/test/browser_trackingProtection_tour.js:42
(Diff revision 4)
> + let available = (data.targets.indexOf(currentTarget) != -1);
> + ok(!available, "Control Center targets should not be available by default");
Once you fix the place I made a mistake with above, can you add a test that the target is no longer available after closing the control center.
::: browser/components/uitour/test/browser_trackingProtection_tour.js:56
(Diff revision 4)
> + yield ContentTask.spawn(gBrowser.selectedBrowser, {}, function () {
> + content.document.getElementById("tracking-element").remove();
> + });
> + }),
> +];
Can you also test that `hideMenu("controlCenter")` causes the info panel to automatically hide?
Attachment #8635296 -
Flags: review?(MattN+bmo)
Assignee | ||
Updated•9 years ago
|
Attachment #8635296 -
Flags: review?(MattN+bmo)
Assignee | ||
Comment 13•9 years ago
|
||
Comment on attachment 8635296 [details]
MozReview Request: Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to Matthew N. [:MattN] from comment #12)
> You could use `UITour.isElementVisible` on the element instead which also
> handles other reasons why it may not be visible.
Note that in addition to isElementVisible I also had to retain the check on the visibility of the panel, otherwise the test wouldn't pass. Maybe the state that causes isElementVisible to return false is not updated fast enough, despite the identity panel itself is being hidden.
Reporter | ||
Comment 15•9 years ago
|
||
Comment on attachment 8635296 [details]
MozReview Request: Bug 1177175 - Add a UITour target inside the TP panel. r=MattN
https://reviewboard.mozilla.org/r/13527/#review12247
Thanks for the test fixes!
Attachment #8635296 -
Flags: review?(MattN+bmo) → review+
Assignee | ||
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Comment 18•9 years ago
|
||
(In reply to Matthew N. [:MattN] from comment #11)
> (In reply to :Paolo Amadini from comment #8)
> According to the definition from
> https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/panel.
> level, we wouldn't want level="top" since the identity panel shouldn't
> appear above other applications.
>
> Masayuki, can you explain the difference in UX if we remove level="top" from
> the identity panel (aka. control center)? Note that during the UITour we
> will set @noautohide=true.
It's better not to use front-most window since as you mentioned, it can appear other application's window too. If level="top" not specified, the window level depends on the platform. Unfortunately, Linux's default window level is "top". So, you should check if the issue isn't reproduced on Linux.
Flags: needinfo?(masayuki)
Updated•9 years ago
|
Whiteboard: [fxprivacy] → [fxprivacy] [campaign]
You need to log in
before you can comment on or make changes to this bug.
Description
•