Skip to content

Office Overview Part 3/5 - List view, view toggle and grid preference#5680

Merged
moodyjmz merged 6 commits into
feat/office-overview-v2from
feat/overview-pr4-list-view
May 20, 2026
Merged

Office Overview Part 3/5 - List view, view toggle and grid preference#5680
moodyjmz merged 6 commits into
feat/office-overview-v2from
feat/overview-pr4-list-view

Conversation

@moodyjmz
Copy link
Copy Markdown
Contributor

@moodyjmz moodyjmz commented May 20, 2026

Part 3 of 5 — see #5678 for the full series. Merge all PRs into feat/office-overview-v2 in order.

  • List view with NcListItem; grid/list toggle button persisted per user
  • Grid view preference saved via UserConfig initial state
  • Template card sizing, preview URL, and mimeFallback fixes
  • Recent section heading, single toggle button, a11y improvements

moodyjmz and others added 6 commits May 20, 2026 15:38
Adds PUT /apps/richdocuments/settings/overview/grid_view endpoint to
persist the overview view mode per user. OverviewController injects the
saved preference as initial state so the frontend reads it on mount.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
List view is now the default. A toggle in the toolbar switches between
list and grid. List rows use NcListItem with mtime subname and a star
indicator for favourites. The chosen mode persists via the new
settings/overview/grid_view endpoint.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
…le toggle, a11y fixes

- Center search bar; move view toggle into a files section header alongside
  a "Recent {category}" h2 heading
- Toggle is now a single button switching icon based on current mode
- TemplateSection gets a subtle background (--color-background-hover) and
  uses h2 + aria-labelledby for correct heading hierarchy
- FileCard changed from div to button for keyboard accessibility;
  adds focus-visible outline

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Blank card was taller than template cards because min-height and
padding-bottom combined. Replaced flex centering with absolute
positioning for the icon so height is driven by padding-bottom alone.

Template preview URLs were null from the API despite hasPreview: true.
Generate from fileid using /core/preview (mirrors TemplatePreview.vue).

File grid preview URLs now include etag version param and mimeFallback=1
so broken previews degrade to MIME icons rather than broken img elements.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Guard setOverviewGridView() against a null userId by returning 401
rather than writing to an empty-string uid. Mirror the same null guard
in OverviewController::index() when reading the stored grid-view pref.

Also rename the initial state key from 'config' to 'overview_config' to
avoid colliding with any existing config state provided by other parts
of the app.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
…meFallback param

Replace the ratio-based padding-bottom trick in TemplateSection with a
fixed 2/3 aspect-ratio so all categories (docs, sheets, presentations)
render at the same height. Switch .template-card__preview to flex
centering, removing the now-redundant absolute-position rule on the
blank card icon.

Add an @error handler that sets failedPreviews[fileid] so a broken
image falls back to the file-type icon without a broken-image glitch.
Use template.previewUrl when the API provides it, otherwise derive the
URL from the fileid.

In OfficeOverview, fix the preview URL to use mimeFallback=true
(boolean string) instead of mimeFallback=1, and update the loadState
key to match the renamed initial state ('overview_config').

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
@moodyjmz moodyjmz changed the title feat(overview): list view, view toggle, grid preference Office Overview Part 3/5 - List view, view toggle and grid preference May 20, 2026
Base automatically changed from feat/overview-pr3-template-section to feat/office-overview-v2 May 20, 2026 16:25
@moodyjmz moodyjmz merged commit 1e7b7f6 into feat/office-overview-v2 May 20, 2026
15 of 39 checks passed
@moodyjmz moodyjmz deleted the feat/overview-pr4-list-view branch May 20, 2026 16:25
@moodyjmz moodyjmz restored the feat/overview-pr4-list-view branch May 20, 2026 16:31
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