Skip to content

Add setting to control pinch-to-zoom in frontend, defaulted off#1472

Merged
zacwest merged 2 commits intomasterfrom
pinch-to-zoom
Feb 10, 2021
Merged

Add setting to control pinch-to-zoom in frontend, defaulted off#1472
zacwest merged 2 commits intomasterfrom
pinch-to-zoom

Conversation

@zacwest
Copy link
Copy Markdown
Member

@zacwest zacwest commented Feb 9, 2021

Refs home-assistant/frontend#8192.

Summary

When enabled, pinch to zoom is allowed in the frontend. When disabled, which is the default, it is not allowed. This does not respect what the frontend sends for the values of minimum-scale, maximum-scale and user-scalable and instead overrides them.

Screenshots

Image

Any other notes

In home-assistant/frontend#7180, the frontend was changed to enable pinch to zoom in the app by removing the user-scalable flag. Browsers ignore this flag, but our UI is meant to feel like an app, not like a webpage. The accessibility part of the argument doesn't mirror iOS accessibility: dynamic type is how the system behaves and it doesn't scale elements like navigation or tab bars. To achieve an iOS-like accessibility experience, we have a setting to adjust only the text size in the frontend.

But we are not in total control over the contents of the users' dashboards or pages. There's layout and design choices that users may make which inherently don't work well on mobile without zooming on non-text elements, including other webapps. I believe this is a rare enough that disabled as a default is acceptable, but also common enough that the preference itself existing is worthwhile.

This works in all versions of iOS that we support, iOS 12 and above.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 9, 2021

Codecov Report

Merging #1472 (c490d36) into master (0056873) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1472      +/-   ##
==========================================
- Coverage   25.12%   25.10%   -0.03%     
==========================================
  Files         206      206              
  Lines       16949    16967      +18     
==========================================
  Hits         4259     4259              
- Misses      12690    12708      +18     
Impacted Files Coverage Δ
...es/App/Settings/SettingsDetailViewController.swift 0.00% <0.00%> (ø)
Sources/App/WebView/WebViewController.swift 0.00% <0.00%> (ø)
Sources/Shared/Settings/SettingsStore.swift 27.50% <0.00%> (-0.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0056873...c490d36. Read the comment docs.

@zacwest zacwest merged commit bf2c1bb into master Feb 10, 2021
@zacwest zacwest deleted the pinch-to-zoom branch February 10, 2021 04:20
@bramkragten
Copy link
Copy Markdown
Member

bramkragten commented Mar 8, 2021

You know it was reverted right? home-assistant/frontend#8353

But now we can enable it again on iOS, like it is also enabled on Safari right?

@TomBrien
Copy link
Copy Markdown
Member

TomBrien commented Mar 8, 2021

Pinch-to-zoom does work nicely in current iOS app beta (when enabled)

@zacwest
Copy link
Copy Markdown
Member Author

zacwest commented Mar 8, 2021

Yeah this setting works either with or without the front end change.

@scstraus
Copy link
Copy Markdown

scstraus commented May 2, 2021

Losing pinch to zoom has made my kiosk tablets borderline useless as I am old with crappy vision and don't wear my glasses all around the house. Is there any way to enable this on the standard webpage version of the lovelace frontend under fully kiosk browser?

@zacwest
Copy link
Copy Markdown
Member Author

zacwest commented May 2, 2021

@scstraus Please see the frontend issue linked in the top comment. This change is not directly related to any frontend changes outside of the iOS app.

@scstraus
Copy link
Copy Markdown

scstraus commented May 2, 2021

Yes I read #8192 already, I'm just looking for a solution to the mess it's caused for me with fully kiosk browser where it destroyed zoom. Was hoping someone here might have an idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants