Office Overview Part 5/5 - Open files, advisor fixes and 50-file cap#5687
Draft
moodyjmz wants to merge 81 commits into
Draft
Office Overview Part 5/5 - Open files, advisor fixes and 50-file cap#5687moodyjmz wants to merge 81 commits into
moodyjmz wants to merge 81 commits into
Conversation
Adds the office overview page to the application bar, and the appropriate route, controller, and template Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Adds the OfficeOverview Vue component and renders it Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
These template response parameters are used to determine where the app navigation and content are, so that keyboard users can jump to them easily Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
The OfficeOverview Vue component needs to be rendered directly to `#content` else it results in a weird double-margin visual bug. It causes some styles to be applied twice. This is also consistent with other apps. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
We had imported material design icons for the office file type icons in the navigation bar, but it might be best to re-use the icons we are using in the rest of the richdocuments app now for consistency. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Adds some basic Cypress and PHP unit tests to have some tests in place already Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Fetch files via WebDAV and cache them, and using the entries in the navigation bar to filter them. Unfortunately we cannot use the files entry grid from the Files app, so we have to use a somewhat custom Vue component. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Previously, fileid was used, but I learned that it is deprecated and snowflake IDs (node.id) should be used instead Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
In order for the viewer to be initiated and usable for opening documents, we need to dispatch this event. Previously, `LoadAdditionalScripts` was used, but it actually does not do what is necessary. It is unrelated. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Switch to using the event dispatcher instead of the service locator pattern. This also fixes a PHP Unit test Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Turns out CI does not load the viewer app, and even stubs won't work; it keeps throwing errors. So, we don't check that the event is dispatched now. We can test this in other ways, naturally, via E2E tests Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Seemed like a lot of extra steps to get the viewer loaded in the CI environment for the PHP tests, so we can just check if the class exists and gracefully skip it. The tests don't need it for now, and in a real scenario or E2E tests it will get dispatched just fine. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
For right now, I want to focus solely on traditional office file types. Later on it will be easy to add other types. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Move to a custom Vue component for displaying the document cards. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
We can get rid of the OfficeFileEntry component because it was just acting as a wrapper around each FileCard. We can just use FileCard directly and move those methods to the OfficeOverview component Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Inject an initial state that determines whether file previews should be shown or not, based on either core settings (enable_previews) or richdocuments settings. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
When previews are disabled, swap to using the file type icons instead. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Add Cypress assertion to check if the preview exists, and a PHP unit test to make sure the initial state is set correctly. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
A lot of the logic was redundant, so we can use a setup method to not have to redefine the mocked objects Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Make them more like file entry grid by removing the center alignment of the text. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
This was missing and is an office type, so should be added. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Adds a search bar so that the current view can be searched to easily find files Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Adds tests for the search functionality Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
The card should give the impression that it is "clickable" Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
DAV search finds documents that are not only in the root folder but also recursively in subdirectories. It was specified that it should be used in the feature spec anyway. Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
5f2768a to
6b932c3
Compare
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>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
…JSDoc to setOverviewGridView Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
54cec00 to
6ad06ac
Compare
…arams The controller gained IConfig and userId in the grid-view persistence commit but the test was not updated. Pass the two missing arguments and adjust provideInitialState expectations to cover both calls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
juliusknorr
reviewed
May 21, 2026
juliusknorr
reviewed
May 21, 2026
juliusknorr
reviewed
May 21, 2026
Member
juliusknorr
left a comment
There was a problem hiding this comment.
Went through the code and tested a bit. Looks good from my perspective with the comments addressed, note some are in the individual prs, but feel free to just continue in this single PR. Then we can just re-review the additonal commits that get added on top.
@marcoambrosini For some design review.
Main branch targets NC35 only; the 34 lower bound was introduced by a previous commit in this stack and should not land on main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Grid view is the richer experience for the overview; users who prefer list view can toggle it. Change the stored-value fallback from '0' to '1' so first-time visitors land on the grid. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
When a user template folder is configured, setCustomPreviewUrl is called but hasPreview was left false, causing the TemplateSection to skip the preview image and fall back to the type icon. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Document and spreadsheet templates are portrait (2/3) but presentation templates are landscape. Derive the preview aspect ratio from the creator's mimetypes and apply it as an inline style so presentation cards render at 16/9. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
…s set Without this guard, `LoadViewerListener` registers the richdocuments Viewer handler for every user even when no Collabora server is configured. This caused the richdocuments handler to intercept file opens in the overview page and display "Nextcloud Office is not configured" instead of delegating to the active office app (e.g. eurooffice). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
In CI the default Collabora setup runs with doc_format=ooxml, which causes RegisterTemplateFileCreatorListener to register Documents, Presentations and Spreadsheets creators with OOXML mimetypes (DOCX/XLSX/PPTX). The overview spec uploads ODF fixtures, so filterByMimes returns empty for those three categories and the file-card assertions never find the elements. Reset doc_format to '' in the before() hook, matching the pattern already used by talk.spec.js, share-link.js and templates.spec.js. Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
In CI the TemplateSection for Documents, Spreadsheets and Diagrams renders 2:3 aspect-ratio template cards which push the file grid below the viewport fold. The Presentations TemplateSection uses 16:9 cards (shorter) so its grid stays in view. Adding scrollIntoView() ensures the assertion works regardless of page height. Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Add prev/next arrow buttons to the template section header and turn the card row into a horizontally scrollable strip with a hidden scrollbar. The arrows enable/disable based on scroll position and a ResizeObserver keeps that state correct as the row is resized. Signed-off-by: Marco Ambrosini <marcoambrosini@proton.me>
Replace the frosted-glass template section background with four intersecting radial gradients whose hue is derived from the active document type's mimetype icon (blue/green/orange/amber). Palettes are exposed as CSS custom properties via a sectionStyle computed. Signed-off-by: Marco Ambrosini <marcoambrosini@proton.me>
Add resting/hover drop shadows to template cards, lighten the resting border, size the blank card icon down to 24px, and tidy heading and label typography. Cards sit flush to the scroll edge with inline spacing re-added as first/last item margins. Signed-off-by: Marco Ambrosini <marcoambrosini@proton.me>
Relocate the file search field from the content area into the app navigation's #search slot (NcAppNavigationSearch), matching the Files app. Put the view-mode toggle on the same row as the All/Mine/Shared filters, add a top safe area so content clears the navigation toggle, and align headings on color-main-text. Signed-off-by: Marco Ambrosini <marcoambrosini@proton.me>
Show the active document type's icon next to each file's name and date in the grid view (new FileCard #icon slot). Drop the hover lift and shadow in favour of a static 2px bordered card with a concentric inner preview radius. Signed-off-by: Marco Ambrosini <marcoambrosini@proton.me>
Regular OOXML document MIME types were missing from the accepted lists, so files in the user Templates folder were silently excluded. Collabora can open these formats natively so they should be usable as templates. Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Pass templateId and templateType from the NC Files API response rather
than filename + hardcoded 'user', so the server routes through the correct
TemplateFileCreator. After the file is created, navigate to /f/{fileid}
so it opens immediately in the editor instead of just refreshing the list.
Signed-off-by: James Manuel <james.manuel@nextcloud.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Signed-off-by: James Manuel <james.manuel@nextcloud.com>
Pass the server's OCS meta message through instead of hardcoding 'A file with that name already exists', so the correct reason is shown for any failure (conflict, invalid path, permission error, etc.). Signed-off-by: James Manuel <james.manuel@nextcloud.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Cover the headline behaviour added in this branch: - dialog opens with pre-filled filename when clicking Blank - blank file is created and page navigates away from the overview - server error message is shown when creation fails - non-blank template sends templateId/templateType (skipped if no templates) Signed-off-by: James Manuel <james.manuel@nextcloud.com> Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
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.
Part of the Office Overview feature — merge into
feat/office-overview-v2.