-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: two factor modal alignment on tablet #6840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
fix: two factor modal alignment on tablet #6840
Conversation
WalkthroughTwo-factor modal now reads device dimensions via react-native's useWindowDimensions and receives deviceHeight/deviceWidth props; container styles add alignItems: 'center'; Xcode project linker flag entries (OTHER_LDFLAGS) changed from a single string to a multi-value array in several build configurations. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
|
@deepak0x Could you please attach a screenshot of the app running on Android or iOS showing the 2FA modal? |
|
sure.... |
|
Can you please attach it in PR description |
|
sure |
|
I added it in pr description... |
4aca80c to
e20d043
Compare
- Remove style={styles.modal} prop from Modal component
- Centering is now handled by container styles with alignItems and justifyContent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
ios/RocketChatRN.xcodeproj/project.pbxproj (1)
3250-3253: Unrelated change: verify if this modification is intentional.This
OTHER_LDFLAGSformat change (from string to array) appears unrelated to the TwoFactor modal centering fix. Additionally, the array includes a meaningless single-space element" "that serves no purpose for linker flags.If this was an accidental change from Xcode reformatting the project file, consider reverting it to keep the PR focused on the modal fix. If intentional, the empty space element should be removed:
🔎 Suggested fix
OTHER_LDFLAGS = ( "$(inherited)", - " ", );Also applies to: 3317-3320
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
ios/Podfile.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
app/containers/TwoFactor/index.tsxios/RocketChatRN.xcodeproj/project.pbxproj
🚧 Files skipped from review as they are similar to previous changes (1)
- app/containers/TwoFactor/index.tsx
a5199ae to
47c7f43
Compare
|
I also noticed an extra width issue in the modal on mobile devices. When the props are removed, the modal width reverts to its normal size. I request that you verify this on a mobile device and update the PR description image accordingly. |
|
We have a dedicated pull request template, but this PR is not using it. Could you please update the PR description to use the following template? Link for the PR template: https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/develop/.github/PULL_REQUEST_TEMPLATE.md |
|
I fixed it |


Proposed changes
This update fixes the vertical alignment issue of the two-factor authentication modal on tablet devices.
Previously, the modal appeared closer to the top of the screen because the OS sometimes reported a smaller container height during split-screen or multitasking scenarios.
The fix ensures the modal remains properly centered on tablets while preserving existing behavior on phones.
Issue(s)
Closes #6839
How to test or reproduce
On phones, verify that there is no visual change compared to previous behavior.
Screenshots
Tablet (Before / After)
Phone (No UI Change)
Types of changes
Checklist