Participating in an issue does not immediately update the subscribe button

Summary

This affects users with notifications enabled for issues that they are participating in. This affects issues that the user has not yet participated in and is not currently subscribed in. After a user participates in an issue for the first time, the Subscribe button does not update to say Unsubscribe until a page refresh.

This lack of correct visual feedback can cause a user to assume that they are not subscribed to the issue, even if the server has them currently marked as participating and implicitly subscribed.

Steps to reproduce

  1. Set notification level to Participate under Profile Settings -> Notifications.
  2. Find an issue that you are not participating in and have not subscribed to.
  3. Click the 👍 button on the issue. (I believe that the server has been notified that this button was clicked, so you are now marked as participating and implicitly subscribed.)
  4. Observe that the button still says Subscribe.
  5. Since you want to receive notifications, click on the Subscribe button. (I believe the server has been notified that this button was clicked, so you are now marked as participating but explicitly unsubscribed.)
  6. Observe that the button now says Unsubscribe.
  7. Refresh the page.
  8. Observe that the button now says Subscribe.

Expected behavior

After clicking 👍, the button changes from Subscribe to Unsubscribe.

Actual behavior

After clicking 👍, the button remains as Subscribe.

Possible fixes

A simple fix is just to immediately update the button after participating (if their notification level is set to Participate).

A better fix, in my opinion, is to stop overloading the meaning of this button. Clicking this button has different effects depending on the current participation status of the user. This is a problem because these effects are not equivalent from the perspective of the user. I would propose adding some other visual element, such as a dropdown menu, to replace the subscribe button. This would inform the user if they are receiving notifications because they explicitly clicked Subscribe or just because they participated. This is discussed further https://gitlab.com/gitlab-org/gitlab-ce/issues/12697#note_17221179

Assignee Loading
Time tracking Loading