Skip to content

Office Overview Part 5/5 - Open files, advisor fixes and 50-file cap#5678

Merged
moodyjmz merged 107 commits into
feat/office-overview-v2from
feat/overview-pr6-open-file
May 20, 2026
Merged

Office Overview Part 5/5 - Open files, advisor fixes and 50-file cap#5678
moodyjmz merged 107 commits into
feat/office-overview-v2from
feat/overview-pr6-open-file

Conversation

@moodyjmz

@moodyjmz moodyjmz commented May 20, 2026

Copy link
Copy Markdown
Contributor

Part 5 of 5 — final PR in the Office Overview series. All individual PRs merge into feat/office-overview-v2; that branch is what lands on main.

  • Open files via OCA.Viewer; fallback to /f/{fileid} when Viewer absent
  • Advisor review: mime maps hoisted to computed, l10n fix in new-file basename, currentUid out of hot path, sort newest-first
  • Template section: remove hardcoded blue fallback gradient
  • aria-live region announces filter result count to screen readers
  • Preview error fallback for grid cards
  • Cap recent files at 50; "Show all / Search all in Files" link passes search query to Files app
  • DAV SEARCH pagination limitation documented

silverkszlo and others added 30 commits April 27, 2026 16:02
Signed-off-by: silver <s.szmajduch@posteo.de>
…access

Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
fix(wopi): properly validate old timestamp
fix(settings): only allow setting auth token types to request config access
Align with the similar error message in in lib/Preview/Office.php

