Teach canScrollVertically about fullscreen and scrollable pages (to deal with dynamic toolbar issues)
Categories
(GeckoView :: Toolbar, enhancement, P1)
Tracking
(firefox65 wontfix, firefox66 wontfix, firefox67 wontfix, firefox67.0.1 wontfix, firefox68 fix-optional)
Tracking | Status | |
---|---|---|
firefox65 | --- | wontfix |
firefox66 | --- | wontfix |
firefox67 | --- | wontfix |
firefox67.0.1 | --- | wontfix |
firefox68 | --- | fix-optional |
People
(Reporter: ekager, Unassigned)
References
()
Details
(Whiteboard: [geckoview:fenix:m6])
Attachments
(1 file)
38.46 KB,
image/jpeg
|
Details |
We are dealing with an issue with the collapsing toolbar in Focus (and FFTV and AC), where on a page meant to be fullscreen, you can still scroll the distance that the toolbar collapses. For example on maps.google.com etc. https://github.com/mozilla-mobile/focus-android/issues/3815 I have a WV workaround that uses (getWebView() as NestedWebView).canScrollVertically(1) to tell if we should remove/add the scroll flags once a site is loaded. WIP Workaround: https://github.com/ekager/focus-android/commit/09c0618918a0c2a3e022c6d89c62153a9c5c4767 Currently, canScrollVertically for GV does not return anything different for fullscreen sites vs scrollable sites. Would it be possible to make this respond to the ability of the page to scroll?
Updated•6 years ago
|
This really annoys me in Focus so I'll take this.
With WV, they use `View.canScrollVertically()` to determine this, but there isn't any notification of when this changes. We can do better with GV by adding a listener/delegate to the `GeckoView` class.
Updated•6 years ago
|
Reporter | ||
Comment 3•6 years ago
|
||
That would be awesome!
Updated•6 years ago
|
Updated•5 years ago
|
Comment 5•5 years ago
|
||
GV apps need this functionality to know when to show or hide their dynamic toolbars.
Comment 6•5 years ago
|
||
Unassigning James because we don't need to work on this issue until Fenix asks for it. The viewport issues might be less of a problem with Fenix's bottom toolbar compared to Fennec's top toolbar.
Comment 7•5 years ago
|
||
James, can this canScrollVertically work be delegated to Gecko's Layout team? Or is this bug just asking for a GV API?
(In reply to Chris Peterson [:cpeterson] from comment #7)
James, can this canScrollVertically work be delegated to Gecko's Layout team? Or is this bug just asking for a GV API?
I think APZ has all the info we need, just need to expose it in GV.
Comment 9•5 years ago
|
||
I'm CC'ing Hiro in case there's anything we can help with on the layout or APZ side, but based on comment 8 it sounds like this is mostly a GV API issue.
Comment 10•5 years ago
|
||
I am not sure I am understanding exactly what we need in this bug, but it seems to me VisualViewport class knows all the info what we need (I believe the VisualViewport class should have it). And yeah, the work we need is mostly in GV.
Comment 11•5 years ago
|
||
Reference Browser issue https://github.com/mozilla-mobile/reference-browser/issues/464 might depend on this bug.
Comment 12•5 years ago
|
||
Wanted to add this as potential insight: Chrome has an interesting implementation for their bottom nav bar that is currently in their Canary channel which is worth checking out. They stick web content that usually anchors itself to the bottom of the page to be anchored on top of the toolbar. Reddit's website/app chooser, for example, then scrolls up/down but the rest of the content window doesn't change.
Here's a screenshot of what that looks like mid-scroll.
Comment 13•5 years ago
|
||
67=wontfix. Fenix MVP will use GeckoView 68, so we don't need to uplift this fix to 67 Beta.
Updated•5 years ago
|
Comment 14•5 years ago
|
||
Andreas will suggest to Vesta that Fenix MVP use a fixed bottom address bar. That would avoid a lot of these viewport scaling issues for MVP. We can revisit a hiding address bar post-MVP.
Comment 15•5 years ago
|
||
Andreas, have you asked Vesta about using a fixed bottom address bar in Fenix MVP? That would avoid a lot of these viewport scaling issues for MVP. We can revisit a hiding address bar post-MVP.
Comment 16•5 years ago
|
||
The patch from bug 1516048 is working great for scrollable pages. This here would be the last piece to make the bottom toolbar work in all cases (as far as we know right now).
Comment 17•5 years ago
|
||
Resolving this bug as WONTFIX. James recommends Fenix use the DynamicToolbarAnimator API, which is what Fennec uses. canScrollVertically is not a complete solution because it doesn't notify the app when pages change scrollable state.
Updated•5 years ago
|
Comment 18•2 years ago
|
||
Moving toolbar bugs to the new GeckoView::Toolbar component.
Description
•