Gallery has search and view toggle but no sort, no date range, no favorites quick-filter, and Design has no updatedAt field — large galleries are unmanageable #151

Closed
opened 2026-10-03 05:45:15 +00:00 by Mark · 1 comment
Owner

Finding

The Gallery's filter toolbar (src/pages/Gallery.tsx:368-510) has:

  • Search input (filters by filename)
  • View toggle (grid / list)
  • New Folder button
  • Upload Design (hidden file input + button)

It does NOT have:

  • A sort dropdown (e.g. "Newest first" / "Oldest first" / "Name A-Z")
  • A date range filter
  • A "Favorites only" quick filter (the Favorites folder tab works but requires a click; a toggle button next to search is more discoverable)
  • A "Recently edited" filter

The Gallery's loadDesigns() returns designs in localStorage insertion order. There's no sorting, no last-edited tracking (Design has createdAt but no updatedAt), no filtering beyond the active folder and the search query.

A user with 50+ saved designs cannot find their most recent work without scrolling. The Favorites tab is the only way to filter; if a user has 20 favorites and 80 non-favorites, they have to click between two tabs.

Where

  • Gallery toolbar: src/pages/Gallery.tsx:368-510
  • Sort/filter logic: src/pages/Gallery.tsx:60-82 (the filteredDesigns useMemo)
  • Design type: src/components/gallery/types.ts:9 (no updatedAt field)

Suggested fix shape

Two changes:

  1. Add a sort dropdown to the toolbar next to the view toggle. Options:

    • "Newest first" (by createdAt desc) — current default
    • "Oldest first" (by createdAt asc)
    • "Name A-Z" (by filename asc)
    • "Name Z-A" (by filename desc)

    Persist the sort selection in component state (no need to save to localStorage; it's a session preference).

  2. Add an updatedAt field to the Design type and update it whenever a design is edited (e.g. when the Workspace saves an updated version of the same design). Then add a "Recently edited" sort that uses this field.

  3. Add a "Favorites only" toggle button in the toolbar that prepends the favorites filter to the existing folder/search filters. (The Favorites folder tab still works; this is a quick-access toggle.)

Severity

Medium. Users with many designs need sort + favorites quick-filter. With 5 designs, no issue. With 50+, the UX degrades sharply.

Discovered by

Gap analysis (2026-10-02) of Gallery affordances.

  • The Gallery's "New Folder" button uses the shipped NewFolderDialog component per the #134 fix (in progress). The toolbar's other affordances haven't been audited for the same kind of completeness.
## Finding The Gallery's filter toolbar (`src/pages/Gallery.tsx:368-510`) has: - Search input (filters by filename) - View toggle (grid / list) - New Folder button - Upload Design (hidden file input + button) It does NOT have: - A sort dropdown (e.g. "Newest first" / "Oldest first" / "Name A-Z") - A date range filter - A "Favorites only" quick filter (the Favorites folder tab works but requires a click; a toggle button next to search is more discoverable) - A "Recently edited" filter The Gallery's `loadDesigns()` returns designs in localStorage insertion order. There's no sorting, no last-edited tracking (Design has `createdAt` but no `updatedAt`), no filtering beyond the active folder and the search query. A user with 50+ saved designs cannot find their most recent work without scrolling. The Favorites tab is the only way to filter; if a user has 20 favorites and 80 non-favorites, they have to click between two tabs. ## Where - Gallery toolbar: `src/pages/Gallery.tsx:368-510` - Sort/filter logic: `src/pages/Gallery.tsx:60-82` (the `filteredDesigns` useMemo) - Design type: `src/components/gallery/types.ts:9` (no `updatedAt` field) ## Suggested fix shape Two changes: 1. **Add a sort dropdown to the toolbar** next to the view toggle. Options: - "Newest first" (by `createdAt` desc) — current default - "Oldest first" (by `createdAt` asc) - "Name A-Z" (by `filename` asc) - "Name Z-A" (by `filename` desc) Persist the sort selection in component state (no need to save to localStorage; it's a session preference). 2. **Add an `updatedAt` field to the Design type** and update it whenever a design is edited (e.g. when the Workspace saves an updated version of the same design). Then add a "Recently edited" sort that uses this field. 3. **Add a "Favorites only" toggle button** in the toolbar that prepends the favorites filter to the existing folder/search filters. (The Favorites folder tab still works; this is a quick-access toggle.) ## Severity Medium. Users with many designs need sort + favorites quick-filter. With 5 designs, no issue. With 50+, the UX degrades sharply. ## Discovered by Gap analysis (2026-10-02) of Gallery affordances. ## Related - The Gallery's "New Folder" button uses the shipped `NewFolderDialog` component per the #134 fix (in progress). The toolbar's other affordances haven't been audited for the same kind of completeness.
Mark closed this issue 2026-10-03 06:47:42 +00:00
Author
Owner

Fixed in commit b04ddd9 on origin/main.

Sort dropdown (session-only) added to the toolbar: Newest first, Oldest first, Recently edited, Name A-Z, Name Z-A. Defaults to 'Newest first' to match the prior localStorage-insertion-order behavior.

Favorites-only quick-filter toggle button added next to the view toggle. It composes with the active folder tab, so a user can narrow to favorites within any folder (not just at the Favorites folder tab).

Sort is keyed on the existing editedAt field (set by Workspace.saveDesign on #63), so no schema migration is required. Note: the issue body referenced updatedAt; the actual field is editedAt. The semantics are identical for sort purposes.

9 new tests in src/pages/issue-151.test.tsx. 613/613 vitest pass, eslint clean, tsc -b clean.

Fixed in commit b04ddd9 on origin/main. Sort dropdown (session-only) added to the toolbar: Newest first, Oldest first, Recently edited, Name A-Z, Name Z-A. Defaults to 'Newest first' to match the prior localStorage-insertion-order behavior. Favorites-only quick-filter toggle button added next to the view toggle. It composes with the active folder tab, so a user can narrow to favorites within any folder (not just at the Favorites folder tab). Sort is keyed on the existing `editedAt` field (set by `Workspace.saveDesign` on #63), so no schema migration is required. Note: the issue body referenced `updatedAt`; the actual field is `editedAt`. The semantics are identical for sort purposes. 9 new tests in src/pages/issue-151.test.tsx. 613/613 vitest pass, eslint clean, tsc -b clean.
Sign in to join this conversation.
No description provided.