Repository navigation
v0.22.0
🩹 Fixes
-
On iOS a large title no longer drops into place on every push when a header item holds a
ui-hostwithmatchContents, on a stack whose root page has no header, in a development build with@ng-native/expo. (#1400, #1399, #1405)react-native-screens lays the navigation bar out at once whenever a header item's size changes, and such a host has its size only once SwiftUI lays it out, during the push.
@ng-native/exponow defers that layout until the push or pop ends, for every header item. Expo Go keeps the drop; a host with a fixed size, orsystemImageName, avoids it there. -
A box whose
box-sizingalone changes is now laid out again on iOS and Android, where it kept the size it had: React Native's Yoga does not compareboxSizingwhen a view's props change. To do that, acontent-boxbox whose sizes, padding and border are each in points or unset is committed as the border box it makes, withboxSizing: 'border-box'and its padding and border added to itswidth,heightand their least and most. It lays out the same, but the props a test reads from a commit change for such a box, a web-compatdivand text field among them. (#1393)A
content-boxbox with a percentage size or padding is committed as it was, and still keeps its size on iOS and Android when itsbox-sizingalone changes.A
content-boxbox with anaspect-ratioand awidthorheightin points is committed with the ratio of its border box, so the ratio is of its content box, as in Chrome, where Yoga took it of the border box. One with anaspect-ratioand no size in points, or with a least or most size, is committed as it was. The padding added to the width is read in the box's direction, its own, inherited, or the app's. -
A
z-indexof a math function in a stylesheet, such ascalc(3 / 2)ormin(-2.5, 4), now compiles to the integer Chrome rounds it to, as the same value set in a style already did, where it was dropped with a warning. (#1387)A math function that comes to a length, such as
calc(1px), is still dropped with a warning, as Chrome drops it. One that comes to NaN, such assqrt(-1), compiles to 0, as Chrome reads it. Around()to the nearest, such asround(-1.5, 1), is dropped with a warning, since the compiler would round a negative tie away from zero where Chrome rounds it up. Around()with a negative interval, such asround(up, 3, -2), rounds as Chrome does, and the function and strategy names are read in any case. A z-index past the range of a 32-bit integer, such ascalc(infinity)in a stylesheet orcalc(1e20)in either, is clamped to that range, as Chrome clamps it. One with a string in it, such ascalc("2"), is dropped with a warning, as Chrome drops it. -
On iOS a stack's root page with a large title now launches with the title expanded, where it showed collapsed in the bar until the page was pulled down. (#1402, #1401)
<native-stack-outlet>commits itsRNSScreenStackonly once its first screen has joined it, with that screen, as react-native-screens' own JavaScript does. Committed empty, the stack was laid out with a compact bar before the root page arrived, and the page's scroll view kept the offset that bar gave it. A test that reads the committed tree of an outlet with no screen no longer finds anRNSScreenStackthere. -
On Android a tap on an open
<native-search-bar>no longer presses the<native-header>item hidden under it: while the field is open, the header's other<native-header-item>s take no touches. (#1406, #1404)react-native-screens hides those items when the field opens, but a hidden view keeps its bounds, and React Native's Android touch dispatch finds a target by bounds alone. The items' content now inherits
pointer-events: nonebetween the search bar'stopOpenandtopClose, so the props committed for that content change while the field is open, including an item added while it is open. Content that sets its ownpointer-eventstoautostill takes touches. iOS sends no open or close and is unchanged.
❤️ Thank You
- Ashley Hunter