Skip to content

refactor(files_sharing): migrate to Vue 3 - #66380

Merged
susnux merged 1 commit into
masterfrom
refactor/files-sharing-vue3
Nov 6, 2026
Merged

susnux merged 1 commit into
masterfrom
refactor/files-sharing-vue3

Conversation

@susnux

@susnux susnux commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Why? To finally drop the duplicated build process.

All remaining entry points of the app are now built by the Vue 3 frontend.
The changes are limited to what Vue 3 and @nextcloud/vue 9 require, components keep their Options API and template style.

  • Custom elements use defineCustomElement() instead of the web component wrapper.
  • .sync, $set/$delete, $children and .native are replaced by v-model:
  • The details tab no longer reassigns its share prop, which Vue 3 ignores, and emits the share created on the server instead.
  • The share update queue is marked raw, as p-queue private fields break when accessed through a reactive proxy.
  • Renamed @nextcloud/vue 9 events and refs (update:modelValue, triggerButton) and the password field visible model are used.
  • moment is replaced by Intl based formatting, as for the other Vue 3 bundles, and the uploader comes from @nextcloud/files/upload.

Legacy share actions and sections registered with Vue 2 components by other apps can no longer be rendered, the web component based registerSidebarAction / registerSidebarSection APIs keep working.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@susnux susnux added 3. to review Waiting for reviews feature: sharing ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Nov 5, 2026
@susnux susnux added this to the Nextcloud 36 milestone Nov 5, 2026
@susnux susnux mentioned this pull request Nov 5, 2026
31 of 32 tasks
@susnux
susnux marked this pull request as ready for review November 5, 2026 18:23
@susnux
susnux requested review from a team as code owners November 5, 2026 18:23
@susnux
susnux requested review from Altahrim, GhassenKefi, kristian-zendato, pabzm, salmart-dev and skjnldsv and removed request for a team, Altahrim and salmart-dev November 5, 2026 18:23

@skjnldsv skjnldsv left a comment

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.

Awesome! Looks good overall.

Regarding the now removed sharing APIs here is the search result.
I had a look at who still uses the old APIs. ShareSearch is fine since it doesn't render anything, but ShareTabSections and ExternalShareActions with Vue 2 components will stop showing up:

App API
sharelisting ShareTabSections.registerSection ours, Vue 2
related_resources ShareTabSections.registerSection ours, Vue 2
nc-permalink ShareTabSections.registerSection community
customizing-download-urls ExternalShareActions.registerAction community, stale

Groupfolders, e2ee, activity and files_downloadlimit are already on registerSidebarSection / registerSidebarAction, so they're fine.

Should we add this to the 36 upgrade guide, and maybe log a warning when a legacy section or action gets registered?

@susnux
susnux force-pushed the refactor/files-sharing-vue3 branch from ece0d0a to 6b59d73 Compare November 5, 2026 22:04
@susnux
susnux requested a review from pringelmann November 6, 2026 14:23
All remaining entry points of the app are now built by the Vue 3
frontend. The changes are limited to what Vue 3 and @nextcloud/vue 9
require, components keep their Options API and template style.

- Custom elements use defineCustomElement() instead of the web component
  wrapper, `t`/`n` are provided as global properties like Vue.prototype
  did before, and the other entries mount with createApp().
- `.sync`, `$set`/`$delete`, `$children` and `.native` are replaced by
  `v-model:`, plain assignments, template refs and plain listeners. Refs
  compare raw shares, as entries receive the reactive proxies.
- The details tab no longer reassigns its `share` prop, which Vue 3
  ignores, and emits the share created on the server instead.
- The share update queue is marked raw, as p-queue's private fields
  break when accessed through a reactive proxy.
- Renamed @nextcloud/vue 9 events and refs (`update:modelValue`,
  `triggerButton`) and the password field `visible` model are used.
- moment is replaced by Intl based formatting, as for the other Vue 3
  bundles, and the uploader comes from @nextcloud/files/upload.
- Styles are no longer injected by the bundles, so the entries with
  styles are loaded with Util::addStyle().

Legacy share actions and sections registered with Vue 2 components by
other apps can no longer be rendered, the web component based
registerSidebarAction/registerSidebarSection APIs keep working.

Pre-existing lint findings of the stricter Vue 3 config are moved to its
suppressions baseline instead of restyling the templates.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux force-pushed the refactor/files-sharing-vue3 branch from 4fd46e1 to 2133521 Compare November 6, 2026 15:32
@susnux
susnux merged commit 1b14518 into master Nov 6, 2026
178 of 181 checks passed
@susnux
susnux deleted the refactor/files-sharing-vue3 branch November 6, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted feature: sharing ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants