feat: reopen the Add Book page on the last lookup tab picked #84

Merged
jfro merged 1 commit from fix/remember-add-book-tab into main 2026-10-25 22:00:24 +00:00
Owner

Closes #76

What changed

  • The Add Book lookup tabs (data-remember-tab="add-book-lookup") reopen on the last tab picked, stored in localStorage. Adding a run of books by title stays on Title Search, including when the page re-renders after each lookup.
  • New assets/js/remember_tab.js, generic for any daisyUI radio-tab group. Restoring fires the tab's change event, so the Physical Scanner tab still focuses its input. If storage is blocked (some private modes) the page just starts on Scan Barcode as before.

Tested

  • New controller test: the tablist carries data-remember-tab and every tab has its unique id.
  • Browser check (Chromium, 1280×800 and 390×844): fresh visit starts on Scan; pick Title → leave → come back opens Title with its form; pick Physical Scanner → reload opens it with the input focused; no JS errors.
  • mix precommit passes.
Closes #76 **What changed** - The Add Book lookup tabs (`data-remember-tab="add-book-lookup"`) reopen on the last tab picked, stored in localStorage. Adding a run of books by title stays on Title Search, including when the page re-renders after each lookup. - New `assets/js/remember_tab.js`, generic for any daisyUI radio-tab group. Restoring fires the tab's `change` event, so the Physical Scanner tab still focuses its input. If storage is blocked (some private modes) the page just starts on Scan Barcode as before. **Tested** - New controller test: the tablist carries `data-remember-tab` and every tab has its unique id. - Browser check (Chromium, 1280×800 and 390×844): fresh visit starts on Scan; pick Title → leave → come back opens Title with its form; pick Physical Scanner → reload opens it with the input focused; no JS errors. - `mix precommit` passes.
jfro added this to the v0.9.0 milestone 2026-10-25 20:57:45 +00:00
feat: reopen the Add Book page on the last lookup tab picked
All checks were successful
CI / test (pull_request) Successful in 48s
341e4b44ff
The lookup tabs remember the last one chosen (localStorage), so adding a
run of books by title stays on Title Search, including after each lookup.

Closes #76
jfro force-pushed fix/remember-add-book-tab from 341e4b44ff
All checks were successful
CI / test (pull_request) Successful in 48s
to 912f1380d6
All checks were successful
CI / test (pull_request) Successful in 47s
2026-10-25 21:57:57 +00:00
Compare
jfro merged commit f271b09b6a into main 2026-10-25 22:00:24 +00:00
jfro deleted branch fix/remember-add-book-tab 2026-10-25 22:00:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/fuzzy_catalog!84
No description provided.