Closed Bug 1579004 Opened 1 year ago Closed 5 months ago

Clicking empty parts of the toolbar should shrink the megabar

Categories

(Firefox :: Address Bar, enhancement, P1)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
Firefox 71
Iteration:
71.2 - Sept 16 - 29
Tracking Status
firefox71 --- fixed

People

(Reporter: dao, Assigned: harry)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

No description provided.
Assignee: nobody → htwyford
Status: NEW → ASSIGNED

From Slack:
Should the megabar unfocus after a click on the tab area as well? What if the user clicks on the toolbar to drag the window?

Yes, it should unfocus on any click outside. The intention is that clicking back in will restore the previous state (another item on the list from last week). So for example, if I had typed "Firefox" and the dropdown was open with search and history suggestions and I click outside, the dropdown will close and the bar will unfocus. And then when I click back inside, the bar will focus and the dropdown with my results will open back up.

Iteration: --- → 71.2 - Sept 16 - 29

A couple more questions in the same vein:

  • We currently remember which tabs the Urlbar is focused in and re-focus it when the user switches to those tabs. Seeing as clicks in the tab bar now unfocus the Urlbar, is this functionality being removed? What about when the user switches between tabs with the keyboard?
  • Similarly, we unfocus the Urlbar when the user switches out of the Firefox window and then, if it was focused before, refocus the Urlbar when the user refocuses Firefox. Is this being removed, since a click outside the Urlbar unfocuses it? What about when the user switches out of Firefox with the keyboard?
Flags: needinfo?(mverdi)
Priority: -- → P1
Summary: Clicking empty parts of the toolbar should unfocus the megabar → Clicking empty parts of the toolbar should shrink the megabar
Attached image bar-states.png

I updated Invision and attached the relevant section here.

(In reply to Harry Twyford [:harry] from comment #2)

A couple more questions in the same vein:

  • We currently remember which tabs the Urlbar is focused in and re-focus it when the user switches to those tabs. Seeing as clicks in the tab bar now unfocus the Urlbar, is this functionality being removed? What about when the user switches between tabs with the keyboard?

In this case, let's use the new "focused & collapsed" state.

  • Similarly, we unfocus the Urlbar when the user switches out of the Firefox window and then, if it was focused before, refocus the Urlbar when the user refocuses Firefox. Is this being removed, since a click outside the Urlbar unfocuses it? What about when the user switches out of Firefox with the keyboard?

This should work same as it does today. So for example, if the bar is focused & expanded and I click on the desktop it should become unfocused & collapsed. If I then Alt+Tab back to Firefox it should return to focused & expanded.

Flags: needinfo?(mverdi)
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b37620ff38b6
Clicking empty parts of the toolbar should collpase the megabar. r=dao
Backout by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ececf9f6d9a5
Backed out changeset b37620ff38b6 for failures browser_urlbar_collapseOnChromeMousedown.js CLOSED TREE

Backed out changeset b37620ff38b6 for failures browser_urlbar_collapseOnChromeMousedown.js

Backout link: https://hg.mozilla.org/integration/autoland/rev/ececf9f6d9a52ef0a6c3a25699bae62f2f5c2272

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&tochange=ececf9f6d9a52ef0a6c3a25699bae62f2f5c2272&fromchange=b37620ff38b60aa8cf34bd02c4ea5d8cd0afb118&selectedJob=268223800

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=268223800&repo=autoland&lineNumber=1719

[task 2019-09-24T19:40:13.086Z] 19:40:13 INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_urlbar_collapseOnChromeMousedown.js | The Urlbar should be focused. - true == true -
[task 2019-09-24T19:40:13.087Z] 19:40:13 INFO - Buffered messages finished
[task 2019-09-24T19:40:13.088Z] 19:40:13 INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_urlbar_collapseOnChromeMousedown.js | The Urlbar should have the breakout-extend attribute. - false == true - JS frame :: chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_urlbar_collapseOnChromeMousedown.js :: <TOP_LEVEL> :: line 43
[task 2019-09-24T19:40:13.088Z] 19:40:13 INFO - Stack trace:
[task 2019-09-24T19:40:13.088Z] 19:40:13 INFO - chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_urlbar_collapseOnChromeMousedown.js:null:43
[task 2019-09-24T19:40:13.089Z] 19:40:13 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1350
[task 2019-09-24T19:40:13.090Z] 19:40:13 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1385
[task 2019-09-24T19:40:13.091Z] 19:40:13 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1207
[task 2019-09-24T19:40:13.091Z] 19:40:13 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:805
[task 2019-09-24T19:40:13.091Z] 19:40:13 INFO - Leaving test bound
[task 2019-09-24T19:40:13.092Z] 19:40:13 INFO - GECKO(1154) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2019-09-24T19:40:13.093Z] 19:40:13 INFO - GECKO(1154) | MEMORY STAT | vsize 2902MB | residentFast 415MB | heapAllocated 181MB
[task 2019-09-24T19:40:13.094Z] 19:40:13 INFO - TEST-OK | browser/components/urlbar/tests/browser/browser_urlbar_collapseOnChromeMousedown.js | took 2592ms

Flags: needinfo?(htwyford)
Attachment #9094009 - Attachment description: Bug 1579004 - Clicking empty parts of the toolbar should collpase the megabar. r?dao → Bug 1579004 - Clicking empty parts of the toolbar should collapse the megabar. r?dao

I pushed a new revision to Phabricator with a green try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=881defd8994906a91a2d4ca4e957f51febf32619&selectedJob=268231104. I'm going to attempt to push again.

Flags: needinfo?(htwyford)
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e59677a62de7
Clicking empty parts of the toolbar should collapse the megabar. r=dao
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Regressions: 1583708
Blocks: 1584167
No longer regressions: 1583708
Blocks: 1582375
Blocks: 1584507
No longer blocks: 1582375
Regressions: 1586024
QA Whiteboard: [qa-71b-p2]
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.