Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
fa7d4dc
basic stuff working but needs cleanup
johankasperi Jun 25, 2025
178dcff
all basic props works
johankasperi Jun 25, 2025
82d0011
add support for spacing
johankasperi Jun 25, 2025
c184096
some more ios26 props
johankasperi Jun 25, 2025
231ca6f
support titleStyle
johankasperi Jun 25, 2025
2d942e2
titleStyle color
johankasperi Jun 26, 2025
fafe5ee
accesibility label and hint
johankasperi Jun 26, 2025
8f07970
UIMenu press callback
johankasperi Jun 26, 2025
5244d64
UIMenuElement state and attributes
johankasperi Jun 26, 2025
49fa2be
badge
johankasperi Jun 26, 2025
f2a75f9
new arch runs
johankasperi Jun 27, 2025
de5d025
proper examples of each feature
johankasperi Jun 27, 2025
ff41c01
only transparent on ios26
johankasperi Jun 27, 2025
c7dd927
make sure it runs on android
johankasperi Jun 27, 2025
57349f4
revert all changes to Podfile.lock
johankasperi Jun 27, 2025
9ab2269
format code
johankasperi Jun 27, 2025
8531b5d
update assets paths
johankasperi Aug 6, 2025
ce508cc
remove non needed checks for below ios 15.1
johankasperi Aug 6, 2025
e08b324
react-navigation changes
johankasperi Aug 7, 2025
14e8ec7
fix crash when removing existing barbuttonitems props
johankasperi Aug 7, 2025
3742265
do not set bar button items if dict count is 0
johankasperi Aug 12, 2025
8f6ca0c
remove old debug callback
johankasperi Aug 13, 2025
dd4f336
correct icon asset patch
johankasperi Aug 14, 2025
ede4406
new commits react navigation
johankasperi Aug 18, 2025
0742899
fallback to labelFontSize if fontSize not defined in titleStyle
johankasperi Aug 18, 2025
fe31a44
add support for systemImage
johankasperi Aug 18, 2025
6c4f5be
submodule changes
johankasperi Aug 18, 2025
2005770
add support for combining ReactNode and UIBarButtonItems
johankasperi Aug 19, 2025
d4f1962
init dict with correct size
johankasperi Aug 19, 2025
ea8fa29
submodule changes
johankasperi Aug 20, 2025
463c7fe
remove ios14 check
johankasperi Aug 21, 2025
40bbe74
rename systemImage to sfSymbolName
johankasperi Aug 21, 2025
7f8d4a1
react-navigation submodule change
johankasperi Aug 21, 2025
ddace5b
submodule update again
johankasperi Aug 21, 2025
f3c6ab7
submodule changes
johankasperi Aug 22, 2025
3295bc0
submodule changes
johankasperi Sep 2, 2025
139d8ce
add hidesSharedBackground prop to custom view bar button items
johankasperi Sep 2, 2025
30ea4b2
fix small nit
johankasperi Sep 4, 2025
1146841
extract setting titlestyle to method
johankasperi Sep 4, 2025
6710105
use RNS_IPHONE_OS_VERSION_AVAILABLE
johankasperi Sep 4, 2025
559a48a
add support for sfSymbolName in submenu
johankasperi Sep 4, 2025
51f21f3
refactor badge code into method
johankasperi Sep 4, 2025
8a53a57
refactor create UIMenu into a create UIAction method
johankasperi Sep 4, 2025
8421480
tsc example
johankasperi Sep 4, 2025
aa60900
remove usage of index
johankasperi Sep 5, 2025
513bc9d
add types to ScreenStackHeaderConfigProps
johankasperi Sep 7, 2025
43e5e4e
correct type name
johankasperi Sep 7, 2025
960da68
add docs
johankasperi Sep 7, 2025
52da043
add some missing docs
johankasperi Sep 7, 2025
ce376d4
add missing CT check
johankasperi Sep 10, 2025
e1d505f
Spell check GUIDE_FOR_LIBRARY_AUTHORS.md
johankasperi Sep 10, 2025
96ee0a5
syntax GUIDE_FOR_LIBRARY_AUTHORS.md
johankasperi Sep 10, 2025
5dec216
setBadgeFromConfig
johankasperi Sep 10, 2025
a3e01e2
setTitleStyleFromConfig
johankasperi Sep 10, 2025
2abbd26
createActionItemFromConfig
johankasperi Sep 10, 2025
f8c2f3f
initWithConfig
johankasperi Sep 10, 2025
09da1a1
add missing whitespace
johankasperi Sep 10, 2025
77daf62
use regular instance properties instead of objc associated object
johankasperi Sep 10, 2025
a504a57
use new method names
johankasperi Sep 10, 2025
1907654
add tvOS CT checks
johankasperi Sep 11, 2025
e1aeb02
add identifier example
johankasperi Sep 15, 2025
ff1c3bc
remove possibleTitles
johankasperi Sep 15, 2025
19cc811
correct spelling button style in guide
johankasperi Sep 15, 2025
eafc6a1
buttonId and itemAction as internal properties
johankasperi Sep 15, 2025
21111a1
add example in guide for library authors
johankasperi Sep 15, 2025
865c5a4
add link to ios docs and full menu type in guide
johankasperi Sep 17, 2025
9d583fe
ifdef the RCTDirectEventBlock props
johankasperi Sep 17, 2025
6bb0aea
do not copy already mutable array
johankasperi Sep 17, 2025
abe9d3f
barButtonItemsFromConfigs
johankasperi Sep 17, 2025
9ae18d9
ExessiveItemsExample
johankasperi Sep 17, 2025
e7062ca
support multiple views to the right/left in replaceNavigationBarViews…
johankasperi Sep 18, 2025
f839bb4
add missing ios platform annotations
johankasperi Sep 19, 2025
fddf16b
move prepareHeaderBarButtonItems to RN Screens
johankasperi Sep 23, 2025
1aeb113
use RCTImageLoader when loading images
johankasperi Sep 23, 2025
6bf6fd6
refactor from HeaderBarButtonItemWithCustomView obj to BarButtonItemC…
johankasperi Sep 25, 2025
2eba6f5
docs: same naming of item in the property descriptions
johankasperi Sep 25, 2025
16e0930
docs: better descriptions for headerRightItems and headerLeftItems
johankasperi Sep 25, 2025
5398910
move badge color and backgroundcolor into style obj
johankasperi Sep 25, 2025
5965b88
rename title to label
johankasperi Sep 26, 2025
0025868
set image on main queue
johankasperi Sep 26, 2025
7f86d7e
rename style to variant
johankasperi Sep 26, 2025
63db0eb
remove hidden prop
johankasperi Sep 26, 2025
0003b70
rename enabled to disabled
johankasperi Sep 26, 2025
5c171a9
guide for library authors corrections
johankasperi Sep 26, 2025
15c3287
rename image to imageSource and support ImageSourcePropType
johankasperi Sep 26, 2025
747a745
submodule changes
johankasperi Sep 26, 2025
69f6383
correct import
johankasperi Oct 2, 2025
95274c5
remove component descriptor from android react native config
johankasperi Oct 2, 2025
18971c7
remove screenId
johankasperi Oct 7, 2025
3a33074
guide changes
johankasperi Oct 7, 2025
2ecc9cf
remove dispatch_get_main_queue when setting hidesSharedBackground
johankasperi Oct 7, 2025
3ef0f53
refactor RNSBarButtonItemCustomView and remove circular dep
johankasperi Oct 7, 2025
d93acd6
barButtonItemFromSubview
johankasperi Oct 7, 2025
5b81909
rename BarButtonItemCustomView
johankasperi Oct 7, 2025
cd0a55f
lint
johankasperi Oct 7, 2025
b8a0164
add hidesSharedBackground to ScreenStackHeaderLeftView and ScreenStac…
johankasperi Oct 8, 2025
96c9846
remove RNSCustomViewBarButtonItem
johankasperi Oct 8, 2025
3aeb0f4
remove RNSCustomViewBarButtonItem from codegenConfig
johankasperi Oct 8, 2025
a3a4e5f
implement icon prop and create PlatformIcon types
johankasperi Oct 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.util.Log
import android.view.View
import com.facebook.react.bridge.JSApplicationCausedNativeException
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReadableArray
import com.facebook.react.module.annotations.ReactModule
import com.facebook.react.uimanager.LayoutShadowNode
import com.facebook.react.uimanager.ReactStylesDiffMap
Expand Down Expand Up @@ -318,4 +319,18 @@ class ScreenStackHeaderConfigViewManager :
) {
logNotAvailable("blurEffect")
}

