Key changes
This is the third alpha release of react-native-screens 5.0.0, and it brings many new header customization options to Stack v5 on both Android and iOS. On Android, the header gains a subtitle, title and subtitle fonts and positioning, background and status bar scrim colors, and toolbar content insets. On iOS, you can now configure the back button title, display mode and menu, add a prompt, and style the (large) title and subtitle. FormSheet v5 on Android adds sheet stacking and separate onDismiss and onNativeDismiss events, and it now lays out correctly after orientation changes and sits above the keyboard. The release also adds support for Swift Package Manager on iOS, along with a number of stability fixes for Stack and Tabs.
Improvements
- Android (Stack v5): add support for a subtitle and for title/subtitle positioning by @kligarski in #4387
- Android (Stack v5): add title and subtitle font customization by @kligarski in #4415
- Android (Stack v5): expose the
maxLinesprop and add a workaround for changing the subtitle at runtime by @kligarski in #4436 - Android (Stack v5): expose overflow icon customization with tint configuration by @kligarski in #4434
- Android (Stack v5): expose
contentInsetStartandcontentInsetEndfor the toolbar by @kligarski in #4516 - Android (Stack v5): add header background color customization by @kligarski in #4522
- Android (Stack v5): expose
statusBarScrimColorfor the header by @kligarski in #4533 - Android (Stack v5): support color scheme configuration at the host level by @kligarski in #4556
- Android (Stack v5): preserve the toolbar menu state across header rebuilds by @kligarski in #4579
- iOS (Stack v5): add an identifier for header items animation by @kmichalikk in #4437
- iOS (Stack v5): add
backButtonTitleandbackButtonDisplayModeby @kmichalikk in #4542 - iOS (Stack v5): add the
backButtonMenuEnabledprop to the header by @kmichalikk in #4544 - iOS (Stack v5): add
promptto the stack header by @kmichalikk in #4590 - iOS (Stack v5): add (large) title and subtitle appearance to the header by @kmichalikk in #4560
- iOS (Stack v5): add the
hidesSharedBackgroundprop to header items by @kmichalikk in #4592 - Android (FormSheet v5): separate the
onDismissandonNativeDismissevents by @t0maboro in #4404 - Android (FormSheet v5): add support for sheet stacking behavior by @t0maboro in #4409
- iOS (Tabs): add the
tabBarHiddenAnimationEnabledprop, so tab bar visibility changes can be animated (#4627), by @ilcato in #4632 - iOS: add support for Swift Package Manager by @kacperzolkiewski in #4593
Bug fixes
- Android (Stack v5): apply toolbar menu item props in an order that keeps the overflow behavior correct by @kligarski in #4507
- Android (Stack v5): prevent native view state restoration in stack screens by @kkafar in #4527
- Android (Stack v5): handle
forceLayoutso the Stack is properly laid out after a configuration change by @kligarski in #4580 - Android (Stack v5): scope the header back button to its own stack by @kkafar in #4578
- iOS (Stack v5): refactor header coordination to hide the header when no
headerConfigis provided by @kmichalikk in #4535 - Android (Stack v4): prevent adding preloaded and dismissed fragments when popping from an opaque to a translucent screen by @kligarski in #4571
- Android (Stack v4+): append a SwipeRefreshLayout transition filler by @drhops in #4519
- Android (FormSheet v5): recreate the dialog on every presentation cycle by @t0maboro in #4565
- Android (FormSheet v5): resolve sheet metrics in the measure pass to support orientation changes by @t0maboro in #4566
- Android (FormSheet v5): calculate detents relative to the native container's size by @t0maboro in #4584
- Android (FormSheet v5): prevent the
doOnStartcallback from overriding the translation by @t0maboro in #4581 - Android (FormSheet v5): move the sheet above the keyboard by @t0maboro in #4573
- iOS: skip the form sheet scroll view frame correction once the screen is invalidated by @saddlepaddle in #4652
- Android (Tabs): prevent native view state restoration in
TabsScreenby @kkafar in #4526 - Android (Tabs): handle
forceLayoutso the tab bar is properly laid out after a configuration change by @kligarski in #4582 - Android (Tabs): use
ViewIdGeneratorto identify MenuItems instead of sequential ids by @Loloekk in #4558 - Android (Tabs): expose the tab item
testIDasviewIdResourceNameby @mackbrowne in #4497 - Android: fix a use-after-free of
RNSScreenRemovalListenerregistered as a mounting override delegate by @mbSmaga in #4413
Tests and maintenance
- Add e2e tests for
test-stack-toolbar-menu-groups-android(#4428),test-stack-toolbar-menu-disabled-android(#4464),test-stack-lift-on-scroll-android(#4493),test-stack-toolbar-menu-batch-commands-android(#4509),test-stack-toolbar-menu-show-as-action-android(#4520),test-tabs-bottom-accessory-visibility-ios(#4534) andtest-stack-header-item-identifier-ios(#4546) by @LKuchno - Android: add coverage for
test-stack-toolbar-nested-menu-androidby @LKuchno in #4448 - Android: add e2e tests for Stack v5 prevent native dismiss with a single stack (#4482) and with a nested stack (#4494) by @LKuchno
- Add a script to create test screen directories by @LKuchno in #4318
- Mark the stack overflow icon e2e coverage as not automated (#4525) and document non-automatable Stack v5 e2e scenarios (#4528) by @LKuchno
- Add a manual scenario for
test-svm-configures-scroll-viewby @LKuchno in #4547 - Use a bundled image in
test-stack-toolbar-menu-batch-commands-androidby @LKuchno in #4572 - Update tabs and stack scenarios after the 4.27.0 and 5.0.0-alpha.2 release tests by @LKuchno in #4575
- Replace local e2e helpers with shared
e2e-utilsexports by @LKuchno in #4569 - FormSheet v5: add a test for a ScrollView nested in a FormSheet (#4585) and update testing scenarios and layout visibility in the examples (#4568) by @t0maboro
- Release tests: prepare a setup script for automated app builds by @Loloekk in #4474
Miscellaneous
- Add support for
react-native@0.87.0by @kacperzolkiewski in #4596 - iOS: silence release build warnings (#4486), including the ones from v5 components (#4508, #4562) by @Loloekk
- iOS: add logs for invalid SF Symbols and xcassets names by @Loloekk in #4617
- iOS: clean up conversion logic by @Loloekk in #4576
- iOS (FormSheet v5): make
RNSFormSheetConfigurationApplicatorstateless by @t0maboro in #4567 - iOS (SplitView): decouple
SplitViewControllerfromReactEventEmitterandShadowState(#4603) and read the host configuration through providers (#4607) by @t0maboro - JS: add a stack state config and update the tabs one by @Loloekk in #4609
- Example: upgrade Kotlin to 2.3.* by @t0maboro in #4536
- Example: fix the SAV import and the
defaultRouteNametype inTabsContainerby @kligarski in #4541 - Example: update the route configs of
TestStackHeaderTitleAppearanceAndroidto the new API by @kligarski in #4548 - FabricExample: migrate from component to element by @Loloekk in #4495
- Examples: bump TVOSExample to React Native 0.87.1 (#4657) and FabricExample libraries to versions that support React Native 0.87 (#4658) by @kacperzolkiewski
- Docs: update the sponsors section by @m-bert (#4532), add a privacy policy link to the footer by @Sullyvahnn-v2 (#4506), and add JSON-LD and llms.txt for AI search by @halskiszymon (#4529)
- CI: remove redundant
main-labsfrom workflows by @kacperzolkiewski in #4614 - Dependencies: aggregate dependabot updates by @kkafar (#4543, #4630) and bump joi from 17.13.4 to 17.13.7 in
/docs(#4631)
New contributors
Welcome to @mbSmaga, @Sullyvahnn-v2, @halskiszymon, @mackbrowne, @drhops, @kacperzolkiewski, @ilcato and @saddlepaddle, who all made their first contribution in this release.
Source: 5.0.0-alpha.3 release notes on GitHub. Full changelog: 5.0.0-alpha.2...5.0.0-alpha.3.