gluestack / gluestack-ui

React & React Native Components & Patterns (copy-paste components & patterns crafted with Tailwind CSS (NativeWind))
https://gluestack.io/
MIT License
2.53k stars 117 forks source link

Position correction related to statusbar, no correction of bottom #2245

Closed shanger closed 3 weeks ago

shanger commented 3 months ago

Description

Position correction related to statusbar should correct all position information of y axis。

CodeSandbox/Snack link

no repo。https://github.com/GeekyAnts/NativeBase/tree/master/example

Steps to reproduce

  1. Why adjust the top value after calculating the available area?

When top + height = window.height, adding APPROX_STATUSBAR_HEIGHT to top will exceed the visible area of ​​the screen。

  1. the top needs to be corrected ,then the bootom needs too。 position[FLIPPED_DIRECTION[axis]] = Math.floor( containerHeight -( childOffset[axis] +statusbar.height)+ offset );

https://github.com/gluestack/gluestack-ui/blob/188497e584781f332711fa624c1d68dd0d67bb38/packages/react-native-aria/overlays/src/useOverlayPosition.ts#L180C3-L182C4

https://github.com/gluestack/gluestack-ui/blob/188497e584781f332711fa624c1d68dd0d67bb38/packages/react-native-aria/overlays/src/useOverlayPosition.ts#L502C4-L505C7

gluestack-ui Version

@react-native-aria/overlays@0.3.12

Platform

Other Platform

No response

Additional Information

NativeBase:"3.4.28"

Viraj-10 commented 3 months ago

Hey @shanger,

Are you still facing issues with this? We have made position corrections related to the status bar, which affected the calculation of the top but not the bottom.

If you are experiencing any problems, please provide the GitHub repository with a reproduction of the issue.

sra1kumar-NULL commented 3 weeks ago

Hey @shanger , we are closing this issue for now, please feel free to reopen the issue if you are still facing it/ having any queries about it.