Add reusable table and pagination helpers
This commit is contained in:
parent
2ee403ddfb
commit
ad543d67b7
2 changed files with 421 additions and 16 deletions
|
@ -207,8 +207,8 @@ Overview
|
|||
- Use Bulma form/table/pagination patterns. Keep DOM small; paginate and debounce queries.
|
||||
|
||||
Shared Tasks
|
||||
- [ ] Add small table/list renderer util in `script.js` to build rows safely (uses `escapeHtml`).
|
||||
- [ ] Add shared pagination component (Prev/Next, page size select). Propagate `LIMIT/OFFSET`.
|
||||
- [x] Add small table/list renderer util in `script.js` to build rows safely (uses `escapeHtml`). Implemented via `createTableRenderer`.
|
||||
- [x] Add shared pagination component (Prev/Next, page size select). Propagate `LIMIT/OFFSET`. Implemented via `createPagination`.
|
||||
- [ ] Add common keyboard handlers: Enter to open selection; Esc to close overlays (already wired globally).
|
||||
- [ ] Add loading/empty-state helpers for lists.
|
||||
|
||||
|
@ -219,7 +219,7 @@ Primary Navigation (Hub)
|
|||
|
||||
Search (Existing)
|
||||
- [x] `tpl-search` (base): Input is focusable; shows results area.
|
||||
- [ ] Implement query execution with FTS join; debounce 250 ms; paginate results.
|
||||
- [x] Implement query execution with FTS join; debounce 250 ms; paginate results. Wired into the new table + pagination helpers.
|
||||
- SQL: `SELECT t.id, a.name AS artist, t.title, IFNULL(al.title,'') AS album, t.year, t.genre FROM fts_tracks f JOIN tracks t ON t.id=f.rowid JOIN artists a ON a.id=t.artist_id LEFT JOIN albums al ON al.id=t.album_id WHERE f MATCH ? ORDER BY rank LIMIT ? OFFSET ?`.
|
||||
- [ ] Column sorts (toggle rank vs artist,title,year).
|
||||
- [ ] Row activation opens Track overlay.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue