feat: Add UI button to copy direct message links#13103
Conversation
b56e414 to
ed6ac73
Compare
📝 WalkthroughWalkthroughThe 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/MenuEnvelope.vue (1)
1-4:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUpdate SPDX header to the required repository format
This
.vuefile header does not match the mandated SPDX header template for touched JS/Vue files.As per coding guidelines, "
**/*.{php,js,ts,tsx,vue}: Every file must include an SPDX license header. ... Header format: /* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */".Source: Coding guidelines
🧹 Nitpick comments (1)
src/components/MenuEnvelope.vue (1)
667-670: ⚡ Quick winDe-duplicate/reset the copy-state timeout
Repeated clicks enqueue multiple timers, which can cause stale state flips and inconsistent menu-close timing.
Proposed refactor
data() { return { + copyResetTimer: null, copied: false, } }, ... finally { + if (this.copyResetTimer) { + clearTimeout(this.copyResetTimer) + } - setTimeout(() => { + this.copyResetTimer = setTimeout(() => { this.copied = false this.localMoreActionsOpen = false + this.copyResetTimer = null }, 2000) }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 779cf0e3-cfcd-478f-938a-ca84d05cee6e
📒 Files selected for processing (1)
src/components/MenuEnvelope.vue
ed6ac73 to
62b0de7
Compare
|
Just had a chance to take a look at this, and it looks great! Design wise only 2 small changes:
It is shorter and conveys the same meaning, IMO.
|
Hi @nimishavijay, sure, I like that and can change it right away. Do you suggest to apply these changes and want to start a discussion about it or do you already give me the permission to change it? 🙂 |
|
You can change it now :) I can't speak for the code but @ChristophWurst had pinged me for design in the issue and I am just posting the feedback here :) |
Implements a UI button in the MenuEnvelope to generate and copy a direct link to the message using the new deep link route. Utilizes the standard Nextcloud clipboard fallback via window.prompt for non-secure contexts. Signed-off-by: SoleroTG <github-29h@solero.quietmail.eu>
62b0de7 to
1cb78a3
Compare
|
@nimishavijay, should be changed now |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
This PR provides the frontend UI implementation for message-id deep links, completing the foundational work established in #12632 and the CSRF fix in #12959.
It adds a new action button to the
MenuEnvelopecomponent (the "More actions" menu on a message) to easily copy the generated link.Key implementations:
navigator.clipboard.writeText()for a seamless user experience in secure contexts.showSuccess) is triggered, and the menu icon temporarily changes to a checkmark before the menu closes.window.prompt. This directly mirrors the fallback behavior established in@nextcloud/vue'suseCopycomposable.Resolves #2269
To Test:
...) on any message to open the actions menu.