-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/euro office overview #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
moodyjmz
wants to merge
10
commits into
main
Choose a base branch
from
feat/euro-office-overview
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3cf35bc
feat: :package: add runtime deps and bump NC version requirement
moodyjmz 0375e6f
feat: :sparkles: add TypeScript services for templates, files and config
moodyjmz 74c1304
feat: :sparkles: add FileCard and TemplateSection Vue 3 components
moodyjmz c5b25a4
feat: :sparkles: add OfficeOverview main view and wire into App
moodyjmz 49c7f1f
fix: :rotating_light: resolve all lint errors and add stylelint config
moodyjmz 35b7d43
refactor: :recycle: apply post-review improvements to overview compon…
moodyjmz 71d0dd5
🐛 fix: navigate directly to in-app editor from overview
moodyjmz 5a01d94
🐛 fix: use document icon instead of cloud for app icon
moodyjmz 8c1edb9
✨ feat: decouple openFile from hardcoded WOPI editor URL
moodyjmz 2313d76
📝 docs: replace scaffold README with overview branch developer guide
moodyjmz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| module.exports = { | ||
| extends: [ | ||
| '@nextcloud/stylelint-config', | ||
| ], | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,101 @@ | ||
| # Office | ||
|
|
||
| A template to get started with Nextcloud app development. | ||
| A Nextcloud app that provides a dedicated hub for office documents. Users can browse, | ||
| filter, search, and create Documents, Spreadsheets, Presentations, and Diagrams from | ||
| a single page — without going through the Files app. | ||
|
|
||
| ## Usage | ||
| --- | ||
|
|
||
| - To get started easily use the [Appstore App generator](https://apps.nextcloud.com/developer/apps/generate) to | ||
| dynamically generate an App based on this repository with all the constants prefilled. | ||
| - Alternatively you can use the "Use this template" button on the top of this page to create a new repository based on | ||
| this repository. Afterwards adjust all the necessary constants like App ID, namespace, descriptions etc. | ||
| ## Features | ||
|
|
||
| Once your app is ready follow the [instructions](https://nextcloudappstore.readthedocs.io/en/latest/developer.html) to | ||
| upload it to the Appstore. | ||
| - **Overview page** at `/apps/office` — categorised file list with sidebar navigation | ||
| - **Filters** — All / Mine / Shared with me | ||
| - **Search** — within the active category, with an "Open in Files" escape hatch | ||
| - **View toggle** — Grid (thumbnail previews) or List, persisted per user | ||
| - **Template creator** — create new files from editor-provided templates | ||
| - **Editor integration** — opens files directly in the configured office editor | ||
|
|
||
| ## Resources | ||
| --- | ||
|
|
||
| ### Documentation for developers: | ||
| ## Local development | ||
|
|
||
| - General documentation and tutorials: https://nextcloud.com/developer | ||
| - Technical documentation: https://docs.nextcloud.com/server/latest/developer_manual | ||
| ### Requirements | ||
|
|
||
| ### Help for developers: | ||
| - [nextcloud-docker-dev](https://github.com/juliushaertl/nextcloud-docker-dev) | ||
| - NC ≥ 33 | ||
| - Node 24 / npm 11 | ||
|
|
||
| - Official community chat: https://cloud.nextcloud.com/call/xs25tz5y | ||
| - Official community forum: https://help.nextcloud.com/c/dev/11 | ||
| ### 1. Mount the app into the container | ||
|
|
||
| Add to `nextcloud-docker-dev/docker-compose.override.yml`: | ||
|
|
||
| ```yaml | ||
| services: | ||
| nextcloud: | ||
| volumes: | ||
| - /path/to/office:/var/www/html/apps-extra/office | ||
| ``` | ||
|
|
||
| Restart the container after saving. | ||
|
|
||
| ### 2. Enable the app | ||
|
|
||
| ```bash | ||
| docker exec -u www-data nextcloud-docker-dev-nextcloud-1 \ | ||
| php occ app:enable office | ||
| ``` | ||
|
|
||
| ### 3. Build the frontend | ||
|
|
||
| ```bash | ||
| npm ci | ||
| npm run build # one-off build | ||
| npm run watch # rebuild on file changes | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Editor integration | ||
|
|
||
| The overview opens files using a URL provided by the backend at page load | ||
| (`editor-url` via NC initial state). The behaviour depends on which editor | ||
| is configured. | ||
|
|
||
| ### With the WOPI backend | ||
|
|
||
| When the WOPI backend is active, `PageController` injects the editor's open | ||
| route. Clicking a file navigates directly to the full-page editor, and closing | ||
| the editor (`history.back()`) returns the user to the overview. | ||
|
|
||
| See the `feat/wopi-phase-4` branch for the WOPI backend implementation. | ||
|
|
||
| ### With eurooffice (transitional) | ||
|
|
||
| When no WOPI backend is present, the app falls back to NC's file shortlink | ||
| (`/f/{fileid}`), which redirects to the Files app and triggers eurooffice's | ||
| default file action. The editor opens in the Files app context — closing it | ||
| returns the user to the Files app, not the overview. | ||
|
|
||
| To prevent eurooffice from intercepting opens during testing: | ||
|
|
||
| ```bash | ||
| docker exec -u www-data nextcloud-docker-dev-nextcloud-1 \ | ||
| php occ app:disable eurooffice | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## Architecture | ||
|
|
||
| ``` | ||
| /apps/office | ||
| └── PageController::index() Renders the SPA shell; injects editor-url initial state | ||
| └── OfficeOverview.vue Full Vue 3 SPA | ||
| ├── officeFiles.ts WebDAV file listing via @nextcloud/files | ||
| ├── templates.ts Template discovery and file creation | ||
| └── config.ts User preference persistence (grid/list view) | ||
| ``` | ||
|
|
||
| The frontend reads `editor-url` from NC initial state on load. If null, it falls | ||
| back to the `/f/{fileid}` shortlink. The backend sets this value to the WOPI | ||
| editor route when the WOPI implementation is active. |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
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.