The timeline browser searches in place, with better cards
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
The dashboard's and profiles' lists no longer load the page to search, sort, filter by tag or turn a page. Each list (timeline-browser.jsx) takes its state from the address, changes it with history.pushState (or replaceState while typing, after the first search of a spell), and fetches its page from POST /api/timelines/search. Back and Forward work, and the scroll and focus stay put. Words and tag search as they are typed (debounced), sort and visibility apply at once, and Search still works. While a search is on its way, the cards stay where they are, dimmed and shimmering, under a thin progress bar. A new page moves focus to its cards. Without JavaScript the server-rendered forms and links still work, and they end with the list's section (#explore, #mine, #favorites, #drafts; #timelines and #favorites on profiles), so the page opens where the visitor was. Cards (timeline-card.jsx) show the title, owner and last change, then badges (private, featured, comparison, sensitive), a three-line excerpt, size, the span of the moments with a small chart of their density, tag chips that filter the list, and the stars, compare and fork actions. They lay out as a grid or a list, remembered in the browser. Arrow keys move between the cards' titles, and empty lists say why and offer what to do. TimelineCardMedia is an empty slot above the title for the timeline image (#339). The search API adds first_time, last_time, time_span and shape to each result, read for a whole page in one query from the top three levels of each moment tree. Forks that read through and comparisons get none. Closes #338 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/d51ee3942c46e64548132e2a3e41cc79d199f031
Related
Open The timeline browser searches in place, with better cards in the timeline