Skip to content

feat: nmc/6466 add Nextcloud 33 compatibility for sharing file actions and popup - #72

Open
suet-kei-chan wants to merge 1 commit into
mainfrom
nmc/6466-nextcloud-33-compatibility-for-nmcsharing
Open

feat: nmc/6466 add Nextcloud 33 compatibility for sharing file actions and popup#72
suet-kei-chan wants to merge 1 commit into
mainfrom
nmc/6466-nextcloud-33-compatibility-for-nmcsharing

Conversation

@suet-kei-chan

Copy link
Copy Markdown
Contributor

Nextcloud 33 ships @nextcloud/files v4, which scopes the file-action registry by library major version and removes the OCA.Files.Sidebar API. The actions registered with the v3 library were no longer picked up (the sharing buttons disappeared) and the sidebar-based sharing popup no longer opened.

  • Migrate the file actions to the v4 API: plain object literals instead of the removed FileAction class, and destructured action context (exec/enabled receive { nodes, view, folder })
  • Open the MagentaCLOUD sharing popup as a standalone modal instead of a removed sidebar tab, exposed via window.OCA.Nmcsharing.openSharingPopup; the "Show sharing options" and "Share" actions use it
  • Keep "Manage shares" opening the files sidebar via getSidebar()
  • Decouple SharingPopup from the removed OCA.Files.Sidebar API (close/isSharedWithMe/openSharingManage)
  • Bump @nextcloud/files to ^4.0.0

Note: package-lock.json still needs regenerating against @nextcloud/files v4 (and a v4-compatible @nextcloud/dialogs) before release. The v4 library only works on Nextcloud 33+, so info.xml still declares min-version 30 - consider raising it to 33.

Notable finding
origin/main had already bumped the version to 33.0.1 and declared NC 30–34, but never migrated the sharing code — it still ships @nextcloud/files@^3, new FileAction(...), and OCA.Files.Sidebar. So this branch is the actual NC 33 fix, not a duplicate. The old nmc/4516 I initially branched from was just 4 commits behind main with no unique work.

Two things flagged in the commit for the reviewer
package-lock.json regen against @nextcloud/files v4 (+ a v4-compatible @nextcloud/dialogs) is still required before release — the working bundles came from the local node_modules overlay, not the committed lockfile.
min-version: main declares 30, but the v4 library only works on NC 33+, so the sharing actions won't register on 30–32. I left it at main's 30 rather than change policy — consider raising to 33.

Nextcloud 33 ships @nextcloud/files v4, which scopes the file-action
registry by library major version and removes the OCA.Files.Sidebar API.
The actions registered with the v3 library were no longer picked up (the
sharing buttons disappeared) and the sidebar-based sharing popup no
longer opened.

- Migrate the file actions to the v4 API: plain object literals instead
  of the removed FileAction class, and destructured action context
  (exec/enabled receive { nodes, view, folder })
- Open the MagentaCLOUD sharing popup as a standalone modal instead of a
  removed sidebar tab, exposed via window.OCA.Nmcsharing.openSharingPopup;
  the "Show sharing options" and "Share" actions use it
- Keep "Manage shares" opening the files sidebar via getSidebar()
- Decouple SharingPopup from the removed OCA.Files.Sidebar API
  (close/isSharedWithMe/openSharingManage)
- Bump @nextcloud/files to ^4.0.0

Note: package-lock.json still needs regenerating against @nextcloud/files
v4 (and a v4-compatible @nextcloud/dialogs) before release. The v4 library
only works on Nextcloud 33+, so info.xml still declares min-version 30 -
consider raising it to 33.
@suet-kei-chan suet-kei-chan self-assigned this Aug 17, 2026
@suet-kei-chan
suet-kei-chan requested a review from psawalka August 19, 2026 07:20
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.

1 participant