Open Bug 1850808 Opened 1 year ago Updated 2 months ago

[meta] Zoom Options on Android

Categories

(GeckoView :: General, task, P3)

All
Android
task

Tracking

(Not tracked)

People

(Reporter: olivia, Unassigned)

References

(Depends on 3 open bugs, Blocks 2 open bugs)

Details

(Keywords: meta, Whiteboard: [fxdroid] [group3][geckoview:2024H2?] )

There are many Gecko options and preferences for zooming on Android. This meta is to track related bugs to improve the zoom component on Android.

Summary: [meta] Research Zoom on Android → [meta] Research Zoom Options on Android
Summary: [meta] Research Zoom Options on Android → [meta] Zoom Options on Android
Depends on: 1841089
Depends on: 1850810
Depends on: 1828327
See Also: → 1838401
See Also: → 1845917
Severity: -- → N/A
See Also: → 1849825
Priority: -- → P3
See Also: → 1547181
Whiteboard: [fxdroid] [group3]
Depends on: 1891883
Blocks: 1891883
No longer depends on: 1891883

Just a summary of the current state as I understand it:

Settings and defaults

  • Automatic font sizing is still one setting in Fenix, on by default, which controls two things:
    1. Whether Gecko does font inflation for desktop sites (bug 1828327).
    2. Whether Gecko honors the system font settings from Android.
  • Chrome doesn't do (2) by default. Instead they have their own text scaling setting.

I tend to think we should:

  • Split that setting into two (or make it control just one of those things and remove (2)).
  • Don't do (2) by default.
  • Ideally don't do (1) by default either. Our font inflation implementation is not great (see bug 1828327 etc), and we should replace it by reflow zoom (or just nothing), IMO.
  • So a short-term improvement would be to just change the default for "Automatic font sizing".

Text vs. full zoom

  • When applying the text scale, we do reflow zoom. I think that's the correct thing to do as per bug 1831136, but Chrome does something else (text zoom, but only partial somehow?)
  • We could consider switching that to use text zoom (but given we know text zoom can break websites, I tend to think that's not the right call).
  • We could also do some research on how Chrome's text zoom thing works to see if it's more nuanced / less likely to break stuff.

In any case these are all product / UX decisions, Gecko exposes all the relevant hooks for GeckoView / Fenix to do the right thing.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)

I tend to think we should:

  • Split that setting into two (or make it control just one of those things and remove (2)).

No objection there. If I remember correctly, historically it was a bit of a problem though how to name the options if you have a separate toggle for font inflation, i.e. how to make it clear that that particular option only affects non-mobile-friendly pages.

  • Ideally don't do (1) by default either. Our font inflation implementation is not great (see bug 1828327 etc), and we should replace it by reflow zoom (or just nothing), IMO.

It still think that "just nothing" would definitely be worse for most non-mobile-friendly pages, because in that case the choice is between "whole page width visible, but unreadably small text", or pinch-zooming in, which then means lots of annoying horizontal scrolling.

Reflow zoom vs. font inflation might be a bit more debatable, but in my experience it still doesn't do too badly (At least for the kinds of non-mobile friendly pages I regularly visit. Also not to forget that we're only getting bug reports for the cases where it fails, not for the cases where it works as intended and makes the main body of text a readable font size).

For a slightly prominent example: Without font inflation, old.reddit.com has rather small font sizes and isn't very comfortable to read.
With font inflation, the initial post gets inflated somewhat more, which is perhaps a bit suboptimal, but otherwise things don't look too badly and all the comment threads are comfortably readable without requiring horizontal scrolling.

I don't know of a good way to simulate reflow zoom on my phone, but if I try simulating it on desktop by setting up a narrow-ish window width, and then zooming in, the results are definitely worse than font inflation, because e.g. Reddit's side bar gets zoomed, too, and then squeezes the column containing the initial post to a very narrow width. (slashdot.org's homepage suffers from a very similar problem, by the way – the sidebar gets zoomed, too and crowds out the actual main content) Based on that, personally I'd still rather prefer font inflation than reflow zoom.

but Chrome does something else (text zoom, but only partial somehow?)

Well, a text zoom that's applied to only part of the page is basically comparable to font inflation, isn't it?

In any case these are all product / UX decisions, Gecko exposes all the relevant hooks for GeckoView / Fenix to do the right thing.

Not quite, if you seriously want to get rid of font inflation, AFAIK there's currently no way of setting a different default zoom for mobile-friendy vs. non-mobile-friendly pages. For comparison, on desktop at least you can quickly zoom in and out via the mouse wheel and it's remembered per domain, on mobile it's memory-less pinch-zoom (with the consequent horizontal-scrolling trade-off) or else cumbersomely futzing around in the main settings menu which then globally affects all pages.

(In reply to Jan Henning [:JanH] from comment #2)

Not quite, if you seriously want to get rid of font inflation, AFAIK there's currently no way of setting a different default zoom for mobile-friendy vs. non-mobile-friendly pages. For comparison, on desktop at least you can quickly zoom in and out via the mouse wheel and it's remembered per domain, on mobile it's memory-less pinch-zoom (with the consequent horizontal-scrolling trade-off) or else cumbersomely futzing around in the main settings menu which then globally affects all pages.

Sure, but that's still not implemented in gecko itself. Per page zoom level is clearly useful, but the implementation lives in the Firefox frontend / would live in Fenix / Geckoview

IME font inflation is strictly worse almost always (though I don't visit that many non-mobile-friendly pages nowadays), and it is particularly frustrating when it it subtly breaks stuff in ways that are otherwise hard to debug or impossible to find out / prevent by developers of the page (other than of course rewriting their page to have a meta viewport), like bug 1891883 recently.

Chrome doesn't do (2) by default. Instead they have their own text scaling setting.

Chrome currently uses the system font setting from Android as an additional multiplier on top of our font inflation heuristics. This is not a good approach. Chrome also has many bug reports about our heuristics, similar to your reports. I share your intuition that heuristics in this area are slightly negative at this point in the mobile web. Simple text zoom might be a way forward, and it sort-of works for old.reddit.com, but I am not sure how web-compatible it is in general.

Yes there's a lot going on here and it can make your head spin! When Chrome for Android shipped their page zoom last year, they didn't initially include an option to turn off the Android system font size being linked up to Chrome's page zoom (I filed the bug and they're adding it, and it seems they will actually make it so that by default, Chrome will not make their page zoom match the Android OS text size. Also notice I referenced Firefox for Android as an example of how this SHOULD be done! https://issues.chromium.org/issues/40928643 ).

They've also recently added another update to their page zoom where the Android system font size setting is still honored/respected by the browser, but without doing page zoom? I'm not 100% clear on that and it doesn't appear to be shipping to production yet https://chromium-review.googlesource.com/c/chromium/src/+/5467060

Official discussion is worth keeping an eye on as they start to roll this out again https://groups.google.com/a/chromium.org/g/blink-dev/c/rTNCw0lHmZk?pli=1

See Also: → 1813225
Whiteboard: [fxdroid] [group3] → [fxdroid] [group3][geckoview:2024H2?]
You need to log in before you can comment on or make changes to this bug.