Consider the value of setDynamicToolbarMaxHeight in the height of 100vh pages
Categories
(Core :: Panning and Zooming, task, P3)
Tracking
()
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.
Comment 1•2 months ago
|
||
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?
Reporter | ||
Comment 2•2 months ago
•
|
||
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!
Comment 3•2 months ago
|
||
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
- if the toolbars are dynamic,
100svh
needs to be calculated as500px
,100lvh
needs to be calculated as600px
- if the toolbars are static, both
100svh
and100lvh
need to be calculated500px
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.
Reporter | ||
Comment 4•2 months ago
|
||
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.
Comment 5•2 months ago
|
||
(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.
Reporter | ||
Updated•2 months ago
|
Comment 6•2 months ago
|
||
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.
Comment 7•1 month ago
|
||
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.
Description
•