Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: software-mansion/react-native-screens
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.15.4
Choose a base ref
...
head repository: software-mansion/react-native-screens
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.16.0
Choose a head ref
  • 12 commits
  • 67 files changed
  • 8 contributors

Commits on Aug 28, 2025

  1. release: 4.15.4 (#3170)

    Release 4.15.4 + lock files update after release
    kligarski authored Aug 28, 2025
    Configuration menu
    Copy the full SHA
    7f3daac View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2025

  1. chore(FabricExample): bump react-native-safe-area-context (#3175)

    ## Description
    
    Somehow it got downgraded in
    #3102
    kmichalikk authored Aug 29, 2025
    Configuration menu
    Copy the full SHA
    5e16d17 View commit details
    Browse the repository at this point in the history
  2. refactor: review of #3073 - rename few methods, move update logic to …

    …shadow state proxy (#3176)
    
    ## Description
    
    Retrospective review for #3073.
    
    ## Changes
    
    * moved all the state related to view size transitioning do dedicated
    file-private type `ViewSizeTransitionState`,
    * renamed `isTransitionInProgress -> isViewSizeTransitionInProgress`,
    * renamed `stopAnimation` -> `cleanupViewSizeTransitionState`,
    * removed `applyTransitioningShadowState(...)` &
    `applyStaticShadowStateRelativeToAncestor(...)` methods & moved the
    appropriate logic to shadow state proxy.
    
    ## Test code and steps to reproduce
    
    See #3073
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Aug 29, 2025
    Configuration menu
    Copy the full SHA
    ed11286 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2025

  1. fix(Android): add custom fragment factory & modify library installati…

    …on steps to prevent on-restoration crashes (#3089)
    
    ## Description
    
    <!--
    Description and motivation for this PR.
    Include Fixes #<number> if this is fixing some issue.
    
    Fixes # .
    -->
    
    This PR replaces the current workaround for crashes connected to the
    configuration changes on Android. The previous fix required disabling
    passing saved instance state in Activity onCreate - `onCreate(null)`.
    Such a solution generates a problem with state persistence on the native
    side of brownfield applications. Because of that, we decided to replace
    it with a custom fragment factory that will limit the scope of the
    solution and fix the problem directly only on the React Native side. All
    fragments connected to the RN Screens package will be replaced with
    self-destructing ones, which will prevent Android from recreating the
    Fragment after the configuration change. We will leave this
    responsibility for React Native. Thanks to that, there won't be any
    conflict between the Android system and React Native, and we will
    prevent the app from crashing or any other app appearance-related
    issues.
    
    Credits to @bojanlozanovski77 for bringing up the idea in
    #2917
    
    Fixes:
    #17
    
    ## Changes
    
    <!--
    Please describe things you've changed here, make a **high level**
    overview, if change is simple you can omit this section.
    
    For example:
    
    - Updated `about.md` docs
    
    -->
    
    - Created a custom fragment factory (RNScreensFragmentFactory.kt) that
    won't instantiate RN Screens fragments
    - Created self-destructing fragments (NoOpFragment.kt) that will be
    instanciated by the RNScreensFragmentFactory, to prevent the conflict
    that crashes the app
    - Updated installation steps in library README
    - Applied the fix in `MainActivity` files of `FabricExample` and
    `Example` apps
    
    <!--
    
    ## Screenshots / GIFs
    
    Here you can add screenshots / GIFs documenting your change.
    
    You can add before / after section if you're changing some behavior.
    
    ### Before
    
    ### After
    
    -->
    
    ## Test code and steps to reproduce
    
    <!--
    Please include code that can be used to test this change and short
    description how this example should work.
    This snippet should be as minimal as possible and ready to be pasted
    into editor (don't exclude exports or remove "not important" parts of
    reproduction example)
    -->
    1. Remove ignoring config changes in `AndroidManifest.xml` file 
    ```diff
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
    -   android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
        android:launchMode="singleTask"
        ...
    ```
    2. Launch the example app
    3. Verify if the app isn't crashing when causing different types of
    configuration changes on Android. For example:
    	- Orientation change on devices ≥600dp with portrait lock
    	- Opening/closing foldables or flip phones  
    	- Split/Multi-Window mode  
    	- Desktop windowing on tablets  
    	- Launching external activities (e.g. system Photo Picker)  
    - Changing accessibility settings, permissions, system fonts,
    wallpapers, or language
    
    ## Checklist
    
    - [X] Included code example that can be used to test this change
    - [X] Updated TS types
    - [X] Updated documentation: <!-- For adding new props to native-stack
    -->
    - [X]
    https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    - [X]
    https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
    - [X]
    https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
    - [X]
    https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
    - [X] Ensured that CI passes
    
    ---------
    
    Co-authored-by: bojanlozanovski77 <bojanlozanovski77@users.noreply.github.com>
    Co-authored-by: Kacper Kafara <kacperkafara@gmail.com>
    3 people authored Aug 30, 2025
    Configuration menu
    Copy the full SHA
    93cee67 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2025

  1. feat(iOS, Tabs): add shadow color to appearance (#3180)

    ## Description
    
    `shadowColor` was missing in appearance. With this prop, the tab bar can
    be fully hidden
    
    ## Changes
    
    <!--
    Please describe things you've changed here, make a **high level**
    overview, if change is simple you can omit this section.
    
    For example:
    
    - Updated `about.md` docs
    
    -->
    
    <!--
    
    ## Screenshots / GIFs
    
    Here you can add screenshots / GIFs documenting your change.
    
    You can add before / after section if you're changing some behavior.
    
    ### Before
    
    ### After
    
    -->
    
    ## Test code and steps to reproduce
    
    <!--
    Please include code that can be used to test this change and short
    description how this example should work.
    This snippet should be as minimal as possible and ready to be pasted
    into editor (don't exclude exports or remove "not important" parts of
    reproduction example)
    -->
    
    ## Checklist
    
    - [ ] Included code example that can be used to test this change
    - [ ] Updated TS types
    - [ ] Updated documentation: <!-- For adding new props to native-stack
    -->
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
    - [ ] Ensured that CI passes
    Ubax authored Sep 1, 2025
    Configuration menu
    Copy the full SHA
    88380a6 View commit details
    Browse the repository at this point in the history
  2. chore(deps): bump RN to 0.81.1 in lib & apps (#3185)

    ## Description
    
    I need 0.81.1 for synchronous event testing (for safe area view +
    flickers)
    
    This PR bumps RN versions for both library development dependencies &
    example apps.
    
    Also after running `yarn install` I had to bump worklets & reanimated,
    since their version got out of sync & I've encountered following error:
    
    <img width="2617" height="661" alt="image"
    src="https://github.com/user-attachments/assets/f0736ca5-b678-4871-99aa-b9d13d410bb6"
    />
    
    
    
    ## Changes
    
    - **Bump RN to 0.81.1 in lib dev deps**
    - **Bump RN to 0.81.1 in example apps**
    
    ## Test code and steps to reproduce
    
    CI should build & apps should run as before
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Sep 1, 2025
    Configuration menu
    Copy the full SHA
    d15770f View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2025

  1. feat(iOS, Stack v4): bring back view recycling for ContentWrapper (#3187

    )
    
    ## Description
    
    Brings back view recycling for `RNSScreenContentWrapper` that has been
    disabled in
    #3111.
    
    More detailed explanation is available in
    #3111 (comment).
    
    Closes
    software-mansion/react-native-screens-labs#391.
    
    ## Changes
    
    - reenable view recycling for `ContentWrapper`
    - disable auto layout for `ContentWrapper` when preparing to recycle
    `HeaderConfig`
    
    ## Test code and steps to reproduce
    
    Open Test3111, fist open `ModalWithScrollView`, then
    `ModalWithScrollViewAndNoHeader`. Scroll should work properly in
    `ModalWithScrollViewAndNoHeader`.
    You can also open `ModalWithScrollView`, add `headerShown: false`, and
    save - scroll should also work now.
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [ ] Updated TS types
    - [ ] Updated documentation: <!-- For adding new props to native-stack
    -->
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
    - [x] Ensured that CI passes
    kligarski authored Sep 2, 2025
    Configuration menu
    Copy the full SHA
    24a5645 View commit details
    Browse the repository at this point in the history
  2. feat(Android): Support dark mode in android BottomTabs (#3167)

    ## Description
    
    This PR adds support for resolving configuration attributes in
    TabsHostAppearanceCoordinator to fetch correct colors for light and dark
    mode.
    
    Closes
    software-mansion/react-native-screens-labs#267.
    
    @kkafar
    [Add support for reacting to Appearance.setColorScheme
    calls](11b71b1)
    
    This was a bit tricky. Our views are not notified in any way that the
    configuration got changed, but fortunately our fragments do. Therefore,
    I've forwarded configuration changes from `TabScreenFragment` to
    `TabsHost`. This was done indirectly, through `TabScreen` &
    `TabScreenDelegate` to avoid coupling the components.
    
    When doing so I encountered another problem: the resources of our theme
    applied to `ContextThemeWrapper` were not updated. This was done
    because, the API that RN uses - `AppCompatDelegate.setDefaultNightMode`
    applies theme changes only to top level application context (and
    configuration changes are then dispatched). The solution would be to
    recreate the `ContextThemeWrapper`, however lifecycle of our fragments &
    views is bound to the `ContextThemeWrapper`, therefore we would prefer
    to avoid recreation of the whole managed hierarchy.
    
    I've settled with manually applying appropriate theme depending on
    uimode provided by the configuration. This solves the problem.
    
    
    ## Changes
    
    Replaced context.getColor call for light mode colors only with
    context.resolveAttribute to query values set for current mode.
    
    
    https://github.com/user-attachments/assets/8d6dd1a9-7fa1-4078-8829-60b98090b958
    
    ## Test code and steps to reproduce
    
    Use TestBottomTabs, make sure to comment out default prop values in
    `apps/src/shared/gamma/containers/bottom-tabs/BottomTabsContainer.tsx`
    
    ---------
    
    Co-authored-by: Kacper Kafara <kacperkafara@gmail.com>
    kmichalikk and kkafar authored Sep 2, 2025
    Configuration menu
    Copy the full SHA
    7c6d921 View commit details
    Browse the repository at this point in the history
  3. chore(iOS): add RNS_IPHONE_OS_VERSION_AVAILABLE macro (#3171)

    ## Description
    
    Adds `RNS_IPHONE_OS_VERSION_AVAILABLE` macro in order to simplify SDK
    checks in native iOS code.
    
    ### Before
    ```obj-c
    #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_26_0) && \
        __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_26_0
    // ...
    #endif 
    ```
    
    ### After
    ```obj-c
    #if RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
    // ...
    #endif
    ```
    
    Closes
    software-mansion/react-native-screens-labs#286.
    
    ## Changes
    
    - add `RNS_IPHONE_OS_VERSION_AVAILABLE` macro
    - replace old SDK checks with new macro
    - remove outdated SDK checks (iOS 14, iOS 15; min target is 15.1)
    
    ## Test code and steps to reproduce
    
    Example apps should build on both architectures.
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [ ] Updated TS types
    - [ ] Updated documentation: <!-- For adding new props to native-stack
    -->
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
    - [ ] Ensured that CI passes
    kligarski authored Sep 2, 2025
    Configuration menu
    Copy the full SHA
    4966d59 View commit details
    Browse the repository at this point in the history
  4. feat(iOS 26, Stack v4): support for new search bar placements, integr…

    …ation with toolbar (#3168)
    
    ## Description
    
    This PR addresses changes to search bar on iOS 26.
    
    Closes
    software-mansion/react-native-screens-labs#339.
    
    After merging, docs in `react-navigation` should also be updated, issue
    for this:
    software-mansion/react-native-screens-labs#384.
    
    ## Changes
    
    - add support for new search bar placements (`integrated`,
    `integratedButton`, `integratedCentered`),
    - add prop for controlling new search bar toolbar integration on iPhone
    (`allowToolbarIntegration`),
    - deprecate one of the placements (`inline` has been renamed to
    `integrated` starting from iOS 26) and `cancelButtonText` (search cancel
    button does not have any text on iOS 26),
    - reduce scope of workaround introduced in
    #3098 (only
    to `stacked` placement)
    - disable recycling for `SearchBar` (workaround above does not solve all
    bugs with search bar on iOS 26).
    
    ## Screenshots / GIFs
    
    
    https://github.com/user-attachments/assets/bcbb86e1-298d-4942-a290-3acdaef4214d
    
    > [!NOTE]
    > If you use `integrated`, `integratedButton` or `integratedCentered`,
    the integration into toolbar is delayed and causes a flash (you can see
    it on the video). This bug happens also in bare UIKit app. The best
    workarounds I could find are:
    > - use `automatic` with transparent header,
    > - use `automatic` with `hideWhenScrolling: true`
    >
    > Details:
    software-mansion/react-native-screens-labs#331 (comment)
    >
    > There is also another bug (also reproducible but due to how
    tabs+freeze work in screens, it's a little bit worse in our case). I
    think it's more of an edge case though (if you use tab with search
    systemItem but disable toolbar integration, the search bar is empty).
    Details:
    software-mansion/react-native-screens-labs#331 (comment)
    
    ## Test code and steps to reproduce
    
    Run `Test3168`. You can also see other Search Bar related test screens
    like `SearchBar.tsx`, `Test758`, `Test1097`.
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [x] Updated TS types
    - [ ] Updated documentation: <!-- For adding new props to native-stack
    -->
    - [x]
    https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
    - [x]
    https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
    - [ ] Ensured that CI passes
    kligarski authored Sep 2, 2025
    Configuration menu
    Copy the full SHA
    21e40a2 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2025

  1. feat!(iOS, Stack v4): change search bar related prop defaults (#3186)

    ## Description
    
    Changes default values for search bar related props.
    
    ### `hideWhenScrolling`
    On Fabric, for some reason, default value for `hideWhenScrolling` is
    `false`, even though:
    - on Paper, it is `true`, because we initialize `_hideWhenScrolling` to
    `YES`,
    - in `GUIDE_FOR_LIBRARY_AUTHORS`, react-navigation's docs, it is stated
    that the default value for this prop is `true`,
    - UIKit default is `true`.
    
    This PR fixes this.
    
    ### `placement`
    To preserve backward compatibility when adding `placement` as a prop,
    the default value for `placement` became `stacked`. Starting from iOS
    26, new search bar placements has been added (`integrated`, ...). In
    order to make it even easier for users to get *native feel* in their
    apps, we decided to change the default value of this prop to
    `automatic`.
    
    > [!WARNING]
    >
    > This seems like a **BREAKING** change from users perspective, but we
    consider it just as a alignment with native behaviour - iOS 26 just
    changes things.
    
    ## Changes
    
    - change default value of `hideWhenScrolling` to `true` on Fabric
    - change default value of `placement` to `'automatic'`
    - adjust test screens to use previous default values (I tried to use
    `hideWhenScrolling` where necessary)
    
    ## Test code and steps to reproduce
    
    Run tests related to search bar.
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [ ] Updated TS types
    - [ ] Updated documentation: <!-- For adding new props to native-stack
    -->
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
    - [x]
    https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
    - [ ]
    https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
    - [ ] Ensured that CI passes
    
    ---------
    
    Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
    kligarski and kkafar authored Sep 3, 2025
    Configuration menu
    Copy the full SHA
    4d2d417 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2025

  1. Release 4.16.0

    kligarski committed Sep 4, 2025
    Configuration menu
    Copy the full SHA
    d81cdc3 View commit details
    Browse the repository at this point in the history
Loading