Repository navigation
[ONE-67] 页面级视觉重构 — 19 个页面落地设计契约 (ONE-70) - #140
Merged
Merged
Conversation
- 起手契约修订(Mike 授权):亮色 n-500 4.39:1 → 5.17:1 达标 AA, 同步 muted-foreground / due-far,design-system.md 附录 A 记录 - 新增共享件:DueRing/DueCount(倒计时环形进度 + display 级 tabular 数字,due-* 紧迫梯度)、Skeleton/EmptyState/ErrorState(三态)、 AuthShell/FormError(auth 居中卡 + 错误 200ms 滑入) - dashboard:最近到期主视觉(环形 + display-lg 倒计时)、统计卡 数字 display 化、账本式分录行、同形态骨架、空态/错误态 - items 列表:状态徽章与倒计时全部接 due-*/success/warning 语义 token,桌面行倒计时环形 + tabular 日期,移动卡主行大数字 + 操作收进溢出菜单(可见 ≤2),空态排版化 - items new/detail:表单分区(基本/周期到期/提醒渠道),详情页 头部实时到期预览环 + display 倒计时,支付/续期表 tabular - channels:渠道卡标题 text-title + 启用状态语义徽章 - history:成功/失败徽章语义化、骨架同形态、排版空态、详情弹层 shadow-4 - me:账本头(头像 + 邮箱 + 本月到期 display 数字) - settings/admin×5:骨架全部改同形态,success/warning/destructive token 替换硬编码绿黄红,表格表头 caption 化 - about:分录式定义列表;setup/auth×5:AuthShell 400px 卡 + shadow-2 + display logo 区 + 错误滑入 - i18n:新增 common.retry/more、dashboard/items/history/me/detail 等键(中英同步)
…omptDialog 焦点陷阱 (ONE-69) - docs/design-system.md:4 处 #60606b → #666670(与冻结 HSL 240 4.9% 42% 等值,实测 on muted 5.16:1 / on 白 6.10:1 达标),代码侧 index.css 不动(Mike 裁决) - PasswordPromptDialog:接入既有 useFocusTrap(Tab/Shift+Tab 循环 + Escape 关闭 + 关闭后焦点还原);ConfirmDialog 重复声明清理 - nit:ThemeProvider meta theme-color 收敛为 META_THEME_COLOR 常量(注释标明与 index.css token 对应);DueRing aria-label 本地化(新增 common.daysLeftShort / common.overdueBy 双语 key)
… 规则在 biome.json 中为 off)
blocking·数据源(后端 7 天窗口字段曾被当 30 天/已逾期/本月展示): - dashboard: 「30 天内到期」→「7 天内到期」; 恒为 0 的「已逾期」卡 (upcoming_renewals 不含逾期)替换为真实「活跃条目」 - me: 「本月到期」改用 expiring_soon 直读并改文案「7 天内到期」 - 按族全量排查:全站 expiring_soon/upcoming_*/时间衍生计算共 14 处, 逐一核对语义(清单见交付评论);localToday/daysUntil 收敛到 lib/utils 单点 should-fix: - 魔法色清零:ItemList text-green-500→text-success、ItemDetail bg-gray-300→bg-input、Settings amber×2→warning token、 AdminUsers purple 角色徽章→bg-info/10 text-info - 键盘可达性:抽公共 useFocusTrap(焦点陷阱/初始焦点/Esc/焦点归还), 接入 history 详情浮层、AdminUsers 编辑浮层、ConfirmDialog (PasswordPromptDialog 已在 0acd352 接入,本次修其声明顺序 bug) 设计契约 §5 结构: - items/new: 桌面双栏(左表单右 sticky 到期预览卡 DueRing+DueCount) + 移动端三分区手风琴 - items/:id: 头部内联预览改为右栏摘要卡(环形+倒计时+到期日/周期/ 金额分录行) - history: 按日分组 + sticky 组标题(桌面表格 rowgroup/移动端 sticky 标题) - setup: DueRing 环形语言步骤指示器(初始化→完成)
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.
范围(ONE-67 父单 / Stage 3)
把 Stage 1 设计契约(
docs/design-system.md「时间账本 Ledger of Time」)应用到web/src/pages/全部 19 个页面,落地 typography / whitespace / visual_hierarchy / color / originality 五维度。Base 为 Stage 2 返工版154ffd2(PR #139 分支头)。起手:契约修订(Mike 授权)
muted-foreground on muted(n-500 on n-100)实测 4.39:1,不达 AA 正文 4.5:1(差 0.11)。n-500240 3.8% 46.1%(#71717a) →240 4.9% 42%(#60606b),同步--muted-foreground、--due-far(仅这三处引用)。docs/design-system.md附录 A-1。逐页清单(层级 / 留白 / 排印 / 配色)
DueRing+text-display-lgtabular 倒计时,约 :274-300),统计数字text-2xl font-bold→text-display-lg/text-display;留白:页面区块space-y-8→space-y-12,卡片p-4 md:p-6;排印:面板标题 caption 大写字距,分录行右对齐 tabular 金额;配色:trend 红绿硬编码 → destructive/success,逾期/将到期统计卡接 warning/danger tone;三态:同形态骨架(StatSkeleton/HeroSkeleton)、ErrorState带重试、EmptyState全空空态DueCount大数字」,可见操作 ≤2(编辑 + 溢出菜单,其余收进菜单);排印:表头 caption 化、到期日 tabular;配色:STATUS_STYLES与DaysBadge的绿/黄/红/灰硬编码 → success/warning/destructive/muted 与dueTierBadgeClass(due-* 梯度);新增DueMark(环形微进度 + tabular 天数,:80-104);三态:行形态骨架、错误态可重试、空态排版化 + CTAtext-title分区头,space-y-8区块距);配色:开关 bg-gray-300 → bg-input;错误横幅 →ErrorStatetext-title卡标题 + 新增启用/停用语义徽章(success/muted);配色:开关灰 → bg-input,反馈徽章 success/destructive;卡容器 shadow-1text-green-600 bg-green-50→text-success bg-success/10(明暗两态成立);排印:表头 caption、时间列 tabular、渠道徽章 text-caption rounded-xs;三态:行形态骨架、EmptyState、ErrorState可重试;弹层 shadow-lg → shadow-4text-displaytabular 主数字(primary 色,:78-92)animate-pulse灰块 → 与内容同形态骨架(账户/会话/API Keys);层级:tab 栏 text-body-sm;配色:全部text-green-600/bg-green-50→ success tokentext-heading统一,tab 项 text-body-smtext-displaytabular;三态:表格行形态骨架;配色:角色/状态徽章绿红黄灰硬编码 → success/destructive/warning/muted,激活图标绿 → successbg-gray-300 dark:bg-gray-600→bg-input(暗色下语义成立)AuthShell(400px 卡、shadow-2、display 级 logo 区,去掉渐变背景改 muted/40);输入错误 →FormError(danger 边框 + 200ms 滑入,keyframes 在 index.css);loading 文案宽度保持(auth.loading)原创性主张落地位置清单(「时间账本」≥8 处)
DueRing剩余进度环 +text-display-lg倒计时数字 —— 呼应 §3.1「倒计时是第一公民」(大数字 + 进度环)。质量门
pnpm build(web)✅ /pnpm typecheck(web)✅ /biome lint .exit 0 ✅(2 warnings 均为 main 遗留:biome.json schema 版本提示 + worker 1 处未用 import,与本 PR 无关)截图
页面明暗两态截图随 issue 交付评论附上(本地 dev 实例走查)。