chore(test): new test-tabs-tab-bar-experimental-userInterfaceStyle with scenario#3856
Closed
chore(test): new test-tabs-tab-bar-experimental-userInterfaceStyle with scenario#3856
Conversation
…ns into @lkuchno/test-tabs-dark-experimental-userInterfaceStyle
kkafar
requested changes
Apr 9, 2026
Member
kkafar
left a comment
There was a problem hiding this comment.
Our single feature tests should not depend on react-navigation in any way.
Let's discuss why this is the case here first & plan migration path before we land it.
Comment on lines
+9
to
+25
| import { | ||
| createNativeStackNavigator, | ||
| } from '@react-navigation/native-stack'; | ||
|
|
||
| import { | ||
| useNavigation, | ||
| type NavigationProp, | ||
| ThemeProvider, | ||
| DarkTheme, | ||
| } from '@react-navigation/native'; | ||
|
|
||
| type RootStackParamList = { | ||
| Screen1: undefined; | ||
| DarkScreen: undefined; | ||
| }; | ||
|
|
||
| const Stack = createNativeStackNavigator<RootStackParamList>(); |
Member
There was a problem hiding this comment.
Why do we use Stack & utilities from react-navigation here?
We don't want direct dependency on react-navigation here.
Collaborator
Author
There was a problem hiding this comment.
I freeze this PR and test implementation until this change will be provided -> from comment: "migrated e.g. ThemedText component to some simple mechanism & remove react-navigation from the loop.".
…k-experimental-userInterfaceStyle/index.tsx Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
…' of github.com:software-mansion/react-native-screens into @lkuchno/test-tabs-dark-experimental-userInterfaceStyle
Replace direct useTheme (react-navigation) usage in themed components with useThemeColorPallette hook that supports local overrides via new ThemeProvider. Add text color to ColorPallette type and light/dark palettes. Remove old adapter/react-navigation/useColorPallette in favor of new theme-provider module. Move ScreensLightTheme and ScreensDarkTheme to Colors.ts as whole adapter/react-navigation directory is deleted.
…/react-native-screens into @lkuchno/test-tabs-dark-experimental-userInterfaceStyle
Replace direct useTheme (react-navigation) usage in themed components with useThemeColorPallette hook that supports local overrides via new ThemeProvider. Add text color to ColorPallette type and light/dark palettes. Remove old adapter/react-navigation/useColorPallette in favor of new theme-provider module.
it returns theme based on useTheme if useTheme throws an error, it is caught, a proper message is logged and DefaultTheme is returned
…, fix misspelling (pallette -> palette) also added LightTheme and DarkTheme and Theme type to Colors.ts, also moved ThemeName into this file useReactNavigation theme now returns undefined when useTheme throws an error if both useTheme and ThemeProvider don't provide us a theme, then useThemeColorPalette returns LightTheme as a default
useReactNavigationTheme works similar to useTheme though, but instead of throwing error when theme is null, it returns undefined
…/react-native-screens into @lkuchno/test-tabs-dark-experimental-userInterfaceStyle
Collaborator
Author
|
New PR will be created for this test - with 'merged' test for light and dark value and without using react-navigation stack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
UPDATE: New branch and PR will be created for this test
New screen for experimental_userInterfaceStyle: dark prop (iOS only) with corresponding manual scenario.
Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1116
Changes