Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Sep 22, 2025

Since Nextcloud 28 the files app does not support OCA.Files for actions and similar integrations anymore.
Instead we need to use the new files API provided by @nextcloud/files.

So this migrates the files app integration to the new API for Nextcloud 28 and newer (to make it work with current 31 or 32) using current Nextcloud app best practices e.g. using Typescript.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the Nextcloud Maps app's files integration from the legacy OCA.Files API to the modern @nextcloud/files API for compatibility with Nextcloud 28+. The migration introduces TypeScript support and follows current Nextcloud app development best practices.

Key changes:

  • Replaces legacy jQuery-based file actions with modern TypeScript implementations
  • Migrates to the new @nextcloud/files API for file action registration
  • Updates webpack configuration to support TypeScript and asset bundling

Reviewed Changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
webpack.js Adds TypeScript entry point and asset loading rule for new files integration
src/init-files.ts New TypeScript entry point that registers file actions using the modern API
src/filetypes.js Removed legacy jQuery-based file actions implementation
src/files-actions/view-in-maps.ts New TypeScript file action for viewing files in Maps
src/files-actions/import-favorite.ts New TypeScript file action for importing files as favorites
src/files-actions/import-devices.ts New TypeScript file action for importing files as devices
package.json Adds TypeScript dependencies and new Nextcloud packages
lib/Service/MyMapsService.php Adds method to lookup maps by ID and fixes variable assignment
lib/Listener/LoadAdditionalScriptsListener.php Updates script loading to use new init script
lib/Controller/PageController.php Updates dependency injection and adds redirect logic for map file IDs
css/filetypes.css Removes legacy CSS file
.eslintignore Removes reference to deleted filetypes.js file

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Since Nextcloud 28 the files app does not support `OCA.Files` for
actions and similar integrations anymore.
Instead we need to use the new files API provided by `@nextcloud/files`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the feat/support-files-27 branch from fd718a3 to cf9d52b Compare September 23, 2025 11:41
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the feat/support-files-27 branch from ee324b7 to ea29e2f Compare September 23, 2025 12:24
@susnux susnux merged commit 53a8a38 into master Sep 26, 2025
19 checks passed
@susnux susnux deleted the feat/support-files-27 branch September 26, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants