Skip to content

Feat/euro office overview#5

Open
moodyjmz wants to merge 10 commits into
mainfrom
feat/euro-office-overview
Open

Feat/euro office overview#5
moodyjmz wants to merge 10 commits into
mainfrom
feat/euro-office-overview

Conversation

@moodyjmz
Copy link
Copy Markdown

Adds the overview portion. Updated for vue etc

@moodyjmz moodyjmz self-assigned this May 22, 2026
moodyjmz added 5 commits May 22, 2026 19:01
Add @mdi/js, @nextcloud/{auth,files,l10n,router}, and axios needed for the
overview feature. Bump nextcloud min-version to 33 / max-version to 35 to
match the APIs the overview relies on.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Port the three services from richdocuments to TypeScript with full type
definitions. officeFiles.ts uses DAV SEARCH (depth:infinity) with a
MAX_DISPLAY_FILES render guard; config.ts persists grid-view preference to
localStorage; templates.ts wraps the NC core templates OCS API.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Port FileCard (slot-based card with preview/icon/name/subname) and
TemplateSection (scrollable template row with ResizeObserver arrows and
per-type gradient backgrounds) from richdocuments to Vue 3 script setup
with TypeScript. Replaces vue-material-design-icons chevrons with @mdi/js
paths in TemplateSection.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Port OfficeOverview from richdocuments Options API to Vue 3 script setup
with TypeScript. All vue-material-design-icons icons replaced with @mdi/js
paths via NcIconSvgWrapper. App-id references switched from richdocuments
to office. previewEnabled state dropped; per-card @error fallback handles
missing previews. Grid-view mode read from localStorage via config.ts.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
- Override vue-eslint-parser to use @typescript-eslint/parser as inner
  parser so TypeScript generics in <script setup lang="ts"> are accepted
- Remove direct `webdav` import from officeFiles.ts; use inline structural
  type instead — `webdav` is a transitive dep and the import was type-only
- Add .stylelintrc.cjs extending @nextcloud/stylelint-config (was absent)
- Update plan doc: axios → @nextcloud/axios correction

All three checks now pass clean: eslint, stylelint, tsc --noEmit.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
@moodyjmz moodyjmz force-pushed the feat/euro-office-overview branch from be62bcf to 49c7f1f Compare May 22, 2026 17:01
- Add src/global.d.ts to type window.OCA.Viewer
- Replace regex mime→theme detection in TemplateSection with an explicit MIME_THEME map
- Extract OcsErrorResponse type to templates.ts and use it in the catch block
- Add activeCategoryName computed, guard files section with v-else-if="activeCreator"
  to eliminate the three activeCreator! non-null assertions
- Add activeFilter intentionally-not-reset comment in watch(activeCreator)
- Prefer component.focus() over $el.querySelector in the dialog nextTick
- Add validateFilename() to block / \\ and NUL chars before the API call
- Document the flat cache design constraint in officeFiles.ts
- Remove dead restoreCreator parameter from fetchAll
- Add TTI comment on the module-level fetchAll() call

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Comment thread appinfo/info.xml
<bugs>https://github.com/nextcloud/office</bugs>
<dependencies>
<nextcloud min-version="31" max-version="32"/>
<nextcloud min-version="33" max-version="35"/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

35, since we want to bundle with server release we will need a separate branch for each stable version (35 is against server master now).

We can branch off once this is merged then.

Copy link
Copy Markdown
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small things noticed while checking out:

  • Button to switch between grid/list view seems missing
  • The navigation entry still has the skeleton cloud icon, we should switch to the document icon we had in richdocuments

@juliusknorr
Copy link
Copy Markdown
Member

I've pushed fixes for the remaining action failures to main, so a rebase should get CI passing

moodyjmz added 4 commits May 24, 2026 01:28
Avoids routing through the Files shortlink (/f/{fileid}) which loses
the overview as the referrer and lands the user in the Files app URL.

Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
The initial skeleton used a cloud/weather icon. Replace with the
standard NC document (folded-corner page) icon to match the app's purpose.

Signed-off-by: James Manuel <james.manuel@nextcloud.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Read the editor URL from NC initial state (injected by PageController)
instead of hardcoding /apps/office/open. When no editor URL is provided
(overview-only deployment), fall back to NC's /f/{fileid} file shortlink
which routes through the Files app and triggers whatever default file
action is registered (e.g. eurooffice).

This removes the cross-branch dependency introduced in the previous
navigation fix: the overview branch no longer assumes the WOPI editor
route exists. The combined/WOPI branch will provide the concrete URL
via PageController::index().

Behaviour summary:
- With WOPI backend: direct navigation to editor, history.back() returns
  to overview
- Without WOPI (e.g. eurooffice): routes via /f/{fileid} → Files app →
  registered default action; return-to-overview depends on that editor

Signed-off-by: James Manuel <james.manuel@nextcloud.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
Covers: what the branch adds, local dev setup with nextcloud-docker-dev,
file open behaviour with and without the WOPI backend, and branch status.

Signed-off-by: James Manuel <james.manuel@nextcloud.com>
Signed-off-by: James Manuel <moodyjmz@users.noreply.github.com>
@moodyjmz moodyjmz force-pushed the feat/euro-office-overview branch 2 times, most recently from 7c11317 to 2313d76 Compare May 24, 2026 00:18
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.

2 participants