Automattic / Edit-Flow

WordPress plugin to accelerate your editorial workflow
https://editflow.org
359 stars 130 forks source link

Unsubscribing author from Notifications is impossible: Show error or disable unsubscribe checkbox #508

Open jerclarke opened 5 years ago

jerclarke commented 5 years ago

Expected behavior:

Current behavior:

Thoughts:

Proposed UX: AJAX returns red flash and leaves the user ticked

Alternate UX: Disable the checkbox for current author based on a CSS class

Alternate UX 2: Disable checkbox based on currently selected author on screen

Can you replicate the key problem?

Maybe I'm missing something. Would be great just to hear if I'm right about the key premise, that it's impossible to unsubscribe the current author, and the UI lies and says that it is possible.

mikeyarce commented 5 years ago

Thanks for the report, @jerclarke !

Wanted to add a note that there is a filter, ef_notification_auto_subscribe_post_author which can be set to false so the author isn't automatically subscribed to notificaitons. https://github.com/Automattic/Edit-Flow/blob/19a9680518a9fbcca40495c041529cd6ff461dd5/modules/notifications/notifications.php#L522

I think one thing we could do is check this filter, and if it's not false, we disable the checkbox so you are not able to unsubscribe the post author.

jerclarke commented 5 years ago

I think one thing we could do is check this filter, and if it's not false, we disable the checkbox so you are not able to unsubscribe the post author.

Okay yes, this makes sense. We should check this filter before having these effects on the UI otherwise it would just create new confusion.

mikeyarce commented 5 years ago

@jerclarke curious for your thoughts on this proposal:

  1. Let's disable the checkbox for the post_author and add a notice: Screen Shot 2019-08-21 at 12 24 23 PM

If the author is changed, it will auto-subscribe the new author and then disable that new author, but it won't be visible until after the author has been changed.

However, if the post_author is NOT Subscribed (they can click Following from the Post List, we actually enable the checkbox so they can subscribe.

  1. Remove the logic entirely that always subscribes the Current User. Do you see any potential reason to keep this? To me, it seems to add more confusion and complexity and unexpected results.
jerclarke commented 5 years ago

I like that ef_notification_auto_subscribe_post_author is the default. It seems logical to my users and it saves a lot of time that everyone can take it for granted. I don't want to disable ef_notification_auto_subscribe_post_author though I of course can imagine why people would. I think having both options, and the defaults as-is is great.

I just want the box to be disabled if unticking the author isn't going to work.

If they have ef_notification_auto_subscribe_post_author disabled, then the box disablement is disabled too.

Here's a lightweight UI that I think would solve it and match the No Access flag. Getting the "[Post Author]" part to visually match a disabled checkbox is my favorite part:

63485281-88edde80-c457-11e9-9fa1-93dacefaa904
mikeyarce commented 5 years ago

@jerclarke I like your lightweight suggestion for the UI - good idea!

WPprodigy commented 4 years ago

Linking to the new PR for this: https://github.com/Automattic/Edit-Flow/pull/563