Show a minimal display toolbar when keyboard is open showing just the URL
Categories
(Firefox for Android :: Toolbar, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox148 | --- | verified |
People
(Reporter: petru, Assigned: petru)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug, Whiteboard: [fxdroid][group3])
User Story
user-impact-score:300
Attachments
(8 files, 2 obsolete files)
|
64.94 KB,
image/png
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
301.30 KB,
image/jpeg
|
Details |
Currently when the keyboard is open the bottom toolbar is still dynamic and can be swiped away while the user inputs text.
We should rather show a fixed smaller toolbar showing just the current registrable domain, similar to what we shown in custom tabs.
We should also call setVerticalClipping with the values of the full/mini toolbar when cycling between them to inform GeckoView about the page height occluded by the bottom toolbar.
Figma design link.
Comment 1•10 months ago
|
||
The behavior change should fix a couple of webcompat issues such as bug 1953721 and bug 1943053.
Updated•10 months ago
|
| Assignee | ||
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Comment 2•7 months ago
|
||
While working on this I remembered that a recent feature for animating the toolbar in sync with the keyboard is only working on Android 13+ because of how unreliable knowing when the keyboard is shown is - for more context see bug 1946404.
Also saw issues with the current keyboardAsState method: while the keyboard is up just scrolling up/down the webpage would recheck whether the keyboard is shown and would trigger a spurious flow of updates, including ones informing that the keyboard is not shown - while clearly on the screen.
Checking for how Chrome handles this it seems like they have a single point in the app through which the keyboard is shown or hidden and then easily fire callbacks for when different parts of the app requested the keyboard to be shown or hidden and in this avoiding the glitches in the insets framework.
We rather rely on system calls to show/hide the keyboard and then separate system listeners for when the keyboard is shown or hidden.
Refactoring the code in our entire app to match the approach Chrome takes - which seems more reliable - is outside the scope of this ticket so initially I propose to only support Android 13+ devices with this feature.
| Assignee | ||
Comment 3•7 months ago
|
||
Saw in my testing that the current version of keyboardAsState is not entirely
reliable and sometimes returning the wrong value.
Checking Chrome sources I saw there the insets are derived from current
Activity's root View, approach I also borrowed.
Added also the isImeVisible convenience method already available in
the jetpack Compose framework as the source of the data on Android 13+
while on lower Android versions we'll use the more expensive but more
reliable GlobalLayoutListener approach to know when to recheck and report
the keyboard state.
| Assignee | ||
Comment 4•7 months ago
|
||
Saw in my testing that the current version of keyboardAsState is not entirely
reliable and sometimes returning the wrong value.
Checking Chrome sources I saw there the insets are derived from current
Activity's root View, approach I also borrowed.
Added also the isImeVisible convenience method already available in
the jetpack Compose framework as the source of the data on Android 13+
while on lower Android versions we'll use the more expensive but more
reliable GlobalLayoutListener approach to know when to recheck and report
the keyboard state.
| Assignee | ||
Comment 5•7 months ago
|
||
On Android 13+ the transition will use the same duration and interpolator
as the ones used for the keyboard animation to ensure a smooth animation.
| Assignee | ||
Comment 6•7 months ago
|
||
Saw in manual testing that wrapping the display toolbar with the CFR will
negatively impact the transition between the full and minimal toolbar, it
resulting in a wrong computed height for the toolbar & wrong animation.
| Assignee | ||
Comment 7•7 months ago
|
||
| Assignee | ||
Comment 8•7 months ago
|
||
| Assignee | ||
Comment 9•7 months ago
|
||
Complex code showing that we have room for improvement on the layout
structure on the browser screen but on manual testing on wikipedia and
https://interop-2022-viewport.netlify.app/combined/viewport-units/
this rules should cover all scenarios of bottom & top toolbars.
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
| Assignee | ||
Comment 10•7 months ago
|
||
Safer to go with a staged rollout given the complexity of the changes.
Comment 11•7 months ago
|
||
Comment 12•7 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/d9ee2f01223d
https://hg.mozilla.org/mozilla-central/rev/f9ada3014255
https://hg.mozilla.org/mozilla-central/rev/cf62ecca3885
https://hg.mozilla.org/mozilla-central/rev/9b4bcdaae0a4
https://hg.mozilla.org/mozilla-central/rev/c6c6b1c74cbd
https://hg.mozilla.org/mozilla-central/rev/6efdeae1726d
| Assignee | ||
Comment 13•7 months ago
|
||
@QA Please help check on both older and newer Android versions that whenever the user enters text in a website the bottom/top toolbars stay fixed in place and that if the addressbar is at the bottom it will be changed to only show the domain name and the security indicator + when clicked will close the keyboard.
Also ensure that nothing gets broken in the website layout - it can still be scrolled to the top and bottom with no unexpected paddings.
Comment 14•7 months ago
|
||
Verified on the latest Firefox for Android Nightly 148.0a1 from 12/22 from PlayStore, with the following devices:
- Pixel (Android 10),
- Realme GT Master Edition (Android 13),
- Pixel 6 (Android 16), and a
- Samsung Galaxy Tab S9 Ultra (Android 16).
When the toolbar is set at the bottom, the minimal toolbar is displayed fixed, above the keyboard, contianing the domain of the URL.
When the toolbar is set at the top, the minimal toolbar is not displayed at all.
The "Use a minimal bottom toolbar while entering text in a website" option from Secret Settings is enabled by default.
Updated•7 months ago
|
Description
•