Signed-off-by: Carl Schwan <carlschwan@kde.org>
fix: Make preview timeout an info log instead of error
Uses a new rate limiter service to rate
limit certain WOPI endpoints via the
WOPI token. This attempts to prevent
abuse when a token tries to spam
requests.

Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
PUT_RELATIVE is never accessed via this endpoint. It is already handled via postFile()'s else branch.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Bumps [phpseclib/phpseclib](https://github.com/phpseclib/phpseclib) from 3.0.51 to 3.0.52.
- [Release notes](https://github.com/phpseclib/phpseclib/releases)
- [Changelog](https://github.com/phpseclib/phpseclib/blob/master/CHANGELOG.md)
- [Commits](phpseclib/phpseclib@3.0.51...3.0.52)

---
updated-dependencies:
- dependency-name: phpseclib/phpseclib
  dependency-version: 3.0.52
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [cypress](https://github.com/cypress-io/cypress) from 15.14.1 to 15.14.2.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v15.14.1...v15.14.2)

---
updated-dependencies:
- dependency-name: cypress
  dependency-version: 15.14.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…/phpseclib-3.0.52

chore(deps): Bump phpseclib/phpseclib from 3.0.51 to 3.0.52
…ss-15.14.2

chore(deps-dev): Bump cypress from 15.14.1 to 15.14.2
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: GitHub <noreply@github.com>
…xtcloud-ocp

[main] Update nextcloud/ocp dependency
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
revert: temporarily revert pdf viewer assertion
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: GitHub <noreply@github.com>
…xtcloud-ocp

[main] Update nextcloud/ocp dependency
…stics, and response handling

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
…bustness

feat(CachedRequestService): improve isProxyStarting robustness, diagnostics, and response handling
Bumps [fast-xml-builder](https://github.com/NaturalIntelligence/fast-xml-builder) from 1.1.4 to 1.2.0.
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-builder/blob/main/CHANGELOG.md)
- [Commits](NaturalIntelligence/fast-xml-builder@v1.1.4...v1.2.0)

---
updated-dependencies:
- dependency-name: fast-xml-builder
  dependency-version: 1.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
moodyjmz and others added 21 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>
Add owner-based filtering to the files section:
- 'Mine' (default): files owned by the current user that are not on a
  shared or group mount (mirrors apps/files PersonalFiles filter)
- 'Shared with me': files where nc:mount-type === 'shared'
- 'All': no filter applied

Both properties (oc:owner-id → node.owner, nc:mount-type) are already
returned by getDavProperties() so no extra API call is needed.

Three NcButton chips (size=small, aria-pressed) in a role=group below
the section title give keyboard-accessible toggle behaviour. The empty
state is moved inside the section so the chips remain visible when a
filter yields no results, allowing the user to switch back.

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

Override --button-radius on the filter NcButton elements so they render
as pill-shaped chips rather than square-cornered small buttons.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Single click on a file (list or grid) calls OCA.Viewer.open({ path })
which dispatches to whichever editor is registered for that MIME type.
node.path is the user-relative path (/Documents/file.docx) derived by
@nextcloud/files from the DAV source and root — correct for the Viewer.

Tighten the guard to consistent optional chaining so a missing Viewer
is a silent no-op rather than a conditional block.

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

- Replace regex-based categoryName() with a mime-type keyed map so category
  labels survive non-English locales (the server-side label is already
  localised and cannot be parsed with an English-only /^new\s+/ regex)
- Change inactive filter chip variant tertiary → secondary so chips remain
  visually distinct from plain text
- Show a hint in the empty state when a non-'all' filter yields no results
- Align Cypress test expectations to capitalised category names (lowercase
  interpolation in t() calls would break German and other languages where
  nouns are always capitalised)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Track failed preview loads per file ID so the icon placeholder is shown
instead of a broken image when a preview fetch fails.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
… basename

categoryName() was rebuilding a 14-entry object on every call. Move the
maps to mimeCategories/mimeBasenames computed properties so Vue caches them.

onTemplateSelect still used /^New\s+/i regex to strip the English prefix
from creator.label before building the default filename. creator.label is
localised server-side, so the regex silently no-ops on non-English installs
and produces filenames like 'Neues Dokument.odt'. Use the same MIME-keyed
map to get the correct singular basename in every locale.

Also move getCurrentUser().uid out of the files computed hot path into
data(), and flip sortingOrder to 'desc' so the most recently modified
files appear first.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Screen readers got no feedback when switching filter chips because the
file list updated silently. Add a role=status (aria-live=polite) region
that announces the result count whenever the files computed changes.

openFile was a silent no-op when OCA.Viewer was absent (e.g. Viewer app
disabled or non-Nextcloud WOPI embedding). Fall back to the standard
/f/{fileid} permalink so the file still opens in the editor.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
The --image-background fallback was a hardcoded Nextcloud-blue gradient
that looks wrong on any plain-colour or custom-branded theme without a
background image. Use 'none' so the frosted-glass overlay just renders
as the semi-transparent --color-main-background-blur tint on plain themes.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
The overview is a quick-access surface, not a full file browser. Cap the
displayed list at MAX_RECENT_FILES (50) per category so the page stays
snappy. The full filtered list still lives in filteredFiles so search and
filter chips correctly reflect the complete match set.

When the cap is reached, a 'Show all in Files' button navigates to the
Files app Recent view so users can browse everything.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
The Files app router uses history mode with /:view as a path segment,
not a query parameter. /apps/files/recent is the correct URL.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
When the user has typed a search and hits 'Show all in Files', navigate
to /apps/files/search?query=<term> so the Files app opens with the same
search pre-populated. Without a search, keep going to /apps/files/recent.

Also update the button label to 'Search all in Files' when a search is
active so the affordance matches the destination.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
…ings

Use creator.label directly as the default filename in the create dialog
instead of a MIME-keyed map of singular category names. This avoids adding
new translation strings and works correctly in all locales.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
@moodyjmz moodyjmz merged commit 5f2768a into feat/office-overview-v2 May 20, 2026
14 of 33 checks passed
@moodyjmz moodyjmz deleted the feat/overview-pr6-open-file branch May 20, 2026 16:25
@moodyjmz moodyjmz restored the feat/overview-pr6-open-file 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.

10 participants