Skip to content

feat(ui): transactions summary bar — income/expense/net tied to tab & column filters (v1.19 B) - #56

Merged
argszero merged 1 commit into
mainfrom
feat/ui-ue-round4-tx-summary
Aug 17, 2026
Merged

argszero merged 1 commit into
mainfrom
feat/ui-ue-round4-tx-summary

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

UI/UE 4th-round deepening — item B: transactions summary bar (rant 2026-08-17T20:39:30, v1.19).

A compact inline summary bar (#tx-summary, .tx-summary) now sits at the top of the transactions card (above the table), showing 总收入 / 总支出 / 净变化 — positive + green (var(--ok)), negative - red (var(--danger-text)), zero rendered neutrally as 0. No new layout: three inline stat columns inside the existing card.

  • Tied to the tab filter (全部 / 消费 / 收益) — switches recompute instantly
  • Consistent with column filters: extracted the table's filter logic into a shared filterRows(rows, columns, filters) used by both buildDataTable and the summary, so the summary always reflects the same filtered set as the visible rows (unaffected by pagination)
  • Responsive: narrows gap/font on ≤560px, flex-wrap fallback

Docs: docs/user-stories.md v1.19 (item B) + ui/README.md「交易汇总条约定」. Verified by node --check, DOM-stub smoke test (12 assertions: all/consume/earn tabs, column-filter linkage, filter clear, pagination invariance), cargo test, cargo fmt --check.

Rant (verbatim)

Rant: UI/UE 第四轮多角度深化 — 状态保持、信息密度、原生控件美化、帮助可达性(宿主 2026-08-17 第四轮指示:继续从多角度美化 UI、优化 UE)

B. 交易记录汇总条

  • 交易页顶部加一行汇总(随 tab 过滤联动):总收入 / 总支出 / 净变化(+绿 −红),当前该页只有表格没有汇总
  • 用小 stat 组件或紧凑 inline 条,不引入新布局

Related

Tests

  • node --check ui/js/app.js
  • DOM-stub smoke test — 12/12 assertions pass
  • cargo test — 1 passed
  • cargo fmt --check

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