mirror of
https://github.com/svm0n/datadeck.git
synced 2026-07-22 08:31:46 +00:00
No description
The per-column Role dropdown only ever showed an explicit fileCfg override — a column literally named 'Status' (or Category/Notes/Image/ Anki-front by their own name lists) already drives getStatusCol() etc. at render time by name, but the modal showed '— no special role —' for it with nothing to indicate that. This was the exact confusion behind a user question: 'what corresponds to the checkmark in the file?' — the Status role does, but for a conventionally-named column there was no visual confirmation it was already active. - Extracted the Category/Status/Notes column name-alias lists (already duplicated between main.ts and inline-view.ts) into shared constants in src/utils.ts, and split ankiFrontCol's fallback chain out into an exported autoAnkiFrontCol() in src/view/anki.ts. Both were already pure name/position lookups; this just makes them independently callable without an explicit override applied. - FileConfigModal now takes an AutoDetectedRoles snapshot (computed once in toolbar.ts's openColumns(), the same lists/functions the views themselves use) and roleOf() shows the resolved role plus an 'auto (by name)' badge whenever nothing is explicitly configured for that slot — exactly mirroring the fact that explicit overrides always win outright over name detection at runtime (never blended). Tests: two new FileConfigModal cases — a name-matched column shows its role with the auto badge and no saved config, and an explicit override on a different column suppresses the badge everywhere for that role, matching what getStatusCol()/etc. actually resolve. Co-authored-by: SVM0N <SVM0N@users.noreply.github.com> |
||
|---|---|---|
| src | ||
| test-support | ||
| bench-load.mjs | ||
| esbuild.config.mjs | ||
| main.js | ||
| main.ts | ||
| styles.css | ||
| test-csv-parser.mjs | ||
| test-plugin-logic.mjs | ||
| test-view-smoke.mjs | ||
| world-map.svg | ||