Skip to content

feat: custom collection classes and folder hub - #1355

Open
3-pr wants to merge 1 commit into
beta-branchfrom
feat/collection-classes-folder-hub
Open

3-pr wants to merge 1 commit into
beta-branchfrom
feat/collection-classes-folder-hub

Conversation

@3-pr

@3-pr 3-pr commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a dedicated "Folder Hub" view for collection folders that contain multiple sources. Previously, opening a folder with more than one source silently picked the first source and discarded the rest. Now, multi-source folders open into a proper hub view.

Key Changes

  • New Folder Hub view (src/views/folder-hub.tsx): renders multiple sources within a folder as either stacked horizontal rows ("Classic") or a tabbed infinite-scroll grid ("Grid"), depending on user preference.
  • Layout toggle: users can set a per-folder layout preference from the "Edit Folder Images" modal, or switch on the fly via quick-toggle icons in the Folder Hub header — both write to the same persisted state.
  • Lazy loading: Classic rows fetch their data only when scrolled into view (IntersectionObserver), and Grid mode validates sources sequentially in the background to hide empty/broken tabs without spamming concurrent requests.
  • Background visuals: folders with a cover image or animated preview now render it as a blurred, faded hero background behind the hub content.
  • Parsing improvements (src/lib/custom-sources.ts): more robust inference of provider/source type from imported collection data, with malformed entries (missing required fields) safely skipped instead of guessed.

Files Changed

  • src/lib/custom-sources.ts
  • src/components/edit-folder-images-modal.tsx
  • src/views/home.tsx
  • src/views/folder-hub.tsx (new)

Verification

  • pnpm run typecheck passes with 0 errors.
  • Manually verified: multi-source folders open the Folder Hub; layout toggle persists per folder from both the modal and the header; single-source folders continue to behave as before (regression-checked); tab switching in Grid mode loads correct, non-duplicated items with working infinite scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant