feat: nmc/6466 add Nextcloud 33 compatibility for sharing file actions and popup - #72
Open
suet-kei-chan wants to merge 1 commit into
Open
feat: nmc/6466 add Nextcloud 33 compatibility for sharing file actions and popup#72suet-kei-chan wants to merge 1 commit into
suet-kei-chan wants to merge 1 commit into
Conversation
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.
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.
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.
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.