Repository navigation
fix(frontend): 修复 Android 日历与权限页自适应布局 - #390
Closed
Alexander-Noah wants to merge 5 commits into
Closed
Alexander-Noah wants to merge 5 commits into
Alexander-Noah wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
已审阅本 PR 固定范围 21841bc4cbf74b6a3e2df9bcc09d9504efebcd06...26db88001b2014fe5cbdfd7818fd22271e07da0d 的全部 8 个文件,重点核对了日历顶部安全区、悬浮语音栏预留空间、响应式日期/账号布局、权限列表与固定 footer 的尺寸约束,以及相关测试支持。当前没有达到可报告阈值的正确性、兼容性或可靠性问题。
git diff --check 通过;PR 现有 Frontend(lint、types、build)与 diff coverage 检查通过。当前工作区无法执行本地 Jest/TypeScript 命令,因为依赖入口不可执行/缺失。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Closes #389
问题与根因
Android 真机和模拟器测试确认了 4 个自适应布局问题:
这些问题的共同点是:系统安全区、悬浮控件和固定 footer 属于“视口边界”,原实现却把部分预留放在了“可滚动内容”中。
修改内容
1. 日历页面使用固定安全边界
contentInsetAdjustmentBehavior="never";iOS 保持现有automatic行为,避免重复顶部 inset。floatingVoiceViewportBottomInset,明确它描述的是视口预留。marginBottom为悬浮语音栏、底部安全区和间距保留固定空间;滚动内容内部仍只保留产品需要的 24 dp 尾部留白。2. 日期与账号区域按有效逻辑宽度自适应
新增纯函数
shouldStackScheduleHeader(width, fontScale):3. 权限页分离滚动列表和固定 footer
flex: 1,明确占据 footer 之外的剩余高度。max(spacing.lg, bottomInset + spacing.md),位于底部手势安全区上方。4. 回归测试与设计记录
AppRoot的测试提供零 inset mock,保持测试环境确定性。为什么采用这个方案
marginBottom缩小可视滚动区域,content padding 只延长内容。 前者可以从布局上阻止最后一项落到悬浮控件下面。非目标
验证
npm run typecheck:通过。npm run lint:0 error;1 个 warning 来自最新upstream/main的ReminderGuardCoordinator.test.ts,不在本 PR diff 中。npm test:git diff --check:通过。23113RKC6C(1440×3200、560 dpi):已手动检查默认字体和大字体布局,日期/账号响应式、安全区和固定控件边界符合预期。