feat(iOS): add axis behavior to v5 header items - #4692
juliusmarminge wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughAdds iOS stack header axis behavior types and native handling for ChangesiOS stack header axis behavior
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Scenario
participant StackHeaderItemIOSNativeComponent
participant RNSStackHeaderItemComponentView
participant RNSStackHeaderContentFactory
participant UIKit
Scenario->>StackHeaderItemIOSNativeComponent: Set axisBehavior
StackHeaderItemIOSNativeComponent->>RNSStackHeaderItemComponentView: Pass axisBehavior
RNSStackHeaderItemComponentView->>RNSStackHeaderContentFactory: Provide mapped behavior
RNSStackHeaderContentFactory->>UIKit: Apply UIBarButtonItemAxisBehavior
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 10 files. (3 skipped: 3 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeRabbit completed against All seven Actions workflows still await fork approval with |
Description
Proposes optional
axisBehavioron v5 iOS leading/trailing native and custom header items, matchingUIBarButtonItem.axisBehavior:automatic,horizontalOnly, andverticalPreferred. In a layout with horizontal and vertical bars, an app can keep an item horizontal or prefer vertical placement without detecting a device or controlling the bar layout.API discussion: #4687.
Changes
automatic.automatic.UIBarButtonItemcreation. Existing identifiers, shared backgrounds, and menu state mechanisms are retained.SDK evidence is limited to installed Xcode 27.1 build 27A9269. Its UIKit headers declare the enum/property at iOS 27.1, the two explicit cases unavailable on tvOS/visionOS, and
automaticas the default. Apple's bar placement presentation demonstrates the preferences. Apple'saxisBehaviorAPI documentation page currently returns an error; this proposal does not assert availability or stability beyond the installed SDK evidence.Adapted from Julius Marminge's frozen v5 patch delta onto current
ios/stack/headersources. This independent PR only covers axis behavior.Before & after - visual documentation
Actual base native revision
7db05401d0d25f37143d875488c7a5a1b1720248and head84743ae02302b7ad02513a429262e30d1024dd6b, using the same added scenario, viewport, initial values, and isolated test-app setup. The base ignores the new options and reports native axes0/0; the head reports1/2. The sun moves from the vertical bar to the horizontal bar, and the custom A moves into the vertical bar. Captures are unaltered; simulator clock time differs.Test plan
Complete FabricExample scenario:
apps/src/tests/single-feature-tests/stack-v5/test-stack-header-axis-behavior-ios/, registered in the existing scenario list.automatic.Local checks:
Verification receipts: summary, iOS 27.1 native navigation-item assertions, iOS 18.6 UI assertions.
React Navigation companion and remaining gates
React Navigation main has no v5 adapter. A prepared companion patch adds the option to button/menu/custom types and forwards it in the new adapter from adoption draft #13115, against revision
7b32fd92d335faf0ed3437032ccadff4a17e41c7. It passesgit apply --checkagainst that exact draft; full downstream typechecks and review have not run. Downstream v5 adoption/review and maintainer API/SDK acceptance remain integration gates. No companion PR against main is claimed.All seven GitHub Actions workflows currently conclude
action_requiredand await maintainer approval for the fork. No CI pass is claimed. CodeRabbit completed with no actionable comments. Its native-method docstring coverage warning was reviewed; the public option documents the values, default, reset, and platform support. No merge is requested.Checklist