react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

feat: add screenEdgesDeferringSystemGestures

Open CodingMeSwiftly opened this issue 2 years ago • 2 comments

Description

Adds prop screenEdgesDeferringSystemGestures on iOS. This is an addendum to homeIndicatorHidden introduced in https://github.com/software-mansion/react-native-screens/pull/1267. Setting homeIndicatorHidden to true will show the home indicator when the user touches the screen. This is suboptimal for highly interactive apps like games or e-learning content. screenEdgesDeferringSystemGestures allows us to keep the home indicator hidden. Additionally, we can also 'hide' the control center and notification screen, which further benefits applications that need as much focus on fullscreen content as possible.

Changes

  • Adds prop screenEdgesDeferringSystemGestures
  • Introduces ScreenEdge option set to allow for fine-grained control that resembles the native API.

Test code and steps to reproduce

Test643.tsx

Checklist

  • [x] Included code example that can be used to test this change
  • [x] Updated TS types
  • [x] Updated documentation:
    • [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    • [x] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
    • [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
    • [x] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
  • [x] Ensured that CI passes

CodingMeSwiftly avatar Jul 23 '22 23:07 CodingMeSwiftly

Could someone approve the workflows to run again? I'd love to verify if the fabric build issue is fixed. :)

CodingMeSwiftly avatar Jul 31 '22 13:07 CodingMeSwiftly

Is there a reason this PR is being hold back?

CodingMeSwiftly avatar Sep 23 '22 09:09 CodingMeSwiftly