github software-mansion/react-native-screens 5.0.0-beta.1

pre-release4 hours ago

What's Changed

This is the first beta release of react-native-screens 5.0.0, and it adds support for react-native 0.88. iOS gets ContainedModalProvider and ContainedModalOverContent, a modal confined to the bounds of its provider, e.g. a SplitView column. Stack v5 on Android now animates transitions with configurable presets and supports replaceAnimation. On iOS 27, Stack v4 gains minimizationBehavior and restorationBehavior, and both stacks gain safeAreaAdjustment. Form sheets can replace the Liquid Glass material on iOS 26.1+, and Stack v4 form sheets get a selectDetent command. Fixes include a crash when popping an Android Stack v5 screen with a nested stack. Most of the Misc section splits the native code into core and react layers.


Breaking: Tabs icon types (iOS)

The templateSource and xcasset tab icon types are removed, and imageSource icons on iOS are now tinted by default (#4868):

Before After
{ type: 'templateSource', templateSource: src } { type: 'imageSource', imageSource: src, renderingMode: 'template' }
{ type: 'xcasset', name: 'icon' } (image set) { type: 'imageSource', imageSource: { uri: 'icon' } }
{ type: 'xcasset', name: 'icon' } (custom symbol) { type: 'sfSymbol', name: 'icon' }
{ type: 'imageSource', imageSource: src } that must keep its colors add renderingMode: 'original'

The TabsScreenIconTemplateIOS and TabsScreenIconXcassetIOS type exports are removed too, use TabsScreenIconIOS. See #4868 for the remaining migration details.

✅ Improvements

  • perf(Android, Tabs): apply tab configuration changes at the end of the React transaction by @kkafar in #4976
  • feat(Stack v4): Add selectDetent command for form sheets by @Bram-dc in #4794
  • refactor(iOS, Tabs v5): remove templateSource and xcasset icons, tint imageSource by default by @stachbial in #4868
  • feat(iOS): add contained modal core presentation layer by @kmichalikk in #4961
  • feat(iOS): add ContainedModalProvider and ContainedModalOverContext by @kmichalikk in #4962
  • feat(iOS): add ContainedModal lifecycle events by @kmichalikk in #5002
  • feat(SplitView, iOS): Add RNSNavigationItemCustomizerProtocol by @Ubax in #5080
  • feat(iOS, Stack v4): add minimizationBehavior and restorationBehavior to control when the navigation bar minimizes and restores on scroll in Stack v4 by @Loloekk in #4729
  • feat(SplitView, iOS): enable large titles by default for column navigation bars by @Ubax in #5081
  • feat(iOS, Stack v4): add sheetBackgroundEffect prop for form sheets by @t0maboro in #5007
  • feat(iOS, Stack v4): add safeAreaAdjustment prop to control safe area adjustment when the navigation bar minimizes on iOS 27 by @Loloekk in #4732
  • feat(Android, Stack v5): add base animations implementation and basic slideFrom* + none presets by @kligarski in #4660
  • feat(Android, Stack v5): add remaining core animation presets by @kligarski in #4670
  • feat(Android, Stack v5): add animation presets by @kligarski in #4980
  • feat(Android, Stack v5): add replaceAnimation by @kligarski in #5058
  • feat(iOS, Stack v5): add safeAreaAdjustment prop to control safe area adjustment when the navigation bar minimizes on iOS 27 in Stack v5 by @Loloekk in #4744
  • feat(iOS, FormSheet v5): add backgroundEffect prop by @t0maboro in #5111

🐞 Bug fixes

  • fix(web): keep Screen style when enabled is false by @kkafar in #4917
  • fix(Android, Stack v5): emit onDismiss only if fragment is explicitly popped by @kligarski in #4745
  • fix(iOS, Tabs): size the tab bar controller's view before attaching it by @nkt in #4990
  • fix(iOS, Stack v4): iterate over a copy of reactSubviews when updating header shadow state by @ilp0 in #4851
  • fix(iOS, Stack): remove the navigation controller's view when a nested stack is recycled by @intergalacticspacehighway in #4997
  • fix(Android, FormSheet v4): hide dimming view from accessibility services by @Av1for in #4933
  • fix(iOS, Tabs): Set the UISearchTab title at creation by @kmichalikk in #5057
  • fix(Android, Tabs): apply the selected tab's appearance in the same frame as a user tap by @kkafar in #5044
  • fix(iOS, Stack v4): restore navigation bar alpha after a cancelled zoom dismissal by @dongriDK in #5055
  • fix(Android, Stack v4): keep fitToContents form sheet in place when its content height changes mid resize animation by @t0maboro in #5005
  • fix(Android, Stack v4): observe window insets from a view we own instead of the decor view listener slot by @t0maboro in #5008
  • fix(Android, Stack v4): don't drag form sheet after list scrolls to top by @kkafar in #5100

🔢 Misc

  • fix(e2e, Android): update FormSheetContainer class name after core move by @kkafar in #4903
  • refactor(Android): move cross-cutting packages to core / react by @kkafar in #4899
  • chore: aggregate dependabot updates by @kkafar in #4906
  • refactor(Android): move safe-area and scroll-view-marker views to react by @kkafar in #4902
  • refactor(Android): split view id generation between core and react by @kkafar in #4918
  • docs(tests): restart scenario step numbering per subsection and unify indentation by @LKuchno in #4910
  • refactor(test): note e2e tests skipped in #4778 in tabs scenarios by @LKuchno in #4869
  • refactor(Android, Stack v5): type core-bound stack code on a screen item interface by @kkafar in #4914
  • refactor(iOS): add levelled RNSLog and RNSAssert with replaceable handlers by @kkafar in #4911
  • refactor(iOS): add ios/core/utils and ios/react/bridging skeleton by @kkafar in #4912
  • refactor(iOS, Tabs): drop RNSScreenContainerDelegate from the tabs host by @kkafar in #4924
  • chore(test): e2e coverage for test-form-sheet-dismiss-events by @LKuchno in #4936
  • chore(test): e2e coverage for test-form-sheet-grabber-visible by @LKuchno in #4938
  • chore(CI, iOS): move iOS workflows to Xcode 27 / iOS 27 by @LKuchno in #4705
  • refactor(test): assert lifecycle event sets instead of a fixed order by @LKuchno in #4716
  • chore(iOS): add the iOS layer check and generated SPM header paths by @kkafar in #4925
  • refactor(iOS): move clean shared headers and categories into ios/core by @kkafar in #4929
  • refactor(Android, Tabs): report tab configuration changes as invalidation flags by @kkafar in #4920
  • refactor(iOS): make the orientation-to-mask converter private to UIViewController+RNScreens by @kkafar in #4939
  • refactor(iOS): move RNSConversions to ios/react/conversion by @kkafar in #4940
  • chore: add support for react-native@0.88.0-rc.5 by @Loloekk in #4928
  • refactor(test): make stack v5 header item e2e tests work on iOS 27 by @LKuchno in #4718
  • refactor(iOS): move RNSModule and the React-side helpers to ios/react by @kkafar in #4966
  • refactor(test): fix tab bar item badge e2e test for iOS 27 by @LKuchno in #4719
  • refactor(test): replace per-version iOS suite guards with version-parameterized helpers by @LKuchno in #4743
  • refactor(iOS, Stack): move the Stack React side to ios/react by @kkafar in #4967
  • chore: add support for react-native@0.88.0 by @Loloekk in #4992
  • refactor(Android, Tabs): type core-bound tabs code on a container item interface by @kkafar in #4921
  • refactor(Android, Stack v5): move stack to core / react by @kkafar in #4943
  • refactor(iOS, Tabs): move the Tabs React side to ios/react by @kkafar in #4968
  • refactor(iOS, Split): move the Split React side to ios/react by @kkafar in #4969
  • refactor(test): make test-stack-header-menu-options-ios e2e test work on iOS 27 by @LKuchno in #4746
  • refactor(test): make test-tabs-tab-bar-controller-mode-ios iPad e2e test work on iOS 27 by @LKuchno in #4761
  • refactor(test): make stack header selective-updates and subview-onpress e2e tests work on iOS 27 by @LKuchno in #4763
  • refactor(test): make test-stack-simple-nav iOS e2e test work on iOS 27 by @LKuchno in #4764
  • refactor(test): make issue e2e tests work on iOS 27 by @LKuchno in #4775
  • refactor(Android, Tabs): resolve tab title fonts through a host-supplied resolver by @kkafar in #4944
  • refactor(Android, Tabs): let the host supply the tab bar view by @kkafar in #4945
  • test(ios27): fix tabs system-item e2e test for iOS 27 by @LKuchno in #4782
  • refactor(Android, Tabs): move tabs to core / react by @kkafar in #4946
  • refactor(test): make example e2e tests work on iOS 27 by @LKuchno in #4801
  • refactor(Android, Tabs): apply tab title, badge and accessibility only when invalidated by @kkafar in #4975
  • refactor(iOS, FormSheet): move the FormSheet React side to ios/react by @kkafar in #4970
  • refactor(iOS): move the view components to ios/react by @kkafar in #4971
  • refactor(iOS): merge the frame-change delegates into RNSViewFrameChangeDelegate by @kkafar in #4972
  • refactor(iOS): move RNSViewFrameChangeDelegate to ios/core/common by @kkafar in #4973
  • chore(iOS): extend the iOS layer check (rule 6, folly/yoga, pre-move targets) by @kkafar in #4965
  • refactor(iOS): drop the component-view parameter from RNSScrollViewSeeking by @kkafar in #4974
  • refactor(iOS, FormSheet): make the FormSheet provider contract plain Objective-C by @kkafar in #4977
  • refactor(iOS, FormSheet): use RNSAssert / RNSLog in the FormSheet core files by @kkafar in #4978
  • refactor(iOS, FormSheet): move the FormSheet core half to ios/core/modals/form-sheet by @kkafar in #4979
  • chore(CI, Android): build only the app module for e2e by @kkafar in #5050
  • chore(CI): skip the other platform's e2e spec files by @kkafar in #5051
  • chore(CI, iOS): run the iOS build checks on the standard runner by @kkafar in #5064
  • chore(CI): apply the PR paths filters to pushes to main by @kkafar in #5065
  • chore(CI, iOS): run the iOS build only when its inputs change by @kkafar in #5066
  • chore(CI): run e2e suites on PRs only when the suite changes by @kkafar in #5067
  • chore(CI): skip e2e on draft PRs and above the bottom of a PR stack by @kkafar in #5070
  • chore(CI): skip the rest of an e2e spec after a failure by @kkafar in #5059
  • chore(CI, Android): run the e2e emulator on 4 cores by @kkafar in #5060
  • chore(CI, Android): don't save an emulator snapshot after e2e tests by @kkafar in #5061
  • test(iOS): add comprehensive ContainedModal SFT by @kmichalikk in #4963
  • refactor(iOS): make the scroll-view helpers React-free by @kkafar in #5017
  • refactor(iOS): move the scroll-view helpers to ios/core/scroll-view by @kkafar in #5018
  • refactor(iOS): move the container contracts to ios/core/containers/common by @kkafar in #5019
  • refactor(iOS): replace RNSReactMountingTransactionObserving with RNSContainerTransactionSupporting by @kkafar in #5020
  • refactor(iOS): route container orientation updates through RNSOrientationDelegate by @kkafar in #5021
  • refactor(iOS): split the legacy forwarding out of UIViewController+RNScreens by @kkafar in #5022
  • refactor(iOS): move UIViewController+RNScreens to ios/core/common by @kkafar in #5023
  • refactor(iOS, Split): look up the host controller through the screen controller delegate by @kkafar in #5024
  • refactor(iOS, Split): use RNSAssert in the Split core files by @kkafar in #5025
  • refactor(iOS, Split): move the Split core half to ios/core/containers/split by @kkafar in #5026
  • refactor(iOS, Tabs): report tab screen appearance through a controller delegate by @kkafar in #5027
  • refactor(iOS, Tabs): read tab screen data through RNSTabsScreenDataProviding by @kkafar in #5028
  • refactor(iOS, Tabs): map the tab system item in the Tabs core by @kkafar in #5029
  • refactor(iOS, Tabs): use RNSAssert / RNSLog in the Tabs core files by @kkafar in #5030
  • refactor(iOS, Tabs): move the tab bar appearance props mapping to react by @kkafar in #5031
  • refactor(iOS): make RNSImageLoading take an opaque image source by @kkafar in #5032
  • refactor(iOS, Tabs, Stack): decouple the tab bar controller from the host and share one image loader by @kkafar in #5033
  • refactor(iOS, Tabs): move the Tabs core half to ios/core/containers/tabs by @kkafar in #5034
  • refactor(iOS, Stack): carry screen controllers in the core stack operations by @kkafar in #5035
  • refactor(iOS, Stack): report stack screen lifecycle through a controller delegate by @kkafar in #5036
  • refactor(iOS, Stack): drop the header's imports of react-side headers by @kkafar in #5037
  • refactor(iOS, Stack): parse the menu update commands on the react side by @kkafar in #5038
  • refactor(v5): migrate common types and entry points to the docs conventions by @Loloekk in #5109
  • refactor(v5): migrate platform icon types to the docs conventions by @Loloekk in #5110

New Contributors

Full Changelog: 5.0.0-alpha.4...5.0.0-beta.1

Don't miss a new react-native-screens release

NewReleases is sending notifications on new releases.