Closed Bug 1507569 Opened 6 years ago Closed 5 years ago

Teach canScrollVertically about fullscreen and scrollable pages (to deal with dynamic toolbar issues)

Categories

(GeckoView :: Toolbar, enhancement, P1)

Unspecified
Android
enhancement

Tracking

(firefox65 wontfix, firefox66 wontfix, firefox67 wontfix, firefox67.0.1 wontfix, firefox68 fix-optional)

RESOLVED WONTFIX
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)

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?
OS: Unspecified → Android
Assignee: nobody → snorp
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.
That would be awesome!
Points: --- → 3
Whiteboard: [geckoview:fenix:p1]
Product: Firefox for Android → GeckoView
P1 for Fenix
Priority: P3 → P1

GV apps need this functionality to know when to show or hide their dynamic toolbars.

Summary: Provide Ability to Scroll Page to canScrollVertically → Provide Ability to Scroll Page to canScrollVertically (to deal with dynamic toolbar issues)

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.

Assignee: snorp → nobody

James, can this canScrollVertically work be delegated to Gecko's Layout team? Or is this bug just asking for a GV API?

Flags: needinfo?(snorp)
Summary: Provide Ability to Scroll Page to canScrollVertically (to deal with dynamic toolbar issues) → Teach canScrollVertically about fullscreen and scrollable pages (to deal with dynamic toolbar issues)
Whiteboard: [geckoview:fenix:p1] → [geckoview:fenix:m4]

(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.

Flags: needinfo?(snorp)

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.

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.

See Also: → 1536222

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.

See Also: → 1516048
Assignee: nobody → snorp

67=wontfix. Fenix MVP will use GeckoView 68, so we don't need to uplift this fix to 67 Beta.

Whiteboard: [geckoview:fenix:m4] → [geckoview:fenix:m5]

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.

Assignee: snorp → nobody

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.

Flags: needinfo?(abovens)
Whiteboard: [geckoview:fenix:m5] → [geckoview:fenix:m6]

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).

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.

Flags: needinfo?(abovens)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX

Moving toolbar bugs to the new GeckoView::Toolbar component.

Component: General → Toolbar
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: