Skip to content

Conversation

@d4vidi
Copy link
Collaborator

@d4vidi d4vidi commented Apr 3, 2025

Fix bottom-tab positioning for apps targeting SDK35 (i.e. with edge-to-edge layout by default), which otherwise does not account for the bottom window inset and is therefore laid out under the navigation bar (e.g. in the 3-button mode).

Before:
image

After:
image

(in edge-to-edge the 3-btn nav bar is [80% transparent by default])

Note: This does not in any way introduce complete support for SDK35. There are still numerous adjustments to be made (see #7978).

@yedidyak @Yoavpagir

@d4vidi d4vidi requested a review from Copilot April 3, 2025 15:14
@d4vidi d4vidi changed the base branch from master to 7.x.x April 3, 2025 15:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes bottom-tab positioning for apps targeting SDK35 by updating view controller visibility handling and adjusting status bar and tab animations to support edge-to-edge layouts. Key changes include refactoring of status bar options via a dedicated StatusBarPresenter, introduction of new visibility info data classes, and removal of deprecated imports and legacy status bar methods.

Reviewed Changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarReactViewCreatorMock.java Removed duplicate static import of Mockito.mock.
lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.kt Initializes feature toggles by invoking RNNFeatureToggles.init().
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewControllerVisibilityInfo.kt Introduces new visibility info data classes for view controllers and top bars.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewController.java Adds onSelected/onDeselected methods and replaces status bar controller with push/pop animation methods.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/StatusBarColorAnimator.kt Implements status bar color animations with translucency handling.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java Refactors status bar option applications to use the new StatusBarPresenter.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/statusbar/StatusBarPresenter.kt Entirely new implementation managing status bar behaviors and animations.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/TopBarController.kt Adds view visibility info and a new bindNewViewController method to animate top bar transitions.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarPresenter.kt Removed legacy status bar presenter interface.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/statusbar/StatusBarController.kt Removed legacy status bar controller interface.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenter.java Updates status bar animation invocations to leverage the new methods.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java Passes new view controller visibility info up through the stack controller.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java Removes dependency on legacy status bar controller interface and forwards animation calls.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentPresenter.java Updates push/pop animation methods to use the new StatusBarPresenter.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java Adjusts bottom tab view handling and insets application, and updates tab selection behavior.
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenter.java Removes an unused import related to bottom tabs text view.
lib/android/app/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt Removes unused Build import and simplifies status bar color setting logic.
lib/android/app/src/main/java/com/reactnativenavigation/utils/ColorUtils.java Adds helper methods for checking lightness and setting alpha on colors.
lib/android/app/src/main/java/com/reactnativenavigation/NavigationActivity.java Initializes the new StatusBarPresenter and cleans up obsolete imports.
lib/android/app/src/main/java/com/reactnativenavigation/FeatureToggles.kt Renames and adds new feature toggles for top bar color animations.

@d4vidi d4vidi changed the title SDK35 Fix SDK35 Bottom-tab positioning Apr 3, 2025
@d4vidi d4vidi force-pushed the sdk35.bottom-tabs branch from cfe2e15 to a2e6ec6 Compare April 3, 2025 15:17
@d4vidi d4vidi self-assigned this Apr 3, 2025
@d4vidi d4vidi merged commit a9a2e8e into 7.x.x Apr 3, 2025
5 of 8 checks passed
@d4vidi d4vidi deleted the sdk35.bottom-tabs branch April 3, 2025 15:35
d4vidi added a commit that referenced this pull request Apr 3, 2025
d4vidi added a commit that referenced this pull request Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants