Closed Bug 962069 Opened 10 years ago Closed 10 years ago

Dragging an item on to the toolbar overflow chevron should open the overflow popup

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 32

People

(Reporter: jaws, Assigned: jaws)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [Australis:P5] p=3 s=it-32c-31a-30b.3 [qa!] )

Attachments

(1 file, 4 obsolete files)

STR:
Place enough items in the navigation toolbar and resize the window so that items are overflowed and the chevron appears.
Drag a link from a webpage to the overflow chevron.

ER:
The chevron should open and show the overflowed items so the dragged item can be dropped on an overflowed item.

AR:
Nothing happens (circle with line through it showing that the item cannot be dropped there).
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
Attachment #8363002 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8363002 [details] [diff] [review]
Patch

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

::: browser/components/customizableui/src/CustomizableUI.jsm
@@ +3177,5 @@
> +      case "customizationstarting":
> +        this._disable();
> +        break;
> +      case "dragover":
> +        this.show();

It looks like this never hides the panel. That doesn't seem right. When the drag leaves the panel and chevron for more than ~500ms, we should hide the panel again.

::: browser/components/customizableui/test/browser_962069_drag_to_overflow_chevron.js
@@ +18,5 @@
> +  let widgetOverflowPanel = document.getElementById("widget-overflow");
> +  let panelShownPromise = promisePanelElementShown(window, widgetOverflowPanel);
> +  let identityBox = document.getElementById("identity-box");
> +  let overflowChevron = document.getElementById("nav-bar-overflow-button");
> +  ChromeUtils.synthesizeDrop(identityBox, overflowChevron, [], null);

Equally, after a drop, I'd expect the panel to be hidden already.
Attachment #8363002 - Flags: review?(gijskruitbosch+bugs)
Whiteboard: [Australis:P5]
Attached patch Patch v2 (obsolete) — Splinter Review
Attachment #8363002 - Attachment is obsolete: true
Attachment #8409163 - Flags: review?(MattN+bmo)
Attachment #8409163 - Flags: review?(mdeboer)
Comment on attachment 8409163 [details] [diff] [review]
Patch v2

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

Jared, thanks for working on this - looking good!

One problem I noticed is that after performing the following steps...

1. Drag a link on the overflow chevron, which opens the overflow panel.
2. Drag it out of the overflow popup and let it go to hide the overflow panel.
3. Click on the overflow chevron to open the panel again
4. Click on the overflow chevron again to hide it.

... the overflow button stays in the [open] state.

I *think* this has something to do with you setting `this._chevron.open` on a timed hiding of the panel.

Can you upload a patch with this issue fixed? I think that'd be all then.

One other thing/ question: do you always need the `dragover` and `dragend` listeners on the overflow panel? If not, is possible to add them upon chevron dragover?
Attachment #8409163 - Flags: review?(mdeboer)
Attachment #8409163 - Flags: review?(MattN+bmo)
Attachment #8409163 - Flags: feedback+
Flags: firefox-backlog+
Whiteboard: [Australis:P5] → [Australis:P5] p=3 s=it-32
Attached patch Patch v3 (obsolete) — Splinter Review
<jaws> mikedeboer: hey, do you think you could do a short screencast showing that bug you found with the patch in bug 962069? i don't think i have the right timing to reproduce it
<mikedeboer> jaws: I can't reproduce it anymore! :/
<jaws> mikedeboer: heh, well that makes me feel better because i couldn't either!

However I did notice that the panel would hide if the mouse stopped for over the timeout duration (500ms) while on top of the panel. This is now fixed.
Attachment #8409163 - Attachment is obsolete: true
Attachment #8426384 - Flags: review?(mdeboer)
Comment on attachment 8426384 [details] [diff] [review]
Patch v3

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

Apart from a few minor things, this looks very good to me.

Thanks for the test!

::: browser/components/customizableui/src/CustomizableUI.jsm
@@ +4096,5 @@
> +    this._hideTimeoutId = window.setTimeout(() => {
> +      if (!this._panel.firstChild.mozMatchesSelector(":hover")) {
> +        this._panel.hidePopup();
> +      }
> +    }, 500);

