feat: warn users when sending email with empty to field#13152
feat: warn users when sending email with empty to field#13152steven-mpawulo wants to merge 3 commits into
Conversation
Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
ChristophWurst
left a comment
There was a problem hiding this comment.
Thank you for looking into this, @steven-mpawulo!
| async onSend() { | ||
|
|
||
| if (this.selectTo.length === 0) { | ||
| showWarning(t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message.')) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.
Awesome.
Let me update
| </NcSelect> | ||
| </div> | ||
| <div v-if="displayMissingToWarning"> | ||
| <p class="to-warning">{{ t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message') }}</p> |
There was a problem hiding this comment.
We use the BEM structure for classes. Perhaps this could be a composer-fields__helper-text
There was a problem hiding this comment.
Noted.
Let me update this.
|
|
||
| if (this.selectTo.length === 0) { | ||
| this.displayMissingToWarning = true | ||
| } |
There was a problem hiding this comment.
This happens too late. The warning text should be shown every time there are no direct recipients.
There was a problem hiding this comment.
I also considered this but initially ignored it. I’ll update it now.
c4d59c7 to
0ad3191
Compare
…te instead of send-time flag
|
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.) |
Show a warning when the To field is empty during the sending of an email.
fixes #13094.