feat: implement iOS 26 minimize behavior#367
Conversation
🦋 Changeset detectedLatest commit: b0a2120 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new minimizeBehavior prop to enable native iOS 26+ tab bar minimization behaviors.
- Introduces
minimizeBehaviorin TS and bridges it through the native layer - Implements SwiftUI integration using the new
tabBarMinimizeBehaviormodifier - Updates documentation, example app, and changelog
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/react-native-bottom-tabs/src/TabViewNativeComponent.ts | Add generic minimizeBehavior?: string prop |
| packages/react-native-bottom-tabs/src/TabView.tsx | Define minimizeBehavior as a literal union in TS |
| packages/react-native-bottom-tabs/ios/TabViewProvider.swift | Expose minimizeBehavior to Objective-C |
| packages/react-native-bottom-tabs/ios/TabViewProps.swift | Add MinimizeBehavior enum and prop to Swift props |
| packages/react-native-bottom-tabs/ios/TabViewImpl.swift | Apply .tabBarMinimizeBehavior modifier in SwiftUI |
| packages/react-native-bottom-tabs/ios/RCTTabViewViewManager.mm | Export minimizeBehavior to React Native |
| packages/react-native-bottom-tabs/ios/Fabric/RCTTabViewComponentView.mm | Handle prop updates for minimizeBehavior |
| docs/docs/docs/guides/usage-with-react-navigation.mdx | Document minimizeBehavior prop |
| docs/docs/docs/guides/standalone-usage.md | Add minimizeBehavior to standalone usage guide |
| apps/example/src/Examples/SFSymbols.tsx | Include minimizeBehavior example in demo app |
| .changeset/ready-paths-train.md | Add changeset entry for the feature |
Comments suppressed due to low confidence (2)
packages/react-native-bottom-tabs/src/TabViewNativeComponent.ts:55
- The prop
minimizeBehavioris currently typed as a generic string, which permits invalid values. Consider using a union type ('automatic' | 'onScrollDown' | 'onScrollUp' | 'never') to enforce valid options and improve type safety.
minimizeBehavior?: string;
packages/react-native-bottom-tabs/ios/TabViewImpl.swift:31
- The new
minimizeBehaviorintegration lacks corresponding tests. Adding unit or snapshot tests for iOS 26+ would help ensure the UI behaves as expected when different values are passed.
.tabBarMinimizeBehavior(props.minimizeBehavior)
|
|
||
| #### `minimizeBehavior` <Badge text="iOS 26+" type="info" /> | ||
|
|
||
| Controls how the tab bar behaves when content is scrolled. |
There was a problem hiding this comment.
[nitpick] The documentation for minimizeBehavior is duplicated across multiple guides. Consider extracting this into a shared snippet or component to reduce duplication and keep docs in sync.
4d8af70 to
b0a2120
Compare
PR Description
CleanShot.2025-06-17.at.20.11.19.mp4