Skip to content

Conversation

@Ubax
Copy link
Contributor

@Ubax Ubax commented Oct 24, 2025

Description

Adds special effects to bottom tabs implementation on Android

Screen.Recording.2025-10-24.at.13.34.17.mov

Changes

  1. Added ViewFinder helper, which has utils for finding ScrollView and Stack. The implementation is based on iOS one.
  2. Added popToRoot method to ScreenStack. It dispatches dismiss event for every non-root active screen on Stack. It is JS responsibility to remove this screen from stack. This way the dismiss can be prevented.
  3. Added handler for repeated tab press event.

Test code and steps to reproduce

Bottom tabs test app

Checklist

@Ubax Ubax changed the title feat: add initial implementation for scrollToTop effect on android feat(Android, Tabs): Add special effects to bottom tabs on Android Oct 24, 2025
@Ubax Ubax marked this pull request as ready for review October 24, 2025 11:41
@kkafar kkafar self-requested a review October 29, 2025 13:48
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. Only thing I'm worried about is the dismiss model, where we first notify JS & just then dismiss the screens.

I haven't made my mind yet, whether I wanna go this way or not. Will be back soon with more feedback.

@Ubax Ubax force-pushed the @ubax/android-special-effects branch from e96c62b to dcd807a Compare November 17, 2025 15:10
@Ubax Ubax requested a review from kkafar November 17, 2025 15:10
@Ubax Ubax force-pushed the @ubax/android-special-effects branch from dcd807a to f841588 Compare November 17, 2025 15:13
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so as we talked, I agree for current dismissal model, but it won't be stable. That is - it might be a subject of change in the future.

I'll revisit the code now & land it soon

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work currently in TestBottomTabs example. For some reason the hierarchy looks as follows:

Image

This causes stack to be not found by the "first descendant chain" algorithm.

This seems like rather common setup, therefore I need to investigate this first.

@kkafar
Copy link
Member

kkafar commented Nov 19, 2025

FYI: The root cause here is SafeAreaListener recently added to react-navigation. I've started pushing changes to fix this there.

We need to update react navigation as we need this fix: react-navigation/react-navigation#12853
to make this PR work properly. Otherwise we encounter error as [reported
earlier in the
PR](software-mansion#3337 (review)).
@kkafar kkafar merged commit 253b826 into software-mansion:main Nov 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants