fix(ui): 平衡设置页分栏并稳定同步操作行 - #69
Open
liuweifeng wants to merge 3 commits into
Open
Conversation
设置页的展示相关模块与系统模块高度失衡,且同步状态文字变化会挤压按钮和自动同步控件。将模块按使用语义重新分栏,并固定同步操作行的布局宽度,避免设置状态切换时出现变形。 Co-authored-by: Codex <noreply@openai.com>
让设置页修复基于当前主线继续演进,保留已有同步操作行稳定性。 Co-authored-by: Codex <noreply@openai.com>
主线新增模块后,原来的两栏分配让显示卡片和菜单栏挤在左侧。将显示卡片改为全宽三列,重新安排下方区块,同时保留同步操作行的稳定性修复。 Co-authored-by: Codex <noreply@openai.com>
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.
背景
设置页原本按两栏组织内容,但每个区块的高度会随模块数量和开关状态变化。主线新增显示模块后,原来的分组让左栏明显高于右栏,右侧提前结束,页面下方留下较大的空白。
这个 PR 的演变
第一版:调整区块分组
最初的改动把设置页分成两栏:左侧放显示卡片、菜单栏和隐私设置,右侧放诊断、价格表、系统、久坐提醒和多设备同步。
当时这样安排是为了让设置内容更紧凑,同时处理同步状态文字变化时操作行被挤压的问题。
主线增加设置内容后
后续主线增加了更多显示模块,也扩充了菜单栏设置。显示卡片列表从原来的规模继续增长,菜单栏区块还加入了更多额度来源和说明文字。
原来的两栏分配因此失去平衡:显示卡片和菜单栏叠在左侧,左栏变得越来越长。问题不在某个单独区块,而在于一个会持续增长的列表被固定放进了半宽栏。
当前方案
这次保留同步操作行的稳定性修复,同时重新安排整体布局:
这样处理后,最容易增长的内容不再拉长某一侧。下方两栏仍然保留清晰的功能分组,也没有引入复杂的动态瀑布流布局。
具体改动
settingsContent的外层排布;settingsAgentsSection改为全宽三列网格;为什么不是直接撤回原分栏改动
直接撤回后,菜单栏和多设备同步区块会集中到另一侧,随着内容继续增加,左右高度差仍然可能出现,只是方向相反。
因此这次只调整区块的摆放方式,保留已经解决同步操作行问题的部分。
数据和行为影响
本次只调整设置页布局,不改变用量采集、数据同步、设置持久化或菜单栏状态计算。
三列布局使用现有的 SwiftUI
LazyVGrid,设置窗口宽度和其他卡片样式保持不变。验证
swift build -c debugpython3 -m unittest discover -s testsbash Tokei/Tests/run-sync-integration-checks.shgit diff --checkRelease 构建和本机安装验证已完成。