auth: keep OTP code readable with larger text scales#9405
auth: keep OTP code readable with larger text scales#9405lnilluv wants to merge 1 commit intoente-io:mainfrom
Conversation
|
@lnilluv Thank you for the change. Can you please add before and after screenshots, that would help us understand this PR better. |
|
Not sure if we should just hide the next code in that scenario |
I agree I shouldn’t hide the next code if we can avoid it. |
929b87b to
acec917
Compare
acec917 to
fbeb610
Compare
|
Updated the PR with screenshots. I forced push to keep the history clean. The fix now properly targets only iOS. |
Updated PR desc
Summary
On iOS, accessibility text scaling can go up to ~3.1x, which makes the OTP card title enormous, truncates the account name, and leaves only one card visible on screen.
This fix wraps the card in a
MediaQueryoverride (iOS only) that clamps the text scaler to 2.0x — the same ceiling Android enforces. All text in the card scales proportionally up to that cap. Android is unaffected.code_widget.dart: clamp text scale to 2.0x on iOS; simplify_getBottomRowto a single layout pathcode_widget_layout_utils.dart: always show next TOTP on iOS regardless of scaletest/ui/code_widget_layout_test.dart: unit tests for the layout utilTest plan
flutter analyze lib/ui/code_widget.dart lib/ui/code_widget_layout_utils.dartflutter test test/ui/code_widget_layout_test.dartScreenshots
Android accessibility
iOS clipping issue max accessibility settings
iOS PR fix max accessibility settings