Skip to content

refactor(components): rename Vue 2 lifecycle hooks to Vue 3 names - #13393

Draft
GretaD wants to merge 1 commit into
mainfrom
refactor/before-destroy-before-mount
Draft

refactor(components): rename Vue 2 lifecycle hooks to Vue 3 names#13393
GretaD wants to merge 1 commit into
mainfrom
refactor/before-destroy-before-mount

Conversation

@GretaD

@GretaD GretaD commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

part of nextcloud/groupware#64

🤖 AI (if applicable)

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

Signed-off-by: greta <gretadoci@gmail.com>
@hamza221

hamza221 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Wouldn't this break the lifecycle hooks, until we migrate to Vue 3 ?

Edit: only composition APi is backported from vue3 from what I see here https://v2.vuejs.org/v2/guide/migration-vue-2-7

Copilot AI left a comment

Copy link
Copy Markdown

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 attempts to align component lifecycle hook names with Vue 3 terminology by renaming Vue 2 teardown hooks (beforeDestroy / destroyed) to Vue 3 equivalents (beforeUnmount / unmounted) across several Vue components in the Mail frontend.

Changes:

  • Rename beforeDestroy() to beforeUnmount() in multiple components.
  • Rename destroyed() to unmounted() in Mailbox.vue and Outbox.vue.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
src/components/ThreadEnvelope.vue Renames teardown hook to beforeUnmount for timer/listener cleanup.
src/components/Thread.vue Renames teardown hook to beforeUnmount for keydown listener cleanup.
src/components/TextEditor.vue Renames teardown hook to beforeUnmount for editor listener cleanup.
src/components/Outbox.vue Renames teardown hook from destroyed to unmounted for interval cleanup.
src/components/NewMessageModal.vue Renames teardown hook to beforeUnmount for window listener cleanup.
src/components/NavigationMailbox.vue Renames teardown hook to beforeUnmount for drag event bus cleanup.
src/components/MessageHTMLBody.vue Renames teardown hook to beforeUnmount for print hooks/iframe resizer cleanup.
src/components/MessageAttachment.vue Renames teardown hook to beforeUnmount for document click listener cleanup.
src/components/MailboxThread.vue Renames teardown hook to beforeUnmount for timeout cleanup.
src/components/Mailbox.vue Renames teardown hook from destroyed to unmounted for bus/interval cleanup.
src/components/Loading.vue Renames teardown hook to beforeUnmount for timer cleanup.
src/components/EnvelopeList.vue Renames teardown hook to beforeUnmount for drag event bus cleanup.
src/components/DisplayContactDetails.vue Renames teardown hook to beforeUnmount for nested VM destruction.
src/components/Composer.vue Renames teardown hook to beforeUnmount for window listener cleanup.

},

beforeDestroy() {
beforeUnmount() {
Comment thread src/components/Thread.vue
},

beforeDestroy() {
beforeUnmount() {
},

beforeDestroy() {
beforeUnmount() {
Comment thread src/components/Outbox.vue
},

destroyed() {
unmounted() {
},

beforeDestroy() {
beforeUnmount() {
},

destroyed() {
unmounted() {
},

beforeDestroy() {
beforeUnmount() {
},

beforeDestroy() {
beforeUnmount() {
},

async beforeDestroy() {
async beforeUnmount() {
},

beforeDestroy() {
beforeUnmount() {
@GretaD
GretaD marked this pull request as draft July 31, 2026 14:32
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