Skip to content

Commit e1ca88b

Browse files
authored
Bottom bar fixes (#8263)
* Bottom bar fixes * Fix for transparancy in iOS 26 * yarn update * lodash: 4.18.1 * pure OSS
1 parent b782b6a commit e1ca88b

7 files changed

Lines changed: 44 additions & 92 deletions

File tree

.yarnrc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ enableGlobalCache: false
55
nmHoistingLimits: workspaces
66

77
npmMinimalAgeGate: 14d
8-
98
nodeLinker: node-modules
109

11-
npmRegistryServer: "https://npm.dev.wixpress.com"
10+
npmRegistryServer: "https://registry.npmjs.org"
1211

1312
yarnPath: .yarn/releases/yarn-4.12.0.cjs

ios/BottomTabsAppearancePresenter.mm

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ @implementation BottomTabsAppearancePresenter
88

99
- (void)applyBackgroundColor:(UIColor *)backgroundColor translucent:(BOOL)translucent {
1010
if (@available(iOS 26.0, *)) {
11-
[self setTabBarTransparentBackground];
12-
self.tabBar.backgroundColor = UIColor.clearColor;
11+
if (backgroundColor) {
12+
if (backgroundColor.isTransparent) {
13+
[self setTabBarTransparentBackground];
14+
} else {
15+
[self setTabBarBackgroundColor:backgroundColor];
16+
}
17+
} else {
18+
[self setTabBarDefaultBackground];
19+
}
1320
return;
1421
}
1522
if (translucent)
@@ -61,8 +68,9 @@ - (void)setTabBarTranslucent:(BOOL)translucent {
6168

6269
- (void)setTabBarDefaultBackground {
6370
if (@available(iOS 26.0, *)) {
64-
[self setTabBarTransparentBackground];
65-
self.tabBar.backgroundColor = UIColor.clearColor;
71+
UITabBarAppearance *appearance = [UITabBarAppearance new];
72+
[appearance configureWithDefaultBackground];
73+
[self applyTabBarAppearance:appearance];
6674
} else {
6775
[self setTabBarOpaqueBackground];
6876
}
@@ -95,7 +103,11 @@ - (void)setTabBarOpaqueBackground {
95103

96104
- (UITabBarAppearance *)appearanceWithColor:(UIColor *)color {
97105
UITabBarAppearance *appearance = [UITabBarAppearance new];
98-
[appearance configureWithOpaqueBackground];
106+
if (@available(iOS 26.0, *)) {
107+
[appearance configureWithTransparentBackground];
108+
} else {
109+
[appearance configureWithOpaqueBackground];
110+
}
99111
appearance.backgroundEffect = nil;
100112
appearance.shadowColor = nil;
101113
UIColor *resolvedColor = color ?: UIColor.systemBackgroundColor;

ios/RNNBottomTabsController.mm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,9 @@ - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
5151

5252
if (@available(iOS 26.0, *)) {
5353
UITabBarAppearance *appearance = [UITabBarAppearance new];
54-
[appearance configureWithTransparentBackground];
55-
appearance.backgroundEffect = nil;
56-
appearance.backgroundColor = UIColor.clearColor;
54+
[appearance configureWithDefaultBackground];
5755
self.tabBar.standardAppearance = appearance;
5856
self.tabBar.scrollEdgeAppearance = [appearance copy];
59-
self.tabBar.barTintColor = UIColor.clearColor;
6057
} else if (@available(iOS 13.0, *)) {
6158
UITabBarAppearance *appearance = [UITabBarAppearance new];
6259
[appearance configureWithOpaqueBackground];

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
},
8383
"dependencies": {
8484
"hoist-non-react-statics": "3.3.2",
85-
"lodash": "4.17.23",
85+
"lodash": "4.18.1",
8686
"prop-types": "15.x.x",
8787
"react-lifecycles-compat": "^3.0.4",
8888
"tslib": "1.9.3"
@@ -182,4 +182,4 @@
182182
]
183183
]
184184
}
185-
}
185+
}

playground/ios/NavigationTests/UIViewController+LayoutProtocolTest.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ - (void)testConstants_shouldReturnNavigationBarHeight_visible {
264264
childViewControllers:@[ stack, stack2 ]
265265
bottomTabsAttacher:nil];
266266

267-
XCTAssertEqual([bottomTabs getTopBarHeight], stack.navigationBar.frame.size.height);
267+
XCTAssertEqual([bottomTabs getTopBarHeight],
268+
stack.navigationBar.frame.origin.y + stack.navigationBar.frame.size.height);
268269
}
269270

270271
- (void)testConstants_shouldReturnNavigationBarHeight_invisible {

playground/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@babel/preset-env": "^7.25.3",
3434
"@babel/runtime": "^7.25.0",
3535
"@babel/types": "7.25.0",
36+
"@d11/react-native-fast-image": "^8.13.0",
3637
"@react-native-community/cli": "20.0.0",
3738
"@react-native-community/cli-platform-android": "20.0.0",
3839
"@react-native-community/cli-platform-ios": "20.0.0",
@@ -61,7 +62,6 @@
6162
"eslint-plugin-jest": "^28.11.0",
6263
"eslint-plugin-prettier": "3.1.4",
6364
"github-release-notes": "https://github.com/yogevbd/github-release-notes/tarball/e601b3dba72dcd6cba323c1286ea6dd0c0110b58",
64-
6565
"identity-obj-proxy": "3.0.0",
6666
"jest": "^29.6.3",
6767
"lint-staged": "10.2.11",
@@ -70,7 +70,6 @@
7070
"prettier": "2.8.8",
7171
"react": "19.2.3",
7272
"react-native": "0.84.0",
73-
"@d11/react-native-fast-image": "^8.13.0",
7473
"react-native-gesture-handler": "^2.29.1",
7574
"react-native-monorepo-config": "^0.3.0",
7675
"react-native-reanimated": "4.2.2",
@@ -85,7 +84,6 @@
8584
"typedoc": "0.x.x",
8685
"typescript": "^5.8.3"
8786
},
88-
8987
"lint-staged": {
9088
"*.{js,ts,tsx}": "eslint --fix",
9189
"*.{h,m,mm}": "node ./scripts/check-clang-format"

yarn.lock

Lines changed: 20 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,16 @@ __metadata:
16631663
languageName: node
16641664
linkType: hard
16651665

1666+
"@d11/react-native-fast-image@npm:^8.13.0":
1667+
version: 8.13.0
1668+
resolution: "@d11/react-native-fast-image@npm:8.13.0"
1669+
peerDependencies:
1670+
react: "*"
1671+
react-native: "*"
1672+
checksum: 10/bbd3ed3db96ca54c86173ae9a0de8c254448a5ff495d9b4a33fe491bee8ad03b655ed2d7d862996af8817ee5562c2031e7e2969880229cac133e84fd1c3e9f78
1673+
languageName: node
1674+
linkType: hard
1675+
16661676
"@dabh/diagnostics@npm:^2.0.8":
16671677
version: 2.0.8
16681678
resolution: "@dabh/diagnostics@npm:2.0.8"
@@ -5016,13 +5026,6 @@ __metadata:
50165026
languageName: node
50175027
linkType: hard
50185028

5019-
"compare-versions@npm:^3.6.0":
5020-
version: 3.6.0
5021-
resolution: "compare-versions@npm:3.6.0"
5022-
checksum: 10/7492a50cdaa2c27f5254eee7c4b38856e1c164991bab3d98d7fd067fe4b570d47123ecb92523b78338be86aa221668fd3868bfe8caa5587dc3ebbe1a03d52b5d
5023-
languageName: node
5024-
linkType: hard
5025-
50265029
"compressible@npm:~2.0.18":
50275030
version: 2.0.18
50285031
resolution: "compressible@npm:2.0.18"
@@ -6794,15 +6797,6 @@ __metadata:
67946797
languageName: node
67956798
linkType: hard
67966799

6797-
"find-versions@npm:^3.2.0":
6798-
version: 3.2.0
6799-
resolution: "find-versions@npm:3.2.0"
6800-
dependencies:
6801-
semver-regex: "npm:^2.0.0"
6802-
checksum: 10/f010e00f9dedd5b83206762d668b4b3b86bbb81f3c2d957e2559969b9eadb6124297c4a2a1d51c5efea3d79557b19660a2758c77bb6a5ba5ce7750fba9847082
6803-
languageName: node
6804-
linkType: hard
6805-
68066800
"flat-cache@npm:^3.0.4":
68076801
version: 3.2.0
68086802
resolution: "flat-cache@npm:3.2.0"
@@ -7733,27 +7727,6 @@ __metadata:
77337727
languageName: node
77347728
linkType: hard
77357729

7736-
"husky@npm:4.2.5":
7737-
version: 4.2.5
7738-
resolution: "husky@npm:4.2.5"
7739-
dependencies:
7740-
chalk: "npm:^4.0.0"
7741-
ci-info: "npm:^2.0.0"
7742-
compare-versions: "npm:^3.6.0"
7743-
cosmiconfig: "npm:^6.0.0"
7744-
find-versions: "npm:^3.2.0"
7745-
opencollective-postinstall: "npm:^2.0.2"
7746-
pkg-dir: "npm:^4.2.0"
7747-
please-upgrade-node: "npm:^3.2.0"
7748-
slash: "npm:^3.0.0"
7749-
which-pm-runs: "npm:^1.0.0"
7750-
bin:
7751-
husky-run: bin/run.js
7752-
husky-upgrade: lib/upgrader/bin.js
7753-
checksum: 10/57fb1723f5c6e28edffd79896a5b10a69b4c55f89ddfa1fe6354cf37cf2dab27d7159213d4fc90e9bef2ea10ea1ca60d2003985b77480b4fa719f29d0e89153f
7754-
languageName: node
7755-
linkType: hard
7756-
77577730
"iconv-lite@npm:^0.4.17, iconv-lite@npm:~0.4.24":
77587731
version: 0.4.24
77597732
resolution: "iconv-lite@npm:0.4.24"
@@ -9870,6 +9843,13 @@ __metadata:
98709843
languageName: node
98719844
linkType: hard
98729845

9846+
"lodash@npm:4.18.1":
9847+
version: 4.18.1
9848+
resolution: "lodash@npm:4.18.1"
9849+
checksum: 10/306fea53dfd39dad1f03d45ba654a2405aebd35797b673077f401edb7df2543623dc44b9effbb98f69b32152295fff725a4cec99c684098947430600c6af0c3f
9850+
languageName: node
9851+
linkType: hard
9852+
98739853
"log-symbols@npm:^2.1.0":
98749854
version: 2.2.0
98759855
resolution: "log-symbols@npm:2.2.0"
@@ -11430,15 +11410,6 @@ __metadata:
1143011410
languageName: node
1143111411
linkType: hard
1143211412

11433-
"opencollective-postinstall@npm:^2.0.2":
11434-
version: 2.0.3
11435-
resolution: "opencollective-postinstall@npm:2.0.3"
11436-
bin:
11437-
opencollective-postinstall: index.js
11438-
checksum: 10/69d63778087cd10c9d707d9ed360556780cfdd0cd6241ded0e26632f467f1d5a064f4a9aec19a30c187770c17adba034d988f7684b226f3a73e79f44e73fab0e
11439-
languageName: node
11440-
linkType: hard
11441-
1144211413
"opener@npm:^1.5.2":
1144311414
version: 1.5.2
1144411415
resolution: "opener@npm:1.5.2"
@@ -12278,16 +12249,6 @@ __metadata:
1227812249
languageName: node
1227912250
linkType: hard
1228012251

12281-
"react-native-fast-image@npm:^8.6.3":
12282-
version: 8.6.3
12283-
resolution: "react-native-fast-image@npm:8.6.3"
12284-
peerDependencies:
12285-
react: ^17 || ^18
12286-
react-native: ">=0.60.0"
12287-
checksum: 10/ed340c2b6c2e76658fa0a899a45132871017018bec0a03423b7456610810e79b2844dfa16063c05d98b89a7613eeb0de2fdf3ad978cdfa4d488a4e01228a7349
12288-
languageName: node
12289-
linkType: hard
12290-
1229112252
"react-native-gesture-handler@npm:^2.29.1":
1229212253
version: 2.30.0
1229312254
resolution: "react-native-gesture-handler@npm:2.30.0"
@@ -12332,6 +12293,7 @@ __metadata:
1233212293
"@babel/preset-env": "npm:^7.25.3"
1233312294
"@babel/runtime": "npm:^7.25.0"
1233412295
"@babel/types": "npm:7.25.0"
12296+
"@d11/react-native-fast-image": "npm:^8.13.0"
1233512297
"@react-native-community/cli": "npm:20.0.0"
1233612298
"@react-native-community/cli-platform-android": "npm:20.0.0"
1233712299
"@react-native-community/cli-platform-ios": "npm:20.0.0"
@@ -12361,7 +12323,6 @@ __metadata:
1236112323
eslint-plugin-prettier: "npm:3.1.4"
1236212324
github-release-notes: "https://github.com/yogevbd/github-release-notes/tarball/e601b3dba72dcd6cba323c1286ea6dd0c0110b58"
1236312325
hoist-non-react-statics: "npm:^3.3.2"
12364-
husky: "npm:4.2.5"
1236512326
identity-obj-proxy: "npm:3.0.0"
1236612327
jest: "npm:^29.6.3"
1236712328
lint-staged: "npm:10.2.11"
@@ -12373,7 +12334,6 @@ __metadata:
1237312334
react: "npm:19.2.3"
1237412335
react-lifecycles-compat: "npm:^3.0.4"
1237512336
react-native: "npm:0.84.0"
12376-
react-native-fast-image: "npm:^8.6.3"
1237712337
react-native-gesture-handler: "npm:^2.29.1"
1237812338
react-native-monorepo-config: "npm:^0.3.0"
1237912339
react-native-reanimated: "npm:4.2.2"
@@ -12405,6 +12365,7 @@ __metadata:
1240512365
"@babel/preset-env": "npm:^7.25.3"
1240612366
"@babel/runtime": "npm:^7.25.0"
1240712367
"@babel/types": "npm:7.25.0"
12368+
"@d11/react-native-fast-image": "npm:^8.13.0"
1240812369
"@react-native-community/cli": "npm:20.0.0"
1240912370
"@react-native-community/cli-platform-android": "npm:20.0.0"
1241012371
"@react-native-community/cli-platform-ios": "npm:20.0.0"
@@ -12435,11 +12396,10 @@ __metadata:
1243512396
eslint-plugin-prettier: "npm:3.1.4"
1243612397
github-release-notes: "https://github.com/yogevbd/github-release-notes/tarball/e601b3dba72dcd6cba323c1286ea6dd0c0110b58"
1243712398
hoist-non-react-statics: "npm:3.3.2"
12438-
husky: "npm:4.2.5"
1243912399
identity-obj-proxy: "npm:3.0.0"
1244012400
jest: "npm:^29.6.3"
1244112401
lint-staged: "npm:10.2.11"
12442-
lodash: "npm:4.17.23"
12402+
lodash: "npm:4.18.1"
1244312403
pixelmatch: "npm:^5.2.1"
1244412404
pngjs: "npm:^6.0.0"
1244512405
prettier: "npm:2.8.8"
@@ -12448,7 +12408,6 @@ __metadata:
1244812408
react-lifecycles-compat: "npm:^3.0.4"
1244912409
react-native: "npm:0.84.0"
1245012410
react-native-builder-bob: "npm:^0.40.13"
12451-
react-native-fast-image: "npm:^8.6.3"
1245212411
react-native-gesture-handler: "npm:^2.29.1"
1245312412
react-native-reanimated: "npm:4.2.2"
1245412413
react-native-worklets: "npm:0.7.4"
@@ -13307,13 +13266,6 @@ __metadata:
1330713266
languageName: node
1330813267
linkType: hard
1330913268

13310-
"semver-regex@npm:^2.0.0":
13311-
version: 2.0.0
13312-
resolution: "semver-regex@npm:2.0.0"
13313-
checksum: 10/da7d6f5ceae80e2097933b1e4ea2815c2cfa2c50c6501db1a3d435a6063c0f23d66bc25fe8d06755048f3d7588d85339db6471446b2c91fea907e5c2ada5b0df
13314-
languageName: node
13315-
linkType: hard
13316-
1331713269
"semver@npm:2 || 3 || 4 || 5, semver@npm:2.x || 3.x || 4 || 5, semver@npm:5.x.x, semver@npm:^2.3.0 || 3.x || 4 || 5, semver@npm:^5.0.3, semver@npm:^5.1.0, semver@npm:^5.4.1, semver@npm:^5.5.1, semver@npm:^5.6.0, semver@npm:^5.7.1":
1331813270
version: 5.7.2
1331913271
resolution: "semver@npm:5.7.2"
@@ -15100,13 +15052,6 @@ __metadata:
1510015052
languageName: node
1510115053
linkType: hard
1510215054

15103-
"which-pm-runs@npm:^1.0.0":
15104-
version: 1.1.0
15105-
resolution: "which-pm-runs@npm:1.1.0"
15106-
checksum: 10/39a56ee50886fb33ec710e3b36dc9fe3d0096cac44850d9ca0c6186c4cb824d6c8125f013e0562e7c94744e1e8e4a6ab695592cdb12555777c7a4368143d822c
15107-
languageName: node
15108-
linkType: hard
15109-
1511015055
"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.19":
1511115056
version: 1.1.20
1511215057
resolution: "which-typed-array@npm:1.1.20"

0 commit comments

Comments
 (0)