You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change "notify by mail" checkbox to a button with user feedback #29318
For internal sharing we have an option (configurable in sharing settings) to notify the recipient via mail. This currently is a checkbox which is total rubbish in the first place as it's not a value "true/false" but a trigger. Therefore we have to
Move from checkbox to button
Provide user feedback that the mail was sent (not sure about the logic behind that but I would say that we just reuse how it is done when you e.g. trigger a test mail for mail settings or set your mail in personal settings)
Optionally the button would be greyed-out after clicking it until the user opens the sharing dialog again (not required)
We already have spam protection in the mailer logic, right?
Basic mockup (could be implemented a little more beautiful :) )
I'll leave the graphic design details to @felixheidecke to evaluate.
For the interaction, I think it's a good idea to disable it like suggested. For the confirmation, either display the usual top orange notification and/or use a spinner then check mark like we do on the settings page when changing display name. In general I don't expect someone to be able to click twice on this button unless there was an error.
I think internally it stores a flag, so in theory we could even hide the button once the notification was sent. The question is whether it makes sense to let people re-send a notification in case they think the user did not react...
We had another discussion on this. The most important point is that the user gets feedback that the mail is sent. So our solution approach is as follows:
Change checkbox to button "Notify"
On click, mails are sent out (for group shares this can be ~1000 mails in some cases)
Idea: As this can take a while and can be interrupted by e.g. closing the tab, the button text should change to a spinner that changes to a checkmark once the mails were sent out successfully
Keep in mind that the button needs to be hidden when the option in sharing settings is unticked
This is also aligned with the strategy of coming back to "instant actions" in sharing as discussed.
Looking at the current implementation there is sort of a problem.
When notification sending was attempted, even if it failed, it always sets the "mail_send" flag to true.
If the target user has set no email address, it will fail with "Could not send notification to user XYZ" but will still set the sent flag.
So if the button becomes disabled/removed when the flag is set, the user has no chance to resend.
Now if we would allow resend, consider the scenario with group shares. If you have a group with three users "user1, user2, user3" and one of them, user2, has no email address set. Sending a notification would display the error "Could not send notification to user2". Now if we allow resending, it would resend to ALL users again, which might be bad as it would spam the users with notifications.
Best is likely to not allow resending even in these cases.
I'll see if it's possible to forward the reason why sending failed to the error message.
Please note that there is only a single share entry in the DB so we cannot track for which separate users we sent notifications. We can only know whether the share entry (user share or group share) has had its notification sent.
If there are no objections I'll keep the current logic: even if there's an error, we don't allow resending and keep it marked as sent. And try to add more details in the error message.
Ok so here's another idea: if we managed to send an email to at least one user from the list, we mark as sent:
this would cover group shares with some troublesome users, in which case the button would disappear. So no spamming of users who already got a notification.
when there's only a single user and the mail wasn't sent, it would reallow sending
Activity
PVince81 commentedon Oct 20, 2017
I'll leave the graphic design details to @felixheidecke to evaluate.
For the interaction, I think it's a good idea to disable it like suggested. For the confirmation, either display the usual top orange notification and/or use a spinner then check mark like we do on the settings page when changing display name. In general I don't expect someone to be able to click twice on this button unless there was an error.
I think internally it stores a flag, so in theory we could even hide the button once the notification was sent. The question is whether it makes sense to let people re-send a notification in case they think the user did not react...
pmaier1 commentedon Oct 24, 2017
We had another discussion on this. The most important point is that the user gets feedback that the mail is sent. So our solution approach is as follows:
This is also aligned with the strategy of coming back to "instant actions" in sharing as discussed.
PVince81 commentedon Oct 26, 2017
Looking at the current implementation there is sort of a problem.
When notification sending was attempted, even if it failed, it always sets the "mail_send" flag to true.
If the target user has set no email address, it will fail with "Could not send notification to user XYZ" but will still set the sent flag.
So if the button becomes disabled/removed when the flag is set, the user has no chance to resend.
Now if we would allow resend, consider the scenario with group shares. If you have a group with three users "user1, user2, user3" and one of them, user2, has no email address set. Sending a notification would display the error "Could not send notification to user2". Now if we allow resending, it would resend to ALL users again, which might be bad as it would spam the users with notifications.
Best is likely to not allow resending even in these cases.
Please note that there is only a single share entry in the DB so we cannot track for which separate users we sent notifications. We can only know whether the share entry (user share or group share) has had its notification sent.
If there are no objections I'll keep the current logic: even if there's an error, we don't allow resending and keep it marked as sent. And try to add more details in the error message.
PVince81 commentedon Oct 26, 2017
Ok so here's another idea: if we managed to send an email to at least one user from the list, we mark as sent:
PVince81 commentedon Oct 26, 2017
PR here: #29366
lock commentedon Aug 1, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.