WICG / proposals

A home for well-formed proposed incubations for the web platform. All proposals welcome.
https://wicg.io/
Other
213 stars 9 forks source link

Support for “prefersHomeIndicatorAutoHidden” when fullscreen API is enabled and when in Web Apps #146

Open JeffreyBlanz opened 2 months ago

JeffreyBlanz commented 2 months ago

Introduction

The “prefersHomeIndicatorAutoHidden” instance properly refers to the ability to hide the visual indicator for returning to the Home Screen for iOS, iPadOS, Mac Catalyst, and visionOS.

When this property returns true the bottom bar on the screen is changed to blend in with the surroundings so that content is not covered. Not only is the bottom bar hidden. Instead of the normal swipe up once to go home, it takes two swipes to go home. If a user only swipes once there is a set amount of time that the home bar is re-hidden if the home bar is not swiped on again. This time is short.

Use Cases

  1. Cloud Gaming PWAs to prevent academically app closures and the covering of content.
  2. Web videos to prevent the covering of content.
  3. Other instances where closing an application on accident would not be ideal for the user.

Proposed Solution

  1. Created a web standard instance that works with progressive web applications and when Fullscreen API is enabled.
  2. Make sure the home bar blends in with the surroundings, and is still partially visible so the user knows they can still swipe up on the bar.
  3. When the bar is hidden it needs to take two swipes to perform the swipe to go home action.
  4. If the bar is only swiped up on once, it needs to be automatically re-hidden after around five seconds.

Privacy & Security Considerations

No considerable privacy or security concerns are expected, but I welcome community feedback.

Reference

This comes from Apple’s support for this feature in native applications. The developer instance property link can be found here:

https://developer.apple.com/documentation/uikit/uiviewcontroller/2887510-prefershomeindicatorautohidden