fix(iOS): icon inside header button is not center aligned on iOS 26#7105
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2026-03-10T15:21:45.098ZApplied to files:
🔇 Additional comments (4)
WalkthroughCentralized header button margin logic in one component: added platform/version-aware Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/containers/Header/components/HeaderButton/HeaderButtonContainer.tsx`:
- Around line 17-18: The conditional that gates the iOS icon-alignment fix in
HeaderButtonContainer currently uses "Platform.Version > 26" which excludes iOS
26; update the condition in the HeaderButtonContainer where isIOS and
Platform.Version are checked (e.g., the function/logic that computes the icon
margin or "margin" return) to include iOS 26 by using a >= check on
Number(Platform.Version) (i.e., treat versions 26 and above the same) so iOS 26
users receive the fix; ensure the comparison still coerces Platform.Version to a
number as currently done.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dedcca4d-d613-4252-8f57-3d6f2953498c
📒 Files selected for processing (1)
app/containers/Header/components/HeaderButton/HeaderButtonContainer.tsx
📜 Review details
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: OtavioStasiak
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6499
File: app/containers/ServerItem/index.tsx:34-36
Timestamp: 2025-12-17T15:56:22.578Z
Learning: In the Rocket.Chat React Native codebase, for radio button components on iOS, include the selection state ("Selected"/"Unselected") in the accessibilityLabel instead of using accessibilityState={{ checked: hasCheck }}, because iOS VoiceOver has known issues with accessibilityRole="radio" + accessibilityState that prevent correct state announcement.
📚 Learning: 2026-03-10T15:21:45.098Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.
Applied to files:
app/containers/Header/components/HeaderButton/HeaderButtonContainer.tsx
🔇 Additional comments (2)
app/containers/Header/components/HeaderButton/HeaderButtonContainer.tsx (2)
2-4: LGTM!The imports are correctly extended to include
Platformfor version detection andisIOSfor platform identification.
23-37: LGTM!The centralized
getMargin()approach is cleaner than inline conditionals, and the module-level computation is appropriate since platform and version values are static during runtime.
Proposed changes
In #6875, WE added support for glass design in iOS 26 and Icon inside header button is not center aligned and moved to left because of left margin.
Issue(s)
https://rocketchat.atlassian.net/browse/CORE-2065
How to test or reproduce
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit