-
Notifications
You must be signed in to change notification settings - Fork 327
feat: warn users when sending email with empty to field #13152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1539,11 +1539,16 @@ | |
| }, | ||
|
|
||
| async onSend() { | ||
|
|
||
| if (this.selectTo.length === 0) { | ||
| showWarning(t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message.')) | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This happens too late. The warning text should be shown every time there are no direct recipients.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also considered this but initially ignored it. I’ll update it now. |
||
|
|
||
| if (this.encrypt) { | ||
| logger.debug('get encrypted message from mailvelope') | ||
| await this.$refs.mailvelopeEditor.pull() | ||
| } | ||
|
|
||
| this.$emit('send', { | ||
| ...this.getMessageData(), | ||
| force: false, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type of warning discussed in #13094 is a conditionally rendered text underneath the recipient input.
It would be something like the helper text of NcTextField https://nextcloud-vue-components.netlify.app/#/Components/NcFields?id=nctextfield but for the NcSelect component. NcSelect might not have this feature at the moment.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. I initially thought you meant displaying an actual warning toast.
For this case, would it be okay to use a simple
<p>element below the NcSelect as helper text and style it accordingly, since NcSelect doesn't seem to support helper text like NcTextField does at the moment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sounds good as workaround.
I've created nextcloud-libraries/nextcloud-vue#8669 to track the missing feature. If we add this later we can switch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
Let me update