You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(iOS): wrong height of formSheet in nested stack with fitToContents (#2670)
## Description
Closes#2665
In case when we present `formSheet` with header, the content is nested
in another stack -> content wrapper is *not* mounted directly under
presented screen --> we need to forward information of content
dimensions from nested content wrapper to the screen with `formSheet`
presentation.
Due to order of updates on Fabric (bottom up assembling of the host
tree) first moment when we can look for *ancestor* screen with
`formSheet` presentation is when we move to window...
And that is what I did. Now `RNSScreenContentWrapper` looks for
appropriate screen to attach to in `willMoveToWindow`.
There was another problem: any stack along the way impacts desired
height of the sheet -> therefore while looking for appropriate screen
the wrapper sums up heights of encountered navigation bars and gives
that information to the screen.
> [!important]
using `formSheet` with header enabled could lead to flicker (we won't be
able to solve it for now, until we are able to trigger react commit &
layout synchronously). Maybe we should describe this in types?
## Changes
☝🏻
## Test code and steps to reproduce
`TestFormSheet` + set `headerShown: true` on `formSheet` screen.
## Checklist
- [ ] Included code example that can be used to test this change
- [ ] Ensured that CI passes
0 commit comments