override fun setHeaderLeftBarButtonItems(
view: ScreenStackHeaderConfig?,
value: ReadableArray?,
) {
logNotAvailable("headerLeftBarButtonItems")
}

override fun setHeaderRightBarButtonItems(
view: ScreenStackHeaderConfig?,
value: ReadableArray?,
) {
logNotAvailable("headerRightBarButtonItems")
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.swmansion.rnscreens

import android.util.Log
import com.facebook.react.bridge.JSApplicationIllegalArgumentException
import com.facebook.react.module.annotations.ReactModule
import com.facebook.react.uimanager.ReactStylesDiffMap
Expand Down Expand Up @@ -41,6 +42,14 @@ class ScreenStackHeaderSubviewManager :
}
}

@ReactProp(name = "hidesSharedBackground")
override fun setHidesSharedBackground(
view: ScreenStackHeaderSubview,
hidesSharedBackground: Boolean,
) {
Log.w("[RNScreens]", "hidesSharedBackground prop is not available on Android")
}

override fun updateState(
view: ScreenStackHeaderSubview,
props: ReactStylesDiffMap?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ColorPropConverter;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.BaseViewManager;
import com.facebook.react.uimanager.BaseViewManagerDelegate;
import com.facebook.react.uimanager.LayoutShadowNode;
Expand Down Expand Up @@ -108,6 +109,12 @@ public void setProperty(T view, String propName, @Nullable Object value) {
case "topInsetEnabled":
mViewManager.setTopInsetEnabled(view, value == null ? false : (boolean) value);
break;
case "headerLeftBarButtonItems":
mViewManager.setHeaderLeftBarButtonItems(view, (ReadableArray) value);
break;
case "headerRightBarButtonItems":
mViewManager.setHeaderRightBarButtonItems(view, (ReadableArray) value);
break;
default:
super.setProperty(view, propName, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableArray;


public interface RNSScreenStackHeaderConfigManagerInterface<T extends View> {
Expand Down Expand Up @@ -42,4 +43,6 @@ public interface RNSScreenStackHeaderConfigManagerInterface<T extends View> {
void setBackButtonInCustomView(T view, boolean value);
void setBlurEffect(T view, @Nullable String value);
void setTopInsetEnabled(T view, boolean value);
void setHeaderLeftBarButtonItems(T view, @Nullable ReadableArray value);
void setHeaderRightBarButtonItems(T view, @Nullable ReadableArray value);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public void setProperty(T view, String propName, @Nullable Object value) {
case "type":
mViewManager.setType(view, (String) value);
break;
case "hidesSharedBackground":
mViewManager.setHidesSharedBackground(view, value == null ? false : (boolean) value);
break;
default:
super.setProperty(view, propName, value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@

public interface RNSScreenStackHeaderSubviewManagerInterface<T extends View> {
void setType(T view, @Nullable String value);
void setHidesSharedBackground(T view, boolean value);
}
6 changes: 6 additions & 0 deletions apps/Example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Orientation from './src/screens/Orientation';
import SearchBar from './src/screens/SearchBar';
import Events from './src/screens/Events';
import Gestures from './src/screens/Gestures';
import BarButtonItems from './src/screens/BarButtonItems';

import { GestureDetectorProvider } from 'react-native-screens/gesture-handler';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
Expand Down Expand Up @@ -127,6 +128,11 @@ const SCREENS: Record<
component: Gestures,
type: 'playground',
},
BarButtonItems: {
title: 'Bar Button Items',
component: BarButtonItems,
type: 'playground',
},
};

if (isTestSectionEnabled()) {
Expand Down
Loading
Loading