Closed Bug 1915424 Opened 2 months ago Closed 1 month ago

Consider the value of setDynamicToolbarMaxHeight in the height of 100vh pages

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1921339

People

(Reporter: petru, Unassigned)

Details

Opening this just to have a starting point for this work. Everything is up for the APZ team's consideration.

We discussed recently that by moving to use the scroll data to animate the toolbar we'd be left with a bug on 100vh pages that will not scroll but on which we'd need to hide the toolbar to interact with the content at the bottom of the webpage.

One proposal is to use the height of the toolbar - reported through setDynamicToolbarMaxHeight in knowing how tall the webpage should be.
This would ensure that the entire webpage content is rendered - no need to scroll the webpage or hide the toolbar.

Special attention is needed for landscape mode - on phones we'd probably want to allow the webpage to be scrolled.

Blocks: 1914119

I don't quite understand what we consider. Would you mind clarifying it? A couple of examples would be helpful to understand it, I guess.

From what I can tell is that

If the toolbar is dynamic, '100vh' (to be precise we should use 100lvh) includes the toolbar height.
If the toolbar is static, 100vh doesn't include the toolbar height.

These facts are also applicable to landscape mode.

To me your proposal sounds like, even if the Fenix's toolbar setting is "dynamic", Fenix should behave as if it's static?

To me your proposal sounds like, even if the Fenix's toolbar setting is "dynamic", Fenix should behave as if it's static?

That's it!

I don't think that's a good idea...

Given that Fenix's browser height is 600px including the toolbars, and the toolbars' height is 100px, then

  1. if the toolbars are dynamic, 100svh needs to be calculated as 500px, 100lvh needs to be calculated as 600px
  2. if the toolbars are static, both 100svh and 100lvh need to be calculated 500px

This is a principal concept of dynamic toolbar on mobile.

Your idea will introduce a new behavior on the mobile world, no other browser does such thing, it will confuse web developers.

Users can already set the toolbars to be static in app's settings so I don't see why it would be an issue 🤔

Otherwise we'd need a workaround for the scrollDelegate not emitting anything for 100vh pages to still drive hiding the toolbar.

(In reply to Petru-Mugurel Lingurar [:petru] from comment #4)

Users can already set the toolbars to be static in app's settings so I don't see why it would be an issue 🤔

That's the reason why it will confuse web developers.

Imagine that there's a web developer who made a choice to enable the Fenix's dynamic toolbar option, then the developer creates a 100lvh height web content or 100lvh height element in the web content, then the person will definitely realize it's wrongly calculated, I can imagine the developer will file a bug for us.

Blocks: 1915638
No longer blocks: 1914119

I expect figuring out the treatment of 100vh pages will be one of the outcomes of the design exploration being conducted by Markus.

APZ implementation work will be tracked in https://mozilla-hub.atlassian.net/browse/FFXP-2997; I'll add this bug there.

Priority: -- → P3

I've written down the suggested approach in bug 1921339. I'll just mark this bug as a duplicate so as to not confuse things too much.

No longer blocks: 1915638
Status: NEW → RESOLVED
Closed: 1 month ago
Duplicate of bug: 1921339
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.