Skip to content

Migrate viewer to Vue 3 once Nextcloud's roadmap stabilizes #23

@Jaggob

Description

@Jaggob

Blocked on Nextcloud core. No action right now.

The plugin uses Vue 2 with render functions (see src/viewer-main.js). Nextcloud is in the middle of migrating its own libraries to Vue 3. Doing our own migration too early means doing it twice; doing it too late means breaking when NC drops Vue 2 support.

What changes when we migrate

  • Vue.extend()-style component definition → Composition API or Options API in v3 syntax
  • createElement render functions still work in Vue 3 with minor signature changes (h from vue package)
  • Lifecycle hook renames: beforeDestroybeforeUnmount (we already register both, so partial preparedness)
  • Props validation behaviour subtly different
  • Vue 3 ships ESM-first which fits the new bundler setup

Pre-requisites we should track

  • Nextcloud Server stable target version that requires Vue 3 (currently ambiguous, partial)
  • @nextcloud/vue Vue 3 readiness for the components we use
  • Confirmation that Viewer API (OCA.Viewer.registerHandler) still accepts the same handler shape

When to revisit

  • When Nextcloud announces a concrete version where Vue 2 support is removed
  • Or when we want to use a Vue 3-only @nextcloud/vue component

Scope when done

  • src/viewer-main.js component definition
  • src/embed-main.js (smaller, less coupling)
  • Verify package.json dependencies and remove any Vue 2-only polyfills

Placeholder issue so we don't forget; close as out-of-date if NC's path becomes clear before we get to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:frontendJS/CSS/Vue frontend codeblockedWaiting on external factorpriority:lowWhen time allows / futuretech-debtRefactoring, cleanup, consistency work

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions