refactor(components): rename Vue 2 lifecycle hooks to Vue 3 names - #13393
Draft
GretaD wants to merge 1 commit into
Draft
refactor(components): rename Vue 2 lifecycle hooks to Vue 3 names#13393GretaD wants to merge 1 commit into
GretaD wants to merge 1 commit into
Conversation
Signed-off-by: greta <gretadoci@gmail.com>
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 |
There was a problem hiding this comment.
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()tobeforeUnmount()in multiple components. - Rename
destroyed()tounmounted()inMailbox.vueandOutbox.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() { |
| }, | ||
|
|
||
| beforeDestroy() { | ||
| beforeUnmount() { |
| }, | ||
|
|
||
| beforeDestroy() { | ||
| beforeUnmount() { |
| }, | ||
|
|
||
| destroyed() { | ||
| unmounted() { |
| }, | ||
|
|
||
| beforeDestroy() { | ||
| beforeUnmount() { |
| }, | ||
|
|
||
| destroyed() { | ||
| unmounted() { |
| }, | ||
|
|
||
| beforeDestroy() { | ||
| beforeUnmount() { |
| }, | ||
|
|
||
| beforeDestroy() { | ||
| beforeUnmount() { |
| }, | ||
|
|
||
| async beforeDestroy() { | ||
| async beforeUnmount() { |
| }, | ||
|
|
||
| beforeDestroy() { | ||
| beforeUnmount() { |
GretaD
marked this pull request as draft
July 31, 2026 14:32
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.
part of nextcloud/groupware#64
🤖 AI (if applicable)