please put this timeout value in a constant at the top of this file.

::: browser/components/customizableui/test/browser_962069_drag_to_overflow_chevron.js
@@ +6,5 @@
> +
> +let originalWindowWidth;
> +
> +// Drag to overflow chevron should open the overflow panel.
> +add_task(function() {

nit: can you land this with an asterisk?

@@ +30,5 @@
> +  EventUtils.synthesizeKey("VK_ESCAPE", {});
> +  yield panelHiddenPromise;
> +});
> +
> +add_task(function() {

nit: same here.
Attachment #8426384 - Flags: review?(mdeboer) → review+
Attached patch Patch v3 (nits fixed) (obsolete) — Splinter Review
Thanks, nits addressed and carrying forward r+
Attachment #8426384 - Attachment is obsolete: true
Attachment #8426396 - Flags: review+
Please run this through Try first :)
Keywords: checkin-needed
Attached patch Patch v3.1Splinter Review
My try push showed that after the nits fixed the event listeners weren't being added correctly. Tested locally and pushed to tryserver:
https://tbpl.mozilla.org/?tree=Try&rev=aa38f77b69d5
Attachment #8426396 - Attachment is obsolete: true
Attachment #8426777 - Flags: review?(mdeboer)
Review ping?
Flags: needinfo?(mdeboer)
Comment on attachment 8426777 [details] [diff] [review]
Patch v3.1

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

::: browser/components/customizableui/src/CustomizableUI.jsm
@@ +4096,5 @@
> +      window.clearTimeout(this._hideTimeoutId);
> +      this._hideTimeoutId = null;
> +    }
> +    this._hideTimeoutId = window.setTimeout(() => {
> +      if (!this._panel.firstChild.mozMatchesSelector(":hover")) {

if this is true, shouldn't this re-trigger the delayed-hiding of the panel?
IOW, try again later?
Attachment #8426777 - Flags: review?(mdeboer)
Jared, sorry for noticing your ping earlier... I already signed off for the day :/
Flags: needinfo?(mdeboer)
Comment on attachment 8426777 [details] [diff] [review]
Patch v3.1

After pondering over my previous comment, I conclude that the behavior as currently implemented makes more sense and is preferable over retriggering the timeout.
Attachment #8426777 - Flags: review+
https://hg.mozilla.org/integration/fx-team/rev/8132875a4515
Keywords: checkin-needed
Whiteboard: [Australis:P5] p=3 s=it-32 → [Australis:P5] p=3 s=it-32[fixed-in-fx-team]
Whiteboard: [Australis:P5] p=3 s=it-32[fixed-in-fx-team] → [Australis:P5] p=3 s=it-32c-31a-30b.2 [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/8132875a4515
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:P5] p=3 s=it-32c-31a-30b.2 [fixed-in-fx-team] → [Australis:P5] p=3 s=it-32c-31a-30b.2
Target Milestone: --- → Firefox 32
Depends on: 1015617
Whiteboard: [Australis:P5] p=3 s=it-32c-31a-30b.2 → [Australis:P5] p=3 s=it-32c-31a-30b.3 [qa?]
Whiteboard: [Australis:P5] p=3 s=it-32c-31a-30b.3 [qa?] → [Australis:P5] p=3 s=it-32c-31a-30b.3 [qa+]
QA Contact: cornel.ionce
Mozilla/5.0 (Windows NT 6.3; rv:32.0) Gecko/20100101 Firefox/32.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0
Mozilla/5.0 (X11; Linux i686; rv:32.0) Gecko/20100101 Firefox/32.0

Got the expected result on latest Nightly, build ID: 20140528030219.
Marking issue verified.
Status: RESOLVED → VERIFIED
Whiteboard: [Australis:P5] p=3 s=it-32c-31a-30b.3 [qa+] → [Australis:P5] p=3 s=it-32c-31a-30b.3 [qa!]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: