Diff for "yellow/MuteButton"

Not logged in - Log In / Register

Differences between revisions 1 and 2
Revision 1 as of 2011-02-18 17:29:35
Size: 2258
Editor: gmb
Comment:
Revision 2 as of 2011-02-18 17:54:13
Size: 2472
Editor: gmb
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
  * '''Solution''': Fix the validation to allow - but not present to the user - for NOTHING subscriptions.   * '''Solution''': Fix the validation to allow - but not present to the user - for NOTHING subscriptions. ([[https://bugs.launchpad.net/launchpad/+bug/721400|Bug]]).
Line 10: Line 10:
  * '''Solution''': Update the Bug Context``Menu entry for the +subscribe link to make it take NOTHING subscriptions into account.   * '''Solution''': Update the Bug Context``Menu entry for the +subscribe link to make it take NOTHING subscriptions into account. ([[https://bugs.launchpad.net/launchpad/+bug/721410|Bug]])
Line 12: Line 12:
  * '''Solution''': The Bug Context``Menu entry for the mute link should also take existing NOTHING subscriptions into account.   * '''Solution''': The Bug Context``Menu entry for the mute link should also take existing NOTHING subscriptions into account (part of the original bug, I think).
Line 15: Line 15:
  * '''Solution''': split the add-a-subscription bits of subscribe_current_user() out from the futz-with-ui bits.   * '''Solution''': split the add-a-subscription bits of subscribe_current_user() out from the futz-with-ui bits ([[https://bugs.launchpad.net/launchpad/+bug/721411|Bug]]).

Mute button

We want to add a mute button to bug pages (Bug 204980), so that people can create a direct subscription with a bug_notification_level of NOTHING without having to know that such a thing actually exists. Of course, this isn't quite as straightforward as it first seemed, so here's my brain dump after what I'm going to disingenuously call an investigation. What little work I did can be found in this (abandoned-but-can-be-resurrected-later) branch: lp:~gmb/launchpad/add-mute-button-bug-204980

Problems to solve

  • You can't actually have a NOTHING subscription, at least as far as the validation for Bug:+subscribe is concerned. If you add a NOTHING subscription using the mute button in the above branch both the +subscribe page and the new advanced FormOverlay will break as a result.

    • Solution: Fix the validation to allow - but not present to the user - for NOTHING subscriptions. (Bug).

  • Muting a bug is actually a case of adding a NOTHING subscription, so we need to make sure that the current subscribe link doesn't show "Edit subscription" after someone has muted their bug.

    • Solution: Update the Bug ContextMenu entry for the +subscribe link to make it take NOTHING subscriptions into account. (Bug)

  • Also, when you've got a NOTHING subscription, the 'mute' link should actually read 'Unmute' and should remove your direct subscription when clicked.
    • Solution: The Bug ContextMenu entry for the mute link should also take existing NOTHING subscriptions into account (part of the original bug, I think).

  • For the sake of simplicity, we shouldn't allow muting direct subscriptions at this point (because we'd then have to track their old BugNotificationLevel for when people unmuted them).

  • We need to refactor the JS in the subscribe_current_user() function so that we can re-use it for muting subscriptions. In my branch I just called subscribe_current_user() from inside my onClick handler for the mute link, but that causes a spinner to appear in place of the Subscribe link, reading 'Subscribing...' which is just plain confusing.
    • Solution: split the add-a-subscription bits of subscribe_current_user() out from the futz-with-ui bits (Bug).

yellow/MuteButton (last edited 2011-02-18 17:54:13 by gmb)