Repository navigation
Conversation
- 弹窗:原生 <dialog> / confirm / prompt 换成统一 modal 控制器 (焦点入窗与 Tab 圈定、Esc 与遮罩关闭、关闭后焦点归还) - 下拉:原生 <select> 换成 .ui-select listbox;原生 select 仍作为取值与 onchange 的唯一来源,动态生成的 select 由 MutationObserver 自动接管 - 样式:新增 DESIGN.md 契约与统一层(系统字族、三档圆角、平层无投影、 文字对比度 ≥4.5:1、去全大写眉标/渐变按钮/彩色辉光/抬升动效) - 布局:页头标题与页签同排、账号页吸附栏贴住页头、侧栏间距放宽、 hero 脉搏线让位右侧卡片、表格数据行顶对齐 - 稳定性:uiSetHTML 差异更新,5s/15s 轮询不再重建未变化的 DOM (账号表、最近请求、KPI 卡片、分页按钮),轮询期间无抖动 - i18n:en 包同步(5 个键随文案修正重命名 + 新文案翻译) - 测试:3 处实现细节断言改为等价语义 (图标→文字标签、confirm→uiConfirm、box.innerHTML→uiSetHTML)
zldesky
force-pushed
the
feat/dashboard-ui-unify
branch
from
November 10, 2026 10:11
8582c13 to
13b3bbc
Compare
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.
目的
按新增的
DESIGN.md契约收敛面板视觉与交互:统一弹窗/下拉组件,修复选中态文字不可读、吸附栏与页头之间多出的 4px 缝隙、轮询刷新导致的抖动等问题。
改动
<dialog>/confirm/prompt统一到.modal-mask/.modal控制器(焦点入窗、Tab 圈定、Esc 与遮罩关闭、关闭后焦点归还);原生
<select>由.ui-selectlistbox 接管(原生元素仍是取值与
onchange的唯一来源)。DESIGN.md契约与#ui-unified统一层——系统字族、三档圆角(控件 6 / 面 10–12 / 浮层 14)、平层无投影、文字对比度 ≥4.5:1、
去全大写眉标 / 渐变按钮 / 彩色辉光 / 抬升动效。
hero 脉搏线让位右侧卡片、表格数据行顶对齐。
uiSetHTML()差异更新,5s/15s 轮询不再重建未变化的 DOM(账号表、最近请求、KPI 卡片、分页按钮),实测轮询期间 DOM 变更为 0。
测试改动(请评审确认)
这三处断言原本锁的是实现细节,本次重构有意改变,已改为等价语义:
tests/_test_accounts_page.py:「入口带人物图标」→「入口是文字标签」tests/_test_update_oneclick.py:confirm(→uiConfirm((语义仍是更新前二次确认)tests/_test_issue111_account_sort.js:表头锚点box.innerHTML =→uiSetHTML(box,验证
node tests/*.js全绿;30 个引用dashboard.html的 Python 套件全绿;_test_i18n_packs.py21/21。风险
select.value/onchange语义保持不变。