Skip to content

feat(ui): right-align numeric columns with mono font (v1.17 C) - #43

Merged
argszero merged 1 commit into
mainfrom
feat/ui-ue-deep-polish-2-numalign
Aug 17, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-ue-deep-polish-2-numalign

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Rant 2026-08-17T16:57:17 (UI/UE 多角度深化优化), item C — 表格数字列对齐与字体: numeric columns (价格/点数/已用/额度/余额) should be right-aligned with a monospace font for easy scanning; time/status columns stay left-aligned; amounts uniformly 2-decimal via D.fmt.

Changes

  • CSS: .table .num (right-align + --mono + font-variant-numeric: tabular-nums) and .table th.num for headers;
  • buildDataTable (data table renderer): new per-column align: "num" option → renders <th class="num"> / <td class="num"> (enabled for transactions 时间/Tokens 点数 columns);
  • Applied across all tables (td + th):
    • Market: 输入价 / 输出价 / 上下文
    • Sharing: 已用/额度 · 单价 · 收益
    • Members: 配额/已用 · 剩余
    • Departments: 成员数 · 月分配 · 已用 · 剩余
    • Operator users: 余额
    • Raise requests: 申请点数
  • D.fmt coverage check: all point amounts already go through D.fmt (integers → thousand separators; decimals → 2 places); verified no bare numeric cells remain;
  • Docs: docs/user-stories.md v1.17 changelog adds item C; ui/README.md 表格数字列约定 section.

Acceptance

Numeric columns right-aligned in monospace across all tables; time/status columns remain left-aligned.

Tests

  • node --check on app.js + data.js — syntax OK
  • DOM-stub smoke init — no ReferenceError
  • cargo test — 1 passed
  • cargo fmt --check — clean

@argszero
argszero merged commit 7a0c3bc into main Aug 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant