feat(settings): 侧边卡片设置页 UI/UX 现代化——卡片底部设置条替代隐形齿轮 - #300
Merged
Conversation
- 二级设置入口:卡片右下 16px 幽灵齿轮(tertiary 色、像素钉位)改为 卡片底缘全宽设置条(hairline 分隔 + 齿轮图标 + 「功能设置」文字 标签),常态可发现;hover 换品牌淡底 + brand 字色引导。可见性条件 与 aria-label 契约不变(仅父级启用且声明 settings) - 常规行齿轮升级为带 border-l2 边框的 22px 芯片按钮,hover 同样 accent 引导 - 启用卡片:品牌描边柔化为 color-mix(45%),勾选徽标改用 state-success-primary(绿=已开启确认,brand=激活强调的协调双色) - 节奏:section gap 16 / group padding 20 / 网格 minmax(180px) gap 12; 计数徽章改为 accent-soft 淡底 pill;开关关态 thumb 降档 + track 底 layer-2 - 动效纪律:全部过渡 ≤160ms 且仅颜色属性;prefers-reduced-motion 扩展覆盖设置条/行齿轮/弹窗行 - 清理:合并 .pluginEntries 重复定义;文档同步(AGENTS.md §5 + 设计文档新增 §9 偏差记录)
- 勾选徽标 → 紧凑品牌开关滑块(30×16 track + 10px thumb,开=品牌填充 反色拇指,关=中性且不渲染;纯视觉指示,卡片本身仍是 aria-pressed 开关,语义契约不变) - 二级弹窗长列表:popupRows 内部滚动 max-height min(52vh,440px) + 细滚动条(--dsw-alias-scrollbar-* 令牌),终端 6 行场景弹窗壳体与 Done 固定、仅行区滚动;行密度收紧(padding 12/14、gap 8) - 卡片等高:.card min-height 106px + .cardMain flex:1 + .cardTop min-height 28px——带设置条/不带设置条/无图标卡片全部等高 - prefers-reduced-motion 覆盖 cardSwitch 过渡;文档同步(AGENTS.md §5 + 设计文档 §9 迭代记录)
popupRows 的 width:100% 配 content-box 会在 padding-right:4px 时把 内容盒撑宽 4px,overflow-y:auto 隐式启用的 overflow-x 因此出现横向 滚动条;改为 border-box 并显式 overflow-x:hidden(minifier 输出 overflow:hidden auto),行区始终填满弹窗宽度、无左右滑动。add-plugin 弹窗的 pluginEntries 同步加 overflow-x:hidden。
Merged
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.
动机
设置页「侧边卡片」分区的二级设置入口(卡片右下角 16×16px 三级色透明齿轮,
absolute; top:46px像素钉位)可发现性不足;整体视觉做一次克制现代化,配色采用协调双色(brand = 激活强调,success 绿 = 已开启确认),全部颜色仍为--dsw-alias-*令牌派生、零硬编码 hex,皮肤体系自动跟随。改动
二级设置入口(核心)
.cardSettings:全宽、hairline 分隔、齿轮图标 12px + 「功能设置」文字标签(11px/500),常态以 secondary 墨色可读;hover 换interactive-bg-hover-accent品牌淡底 + brand 字色(0.12s 颜色过渡).cardGear幽灵按钮与.cardWithGearpadding hack(消除 top:46px 像素耦合).rowGear升级为 22×22 带border-l2边框的芯片按钮,hover 同样 accent 引导"${title} ${t('settingsPopup')}"、可见性条件(仅父级启用且声明 settings)、Modal 条件挂载 SSR 契约全部保留协调双色启用态
color-mix(button-primary-fill 45%)(沿用 icon-chip 既有 color-mix 先例)--dsw-alias-state-success-primary实心绿(语义:已开启 ✓)节奏与细节
minmax(180px,1fr)gap 12accent-soft淡底 pill(versionBadgeTag 同款令牌配方)动效纪律(设置页不需要浮夸动效)
prefers-reduced-motion扩展覆盖.cardSettings/.rowGear/.popupRow清理与文档
.pluginEntries重复定义(保留带 max-height/overflow 的一处)AGENTS.md§5 与设计文档(新增 §9 偏差记录)同步验证
pnpm test:74 文件 / 751 通过(含 side-card-section 全组 31 条,aria-label 契约未破坏)pnpm typecheck/pnpm builddsh web→ Playwright 截图核对(浅色/深色 × 设置页/二级弹窗):设置条常态可见、弹窗从设置条正常打开、深浅双色层级一致不动的部分
弹窗结构(popupRow/Modal)、添加插件弹窗、持久化/乐观更新逻辑、
settings.render/pluginTogglesseam、所有 data 属性与 ARIA 模式、.popupDialog.popupDialog特异性 hack迭代 2(按用户反馈)
验证:全量 751 测试通过 + typecheck/build 绿;scratch profile 实机截图核对(浅色/深色 × 卡片开关/终端长弹窗/等高)。
迭代 2(按用户反馈)
验证:全量 751 测试通过 + typecheck/build 绿;scratch profile 实机截图核对(浅色/深色 × 卡片开关/终端长弹窗/等高)。