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.5.0
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.6.0
Choose a head ref
  • 20 commits
  • 78 files changed
  • 4 contributors

Commits on Jan 14, 2025

  1. chore: bump deps in lib & examples (part 1 of fixing CI) (#2618)

    ## Description
    
    Motivation: 
    
    working on #2466 right now & need these changes + this is also required
    to fix the failing CI
    
    ## Changes
    
    Bumped versions of reanimated, gesture handler and safe-area-context in
    both lib and the examples
    
    ## Test code and steps to reproduce
    
    :fingers_crossed: CI?
    
    Okay, seems that Android part of the CI is fixed. iOS has some other,
    yet undetermined problems. I do not see a regression on iOS part,
    however.
    
    ## Checklist
    
    - [x] (kinda ☝🏻) Ensured that CI passes
    kkafar authored Jan 14, 2025
    Configuration menu
    Copy the full SHA
    3555d23 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2025

  1. chore(CI): fix part 2 - set xcode-version to 16.1 (#2620)

    ## Description
    
    Apparently there are some issues with newer xcode versions on GitHub CI
    
    Following [gesture-handler
    lead](software-mansion/react-native-gesture-handler#3319)
    here.
    
    ## Changes
    
    Set `xcode-version` to `16.1` temporarily in our CI workflow
    definitions.
    
    ## Test code and steps to reproduce
    
    hopefully iOS-related workflows pass
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Jan 16, 2025
    Configuration menu
    Copy the full SHA
    9ed3987 View commit details
    Browse the repository at this point in the history
  2. fix: clicking on Pressable located in screen header (#2466)

    ## Description
    
    This PR fixes clicking on Pressables that are added to the native
    header. Previously, Yoga had incorrect information about the location of
    the content in the header.
    
    The first step was to remove `top: "-100%"` style from the
    `ScreenStackHeaderConfig` which made Yoga think, that the content is
    pushed up by the size of its parent (Screen size).
    
    The second step involved updating `layoutMetrics` of the
    `RNSScreenStackHeaderConfigShadowNode`. The entire app content is pushed
    down by the size of the header, so it also has an impact on the header
    config in Yoga metrics. To mitigate this, the origin of
    `RNSScreenStackHeaderConfigShadowNode` is decreased by the size of the
    header which will zero out eventually leaving the header content in the
    desired position. On iOS this position is actually moved by the top
    inset size, so we also have to take it into account when setting header
    config layout metrics.
    
    Fixes #2219 
    
    ## Changes
    
    Updated `ScreenShadowNode` to decrease `origin.y` of the
    `HeaderConfigShadowNode` by the size of the header. Added `paddingTop`
    to `HeaderConfigState` and set it as origin offset on iOS.
    
    <!--
    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
    
    ### Before
    
    | iOS       | Android        |
    |--------------|--------------|
    | <video
    src="https://github.com/user-attachments/assets/aa054d20-58e5-4153-924b-a1b74879ae6b">
    | <video
    src="https://github.com/user-attachments/assets/dd9d2732-10c5-40ca-b384-1570c08410cf">
    |
    
    ### After
    
    | iOs       | Android        |
    |--------------|--------------|
    | <video
    src="https://github.com/user-attachments/assets/6953c9e5-b418-41b1-8b99-27f70c5df688">
    | <video
    src="https://github.com/user-attachments/assets/f5762f46-36b2-423a-93da-9f61032b54bf">
    |
    
    
    
    ## Test code and steps to reproduce
    
    Tested on this example:
    
    <details>
     <summary>code</summary>
    
    ```ts
    import { NavigationContainer } from "@react-navigation/native";
    import { createNativeStackNavigator, NativeStackNavigationProp } from "@react-navigation/native-stack";
    import React, { ForwardedRef, forwardRef } from "react";
    import { findNodeHandle, Pressable, PressableProps, StyleSheet, Text, View, } from "react-native";
    
    type StackParamList = {
      Home: undefined,
    }
    
    type RouteProps = {
      navigation: NativeStackNavigationProp<StackParamList>;
    }
    
    type PressableState = 'pressed-in' | 'pressed' | 'pressed-out'
    
    
    const Stack = createNativeStackNavigator<StackParamList>();
    
    
    const PressableWithFeedback = forwardRef((props: PressableProps, ref: ForwardedRef<View>): React.JSX.Element => {
      const [pressedState, setPressedState] = React.useState<PressableState>('pressed-out');
    
      const onPressInCallback = React.useCallback((e) => {
        console.log('Pressable onPressIn', {
          locationX: e.nativeEvent.locationX,
          locationY: e.nativeEvent.locationY,
          pageX: e.nativeEvent.pageX,
          pageY: e.nativeEvent.pageY,
        });
        setPressedState('pressed-in');
        props.onPressIn?.();
      }, []);
    
      const onPressCallback = React.useCallback(() => {
        console.log('Pressable onPress');
        setPressedState('pressed');
      }, []);
    
      const onPressOutCallback = React.useCallback(() => {
        console.log('Pressable onPressOut');
        setPressedState('pressed-out');
      }, []);
    
      const onResponderMoveCallback = React.useCallback(() => {
        console.log('Pressable onResponderMove');
      }, []);
    
      const contentsStyle = pressedState === 'pressed-out'
        ? styles.pressablePressedOut
        : (pressedState === 'pressed'
          ? styles.pressablePressed
          : styles.pressablePressedIn);
    
      return (
        <View ref={ref} style={[contentsStyle, { width: "100%"}]}>
          <Pressable
            onPressIn={onPressInCallback}
            onPress={onPressCallback}
            onPressOut={onPressOutCallback}
            onResponderMove={onResponderMoveCallback}
          >
            {props.children}
          </Pressable>
        </View>
    
      );
    })
    
    function HeaderTitle(): React.JSX.Element {
    
      return (
        <PressableWithFeedback
          onPressIn={() => {
            console.log('Pressable onPressIn')
          }}
          onPress={() => console.log('Pressable onPress')}
          onPressOut={() => console.log('Pressable onPressOut')}
          onResponderMove={() => console.log('Pressable onResponderMove')}
          ref={ref => {
            console.log(findNodeHandle(ref));
            ref?.measure((x, y, width, height, pageX, pageY) => {
              console.log('header component measure', { x, y, width, height, pageX, pageY });
            })
          }}
        >
          <View style={{ height: 40, justifyContent: 'center', alignItems: 'center' }}>
            <Text style={{ alignItems: 'center' }}>Regular Pressable</Text>
          </View>
        </PressableWithFeedback>
      )
    }
    
    function Home(_: RouteProps): React.JSX.Element {
      return (
        <View style={{ flex: 1, backgroundColor: 'rgba(0, 0, 0, .8)' }}
        >
          <View style={{ flex: 1, alignItems: 'center', marginTop: 48 }}>
            <PressableWithFeedback
              onPressIn={() => console.log('Pressable onPressIn')}
              onPress={() => console.log('Pressable onPress')}
              onPressOut={() => console.log('Pressable onPressOut')}
            >
              <View style={{ height: 40, width: 200, justifyContent: 'center', alignItems: 'center' }}>
                <Text style={{ alignItems: 'center' }}>Regular Pressable</Text>
              </View>
            </PressableWithFeedback>
          </View>
        </View>
      );
    }
    
    function App(): React.JSX.Element {
      return (
        <NavigationContainer>
          <Stack.Navigator>
            <Stack.Screen
              name="Home"
              component={Home}
              options={{
                headerTitle: HeaderTitle,
              }}
            />
          </Stack.Navigator>
        </NavigationContainer>
      );
    }
    
    const styles = StyleSheet.create({
      pressablePressedIn: {
        backgroundColor: 'lightsalmon',
      },
      pressablePressed: {
        backgroundColor: 'crimson',
      },
      pressablePressedOut: {
        backgroundColor: 'lightseagreen',
      }
    });
    
    
    export default App;
    
    
    ```
    
    </details>
    
    
    <!--
    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)
    -->
    
    ---------
    
    Co-authored-by: Kacper Kafara <kacperkafara@gmail.com>
    coado and kkafar authored Jan 16, 2025
    Configuration menu
    Copy the full SHA
    e741b8e View commit details
    Browse the repository at this point in the history
  3. chore(examples): remove dependency on react-native-vector-icons (#2621

    )
    
    ## Description
    
    We no longer use this dependency anywhere.
    
    ## Changes
    
    Removed `react-native-vector-icons` and updated lock files.
    
    ## Test code and steps to reproduce
    
    CI + run the examples on your local setup
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Jan 16, 2025
    Configuration menu
    Copy the full SHA
    7dc6916 View commit details
    Browse the repository at this point in the history
  4. refactor(Android): rename FabricEnabledHeaderSubviewGroup -> `Fabri…

    …cEnabledHeaderSubviewViewGroup` + fix arch-consistency check (#2622)
    
    - **Add FabricEnabledHeaderSubviewViewGroup to arch-check balcklist**
    - **Fix naming**
    
    ## Description
    
    <!--
    Description and motivation for this PR.
    
    Include Fixes #<number> if this is fixing some issue.
    
    Fixes # .
    -->
    
    ## 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
    kkafar authored Jan 16, 2025
    Configuration menu
    Copy the full SHA
    c07e9b6 View commit details
    Browse the repository at this point in the history
  5. fix(iOS): make RCTMountingTransactionObserving implementation new-a…

    …rch only (#2624)
    
    ## Description
    
    I've made mistake in #2466 - the aforementioned protocol does not exist
    on Paper.
    
    ## Changes
    
    Use ifdef directive to prevent build errors.
    
    
    ## Test code and steps to reproduce
    
    iOS + old-arch should just build.
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Jan 16, 2025
    Configuration menu
    Copy the full SHA
    07fc4a0 View commit details
    Browse the repository at this point in the history
  6. fix: remove workaround for removing clipped subviews (#2596)

    ## Description
    
    This PR removes the workaround introduced in series of PRs (listed
    chronologically here):
    
    1. #2307
    2. #2383
    3. #2495
    4. #2531
    
    For detailed description of error mechanism and broader discussion
    please refer to:
    
    1. [my comment on
    #2495](#2495 (comment)),
    2. [my fix to RN
    core](facebook/react-native#47634)
    
    tldr: When popping screen on Fabric we marked the views as
    "transitioning" and this led to view being effectively miscounted
    during removal by view groups that supported react-native's subview
    clipping mechanism.
    
    The issue has been present most likely in every version of the library
    when running on Android & Fabric, but it arose few months ago due to
    broader
    adoption of the new architecture.
    
    facebook/react-native#47634 is supposed to fix
    the underlying issue in `react-native's` core.
    
    ## Changes
    
    Removed the workaround code from `Screen` implementation on Android.
    
    The 
    
    * facebook/react-native#47634
    
    has been released with 0.77.0-rc.3 and followup small fixup:
    
    * facebook/react-native#48329
    
    has been released with 0.77.0-rc.4.
    
    Therefore, with landing this PR we should limit our support on Fabric to
    0.77.0.
    
    ## Test code and steps to reproduce
    
    `Test2282` - note that there are few testing variants available there,
    you just need to comment (out) some parts of the code.
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [ ] Ensured that CI passes
    kkafar authored Jan 16, 2025
    Configuration menu
    Copy the full SHA
    2aa278c View commit details
    Browse the repository at this point in the history
  7. release: 4.6.0-beta.0 (#2625)

    ## Description
    
    Release 4.6.0-beta.0
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Jan 16, 2025
    Configuration menu
    Copy the full SHA
    5408827 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2025

  1. chore: bump RN to 0.77.0-rc.7 in examples and lib (#2630)

    ## Description
    
    Bumping rn to 0.77.0-rc.7 in examples and library dev dependencies.
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Jan 17, 2025
    Configuration menu
    Copy the full SHA
    7ebf02f View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2025

  1. feat(Android): deprecate series of status/navigation bar related props (

    #2638)
    
    ## Description
    
    ### Important context
    
    * [Android SDK 35 behaviour
    changes](https://developer.android.com/about/versions/15/behavior-changes-15#ux)
    * [status bar color API deprecation
    note](https://developer.android.com/reference/android/view/Window#setStatusBarColor(int))
    * [navigation bar color API deprecation
    note](https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int))
    * [edge-to-edge on
    Android](https://developer.android.com/develop/ui/views/layout/edge-to-edge)
    
    For all apps targeting Android SDK 35 the edge-to-edge mode is enabled
    by default (it is effectively enforced, opting out takes some effort)
    and everything indicates that it will be enforced in future SDKs.
    
    For SDKs below 35 the status / navigation bar APIs affected by this PR
    are deprecated or deprecated & disabled (see above links ☝🏻 ).
    
    Currently minimal target sdk level for google app store is 34
    ([source](https://median.co/blog/google-plays-target-api-level-requirement-for-android-apps)).
    We can't really foresee when SDK level 35 will be required, however it
    can be clearly seen that edge-to-edge will be the promoted and supported
    way of designing UI on Android.
    
    We want to get rid of these props for one more reason. These are
    Android-specific props and translucency is implemented by (not)
    consuming appropriate window insets, which leads to conflicts with other
    libs *and we can't set right defaults*, since it is not really possible
    to detect whether the app is in edge to edge or not leading to some
    buggy behaviour (initial content jump etc.).
    
    ## Changes
    
    - **Deprecate navigationBarColor**
    - **Deprecate navigationBarTranslucent**
    - **Deprecate statusBarColor**
    - **Deprecate statusBarTranslucent**
    - **Deprecate topInsetEnabled**
    
    ## Test code and steps to reproduce
    
    No runtime changes.
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Jan 20, 2025
    Configuration menu
    Copy the full SHA
    b69ea04 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2025

  1. refactor(iOS): update view controller once per transaction when addin…

    …g header subviews (#2623)
    
    ## Description
    
    In #2466 I've introduced `RCTMountingTransactionObserving` for
    `RNSScreenStackHeaderConfig` component.
    Now we can use this to reduce amount of calls to
    `updateViewControllerIfNeeded` (causing layout passes) when adding
    subviews.
    
    I'm not changing the `unmount` path of the code as we have some more
    additional logic there which requires some more
    careful consideration. 
    
    This also aligns us with Paper implementation. Note that it has been
    only implemented this way, because at the implementation time there was
    no way
    to run this code on transaction completion.
    
    ## Changes
    
    `- [RNSScreenStackHeaderConfig updateViewControllerIfNeeded]` is now
    called only once per transaction when adding subviews to header config.
    
    ## Test code and steps to reproduce
    
    Test432, TestHeaderTitle, Test2552 - see that there are no regressions. 
    
    > [!note]
    During testing I've found that there is a bug with subview layout when
    modifying subviews after first render. This is not a regression however.
    Notice the wrong position of header right on video below 👇🏻 (Test432)
    
    
    
    https://github.com/user-attachments/assets/7f8653e8-a7d9-4fb8-a875-182e7deb0495
    
    
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [x] Ensured that CI passes
    kkafar authored Jan 21, 2025
    Configuration menu
    Copy the full SHA
    3c589b1 View commit details
    Browse the repository at this point in the history
  2. chore(types): update information on nested stack rendering support (#…

    …2639)
    
    ## Description
    
    Closes #2633
    
    ## Changes
    
    Enhanced description of `formSheet` presentation style with information
    that nested stack rendering is not yet supported on Android.
    
    ## Checklist
    
    - [ ] Ensured that CI passes
    kkafar authored Jan 21, 2025
    Configuration menu
    Copy the full SHA
    4bfc959 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2025

  1. fix(iOS,Fabric): fix invalid position of FullWindowOverlay in certain…

    … scenarios (#2641)
    
    ## Description
    
    Fixes #2631
    
    I've given extensive description of both the issue ~and potential
    solution~ in #2631 issue discussion
    
    * #2631
    
    In particular important parts are:
    
    *
    #2631 (comment)
    *
    #2631 (comment)
    
    I settled down on zeroing origin of the `FullWindowOverlay` frame in
    HostTree & setting `ShadowNodeTraits::RootNodeKind` for the custom
    shadow node of `FullWindowOverlay` component in the ShadowTree. This is
    much cleaner than managing the state & content offset manually.
    
    ## Changes
    
    `FullWindowOverlay` has now custom component descriptor, shadow node &
    shadow node state (its empty). The shadow node has
    `ShadowNodeTraits::RootNodeKind` set allowing it to be the reference
    point when computing position of any descendant view in shadow tree -
    this is fine, because we always expect `FullWindowOverlay` to have
    origin at `(0, 0)` in window coordinate space.
    
    In the HostTree we now ensure that `FWO` origin is at `(0, 0)` by
    overriding frame received during mounting stage.
    
    ## Test code and steps to reproduce
    
    Test2631 should now work not as in recording from issue description but
    correctly.
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [x] Ensured that CI passes
    kkafar authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    0f411ac View commit details
    Browse the repository at this point in the history
  2. chore: fix code editing (add dev dependency on eslint-plugin-ft-flow (#…

    …2644)
    
    ## Description
    
    Had issues editing top level project files as eslint language server
    would report missing dependency.
    
    Installing it.
    
    ## Changes
    
    Added dev depenency on `eslint-plugin-ft-flow` for the library.
    
    ## Test code and steps to reproduce
    
    N/A
    
    ## Checklist
    
    - [x] Ensured that CI passes (lint fails recently)
    kkafar authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    ea56038 View commit details
    Browse the repository at this point in the history
  3. chore(CI): fix linting (#2645)

    ## Description
    
    Lint started failing recently for no apparent reason with errors:
    
    ```
    Run yarn format
    RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded
        at new NodeError (node:internal/errors:405:5)
        at Socket.onChildStdout (node:child_process:490:14)
        at Socket.emit (node:events:517:28)
        at addChunk (node:internal/streams/readable:368:12)
        at readableAddChunk (node:internal/streams/readable:337:11)
        at Readable.push (node:internal/streams/readable:278:10)
        at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
      code: 'ERR_CHILD_PROCESS_STDIO_MAXBUFFER',
      cmd: './android/gradlew -p android spotlessApply'
    }
    ```
    
    and 
    
    ```
    Not a number: 33x:
    java.lang.NumberFormatException: Not a number: 33x
    	at com.sun.xml.bind.DatatypeConverterImpl._parseInt(DatatypeConverterImpl.java:95)
    	at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$18.parse(RuntimeBuiltinLeafInfoImpl.java:712)
    	at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$18.parse(RuntimeBuiltinLeafInfoImpl.java:710)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.TextLoader.text(TextLoader.java:39)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:560)
    	at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.processText(SAXConnector.java:183)
    ...
    (much longer stacktrace)
    ```
    
    Edit: Idk why the issue started happening, but bumping gradle wrapper
    version & gradle build tools version resolved the issue.
    
    I've used [versions used in
    reanimated](software-mansion/react-native-reanimated#6629),
    at the time their last supported version of `react-native` was 0.74 (the
    same as it is for us now).
    
    ## Test code and steps to reproduce
    
    Lint on CI should not longer fail.
    
    ## Checklist
    
    - [x] Ensured that CI passes
    kkafar authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    9d9e797 View commit details
    Browse the repository at this point in the history
  4. fix(Android): Restore focus on page transitions (#2640)

    ## Description
    
    After #1894 was merged, a refactoring of the native source happened, and
    the call to `lastFocusedChild.requestFocus()` that happened on the
    overridden `onStart()` method in `ScreenStackFragment` got lost along
    the way, making focus disappear when popping a screen from the stack.
    
    Fixes #1706 
    
    ## Changes
    
    - Updated `ScreenStackFragment.kt`, resurrecting the old `onStart()`
    override (`lastFocusedChild` is only set on Android TV, so this change
    only affects that platform)
    micheleb authored Jan 23, 2025
    Configuration menu
    Copy the full SHA
    c0b5586 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2025

  1. fix(Android): fix draw ordering in transparent modal & stack nested i…

    …n tabs interaction (#2647)
    
    ## Description
    
    Fixes #2167
    
    The exact error mechanism is **really** convoluted. The gist of it
    however, and the issue cause lies in the fact
    that our drawing / container updating logic worked under implicit (and
    unspoken of) assumption that draw reordering would not be
    applied for the transaction attaching very first screen in the stack.
    Everything worked correctly until #2019 caused `needsDrawReordeing`
    to return `true` **always when `Build.VERSION.SDK_INT > 33`** - and that
    means pretty much **always** in new apps. Previously it returned
    `false`,
    in particular for the very first screen on stack because no one really
    sets `stackAnimation` for the very first screen, since [it will have no
    animation
    anyway](https://github.com/software-mansion/react-native-screens/blob/c0b5586b7e645ed1d22143b5f84e0dd65dcd06be/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt#L137)
    (and we might enforce this somewhere in JS code also, I'm not sure now).
    
    This PR restores returning `false` there for first screen on the stack &
    for any screen that uses `animation: 'none'`.
    
    
    ### Summary of the error mechanism
    
    Consider following case:
    
    ```tsx
    function App() {
        return (
            <Tabs>
                <Screen A>
                    <Stack>
                        <Screen SA />
                        <Screen TM />
                    </Stack>
                </Screen A>
                <Screen B />
            </Tabs>
        );
    }
    ```
    
    Initially `Screen SA` is rendered. Basically when
    [`isDetachingCurrentScreen`] was set for the very first screen (directly
    because return value of `needsDrawReordeing`) and then
    we navigated to other tab `Screen B` - we cause whole stack `Stack` to
    be dropped & detached from window. Native callback
    `onDetachedFromWindow` gets called in `ScreenContainer`,
    we detach every fragment and subview (to prevent whole different class
    of bugs) causing `removeView` callbacks in `ScreenStack`, leading to
    `reverseLastTwoChildren` flag being set to `true`. When we then change
    tab back to `Screen SA` in `Stack`
    the drawing works as normal, because we have only one child. On
    navigation to `Screen TM` (transparent modal) value of the
    `reverseLastTwoChildren` flag causes the views to being drawn
    in wrong order - transparent modal first and `Screen SA` second. In case
    of not `transparent` presentation there is no issue, because `Screen SA`
    would get
    [detached](https://github.com/software-mansion/react-native-screens/blob/c0b5586b7e645ed1d22143b5f84e0dd65dcd06be/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt#L113-L115).
    
    
    ## Changes
    
    Added param to `needsDrawReordeing` method informing of actual stack
    animation in use (in case of first screen we always set it to `none`).
    When there is no animation for the disappearing screen - there is no
    need to change the draw ordering. Added appropriate code comment for the
    future.
    
    ## Test code and steps to reproduce
    
    `Test2167`
    
    ## Checklist
    
    - [x] Included code example that can be used to test this change
    - [x] Ensured that CI passes
    kkafar authored Jan 24, 2025
    Configuration menu
    Copy the full SHA
    ec7afd0 View commit details
    Browse the repository at this point in the history
  2. Release 4.6.0-beta.1

    kkafar committed Jan 24, 2025
    Configuration menu
    Copy the full SHA
    a8f1be3 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2025

  1. chore: bump react-navigation submodule version (#2658)

    ## Description
    
    Bumping to current main: bddcc44ab0e0ad5630f7ee0feb69496412a00217
    
    
    ![image](https://github.com/user-attachments/assets/c1858e87-436f-441d-a0cd-b8a668ed67ac)
    
    
    ## Test code and steps to reproduce
    
    Examples should work as usual.
    
    ## Checklist
    
    - [x] Ensured that CI passes
    kkafar authored Jan 29, 2025
    Configuration menu
    Copy the full SHA
    8982286 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2025

  1. Release 4.6.0

    kkafar committed Jan 31, 2025
    Configuration menu
    Copy the full SHA
    a8ae962 View commit details
    Browse the repository at this point in the history
Loading