impl(web): add /series/<id> page for viewing a media series#68
Draft
andykais-claude wants to merge 1 commit into
Draft
impl(web): add /series/<id> page for viewing a media series#68andykais-claude wants to merge 1 commit into
andykais-claude wants to merge 1 commit into
Conversation
Moves the media browsing UI components (MediaList, MediaDetails, MediaView, Footer, SearchParams, SearchResults, SearchLink, MediaDetailEntry) and their supporting runes (dimensions, media_selections) out of the route-local browse folder into $lib/components/browse_like and $lib/runes so they can be reused by the upcoming /series/<series_id> route. Introduces a BrowseLikeController base with a BrowseLikeQueryParams contract that shared components rely on. Widens MediaListRune to accept a new 'series_search' paginate type. Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
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
Adds a new
/series/<series_id>page to@forager/webfor viewing the contents of a media series. The new page mirrors the/browselayout (Header with filters, Sidebar with details, Footer with view controls, MediaList/MediaView in the main area) but drives its results fromforager.series.searchscoped to the givenseries_id.Differences from
/browseseries_indexunderneath (#0,#1, …) so you can see what "page" of the series it corresponds to.series_indexalongside the standard sort options. Thegroup_by-onlyCountoption is excluded.Cross-linking from
/browseEvery media-series tile on
/browsenow renders a View series link under the tile that navigates to/series/<id>.Shared components
Per the task requirements, components are shared rather than imported across routes:
Footer,SearchParams,SearchResults,MediaList,MediaView,MediaDetails,MediaDetailEntry, andSearchLinkfromroutes/browse/components/into$lib/components/browse_like/.dimensionsandmedia_selectionsrunes fromroutes/browse/runes/into$lib/runes/.BrowseLikeControllerbase class in$lib/base_controller.tswith aBrowseLikeQueryParamscontract so both routes can drive the shared components uniformly.SearchParamsacceptssort_optionsandextra_filterssnippets so each route can contribute its own sort options and route-specific filter controls without importing across routes.SearchResults/MediaListacceptshow_series_indexandshow_series_linkprops to toggle the per-tile labels.MediaListRuneto accept a new'series_search'paginate input backed byforager.series.search.Walkthrough
series_view_walkthrough.mp4
Walkthrough of
/browse→ click View series → arrive at/series/6with#0/#1/#2labels → open the sort dropdown showing Series Index → click a tile to open the details sidebar → return to/browse.Browse page showing the new View series links
Browse page with the new "View series" links underneath each media-series tile.
Series page showing #0, #1, #2 series_index labels
Series detail page showing
#0,#1,#2labels under each tile.Sort dropdown with Series Index as the default option
Sort dropdown with Series Index as the default option (and no
Countoption).Sidebar details for a selected series tile
Sidebar details appear as on
/browsewhen a tile is clicked.Testing
deno task --cwd packages/web build(succeeds)./series/6= "Cat Series" with 3 items,/series/7= "Mixed Series" with 2 items).deno task --cwd packages/cli develop --config=... guiand manually walked through/browse→/series/6in Chrome, verifying: the View series link navigates correctly, series tiles display with theirseries_index, the sort dropdown showsSeries Indexas the default and re-orders correctly on change, the sidebar opens with details when a tile is clicked, and the browser back/forward continues to work. See the walkthrough video and screenshots above.deno run -A npm:svelte-check. My change results in fewer type errors thanmain(133 vs. 190) because consolidating the duplicated code removed a number of small pre-existing mismatches; no new errors are introduced by this PR.Notes
routes/*→$lib/*.To show artifacts inline, enable in settings.