impl(web): add /series/<id> page for viewing a media series#78
Draft
andykais-claude wants to merge 2 commits into
Draft
impl(web): add /series/<id> page for viewing a media series#78andykais-claude wants to merge 2 commits into
andykais-claude wants to merge 2 commits 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>
Brings the /series/<id> route query params in line with the browse route after main's media_type search filter (#71). Maps the image/video/audio dropdown values to the canonical uppercase query.media_type filter now supported by forager.series.search, in addition to the existing 'animated' handling. Co-authored-by: andykais-claude <andykais-claude@users.noreply.github.com>
a512790 to
c7eecf1
Compare
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
This is a rebase of #68 (
cursor/series-view-page-1fd2) onto the currentmain, plus the follow-up changes needed to keep the new/series/<id>route consistent with commits that landed onmainsince the original PR branched.Adds a new
/series/<series_id>page to@forager/webfor viewing the contents of a media series. The 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.Rebase notes
extract shared browse-like components into $lib/components) ontomain.maingainedimpl(core,cli,web): add media_type search filter (#71), which added amedia_typefilter (image/video/audio) to both media and series search. The new series route created its ownqueryparams.svelte.tsbefore that feature existed, so a follow-up commit brings the series query params in line with browse: theimage/video/audiodropdown values now map to the canonical uppercasequery.media_typefilter supported byforager.series.search(in addition to the legacyanimatedvalue).mainalso gainedimpl(web): ToggleFullScreen and ToggleFitMedia keybinds (#60), which modifiedFooter.svelte,MediaView.svelte, andbrowse/+page.svelte— files this PR moved/renamed into$lib/components/browse_like/. Git detected the renames and merged impl(web): ToggleFullScreen and ToggleFitMedia keybinds #60 into the new locations with a few content conflicts, resolved as follows:MediaView.svelte: kept impl(web): ToggleFullScreen and ToggleFitMedia keybinds #60's newis_fullscreen/refresh_fullscreen_state/media_fit_classesstate, the fullscreen-awareEscapehandler, and theToggleFitMedia/ToggleFullScreenkeybinds; only overlaid this PR'sBrowseLikeControllertype so the component is shared across routes.Footer.svelte: kept impl(web): ToggleFullScreen and ToggleFitMedia keybinds #60's new "view:" fit-mode toggle button, "tiles:" label, and grid change; overlaid theBrowseLikeControllertype.browse/+page.svelte: kept impl(web): ToggleFullScreen and ToggleFitMedia keybinds #60'son:keydown|capturehandler.on:keydown|capturechange toseries/[series_id]/+page.svelteso the new keybinds work identically on the series route (which sharesMediaView).Differences from
/browseseries_indexunderneath (#0,#1, …).series_indexalongside the standard sort options; thegroup_by-onlyCountoption is excluded.Cross-linking from
/browseEvery media-series tile on
/browserenders a View series link that navigates to/series/<id>.Shared components
Footer,SearchParams,SearchResults,MediaList,MediaView,MediaDetails,MediaDetailEntry, andSearchLinkinto$lib/components/browse_like/.dimensionsandmedia_selectionsrunes into$lib/runes/.BrowseLikeControllerbase with aBrowseLikeQueryParamscontract so both routes drive the shared components uniformly.MediaListRuneto accept a'series_search'paginate input backed byforager.series.search.Testing
deno task --cwd packages/web build— succeeds.deno run -A npm:svelte-check— 125 errors (down from 133 pre-rebase thanks to impl(web): ToggleFullScreen and ToggleFitMedia keybinds #60's settings typing); all pre-existing module-resolution/indexing errors. No new errors introduced by the rebase or conflict resolution (resolvedMediaView.svelteis byte-identical tomain's except the shared-controller type import)./series/4(a seeded 3-item series of image/video/audio):#0/#1/#2labels.image/video/audiomedia_type filter dropdown filters correctly.ftoggles fullscreen andCtrl+Spacetoggles media fit (the media visibly resizes), matching/browse.