Repository navigation
docs(user-stories): name the table that has the table capabilities - #424
Merged
Merged
Conversation
"数据表格支持列筛选、排序、分页、键盘导航与 CSV 导出" reads as a claim
about every data table, but four of those five belong to one table:
- `buildDataTable()` — which owns header sorting, column filters and the
pager — has exactly one call site (`ui/js/app.js:1944`), the transaction
table. The other six tables (`mk-body`, `share-body`, `api-keys`,
`emp-body`, `dept-body`, `model-body`, `ops-body`) get a static header
and row rendering only; they have a search box and nothing else.
- CSV has exactly one writer (`exportTxCsv`, one `new Blob` in the repo)
and one button (`#tx-export-btn`), and `ui/README.md:291` already titles
that section "交易记录导出 CSV 约定".
Keyboard navigation is the exception and is genuinely table-generic:
`kbdTbodyOf(e.target)` resolves `closest("tbody")` with no roster, so
↑/↓, Enter and Esc work on any data table (`ui/README.md:317` lists them
all). Keeping it inside the narrowed sentence would have swapped one
misleading claim for another, so it moves to its own clause.
Narrow the subject; leave the capabilities alone. No gate covers
`docs/user-stories.md`.
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.
Summary
docs/user-stories.md§4 (UI 约定) said:Four of those five capabilities belong to one table, so the sentence promises them of all seven. A reader planning to export the member list or the usage report follows it to the admin page and finds no button — the claim is actionable and wrong, not merely loose.
buildDataTable()owns all three, and it has exactly one call site:ui/js/app.js:1944exportTxCsv), onenew Blobin the whole UI, one button (#tx-export-btn)kbdTbodyOf(e.target)resolvesclosest("tbody")with no roster;ui/README.md:317enumerates all seven tbodies plus the JS-built oneThe other six tables (
mk-body,share-body,api-keys,emp-body,dept-body,model-body,ops-body) render a static header and rows, with a search box and nothing else.ui/README.md:291already titles its own section "交易记录导出 CSV 约定" — the repository knew the scope; this line was the one place that forgot it.Related Issue
None — no issue was open for this.
Changes
docs/user-stories.md: narrow the subject from 数据表格 to 交易记录表, and give keyboard navigation its own clause because it really is table-generic. Capabilities are kept, not restated differently; no numbers added (this file is not under any gate, and a copied count would only go stale).Before / after:
Measured on what the project ships, not only on
main:git show v0.7.33:docs/user-stories.mdcontains the unchanged line, andgit merge-base --is-ancestor c954907 v0.7.33says the current head is not in that release — the claim is live in the released artifact.Tests
cargo test— 579 passed, 0 failedcargo fmt --check— cleancargo clippy --all-targets— no warningsdocs/user-stories.mdis outside every gate'sFILES—deploy_gatecovers compose/config/Dockerfile/both READMEs,readme_gatecovers the two READMEs)Checklist
docs/)