Page MenuHomePhabricator

Mute: Add links to the Tools menu on user pages to mute/unmute user
Closed, ResolvedPublic2 Estimated Story Points

Description

Currently, to configure the mute lists, users must go to Special:Preferences and add the username manually to both the lists. A more streamlined user experience would be to use the Special:Mute page (from T218265: Mute: Add links to disable email and mute specific user to emails sent via Special:EmailUser).


Acceptance criteria

  • In the Tools menu in the left rail (on LTR language wikis), add a new link: Mute preferences
  • This link should only appear for logged-in users and were registered relevant users are found (E.g. Contributions, User talk pages, etc )
  • Clicking on the link should take the user to Special:Mute with the mute checkboxes pre-checked based on current settings of the mute lists:

Event Timeline

Restricted Application added subscribers: MGChecker, Aklapper. · View Herald Transcript

Before doing this, I think we should merge the list, that way we can just say "Mute this user" and "Unmute this user" which is similar to other systems.

Before doing this, I think we should merge the list, that way we can just say "Mute this user" and "Unmute this user" which is similar to other systems.

I agree that this would make the end-user experience a lot more straightforward.

Niharika renamed this task from Mute: Add links to the Tools menu on user pages to mute/unmute emails and notifications to Mute: Add links to the Tools menu on user pages to mute/unmute user.Apr 17 2019, 10:08 PM
Niharika triaged this task as Medium priority.
Niharika updated the task description. (Show Details)

I think I prefer Mute options now that I think about it. :P

I think I prefer Mute options now that I think about it. :P

That was my initial thought. :) Will change.

Change 522017 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@master] Add mute preferences link to the tools menu

https://gerrit.wikimedia.org/r/522017

Change 522017 merged by jenkins-bot:
[mediawiki/core@master] Add mute preferences link to the tools menu

https://gerrit.wikimedia.org/r/522017

dom_walden subscribed.

On the side rail, I see the link for Special:Mute/$user on:

  • User:$user
  • User_talk:$user
  • Special:Contributions/$user
  • Special:Block/$user
  • Special:CentralAuth?target=$user

Assuming $wgEnableSpecialMute = true. Neither $wgEnableUserEmailBlacklist nor $wgEchoPerUserBlacklist has to be true, which means you can see this link even if there is nothing you can do with it. I don't know why you would configure your wiki like this, though.

Also tested with an RTL username on wikis with RTL and LTR content language.

Also with non-default interface language (incl. RTL). (There are no translations yet, though.)

Link only appears when the user you want to mute exists locally. This makes sense as Special:Merge/$user won't work if $user does not exist locally, either.

Did not see any errors in the logs.

Oh, you do also see the Special:Mute link on your own user, user_talk, etc., pages, taking you to Special:Mute for your own user. I don't know what happens when you mute yourself. Not sure if this is a problem.

Assuming $wgEnableSpecialMute = true. Neither $wgEnableUserEmailBlacklist nor $wgEchoPerUserBlacklist has to be true, which means you can see this link even if there is nothing you can do with it. I don't know why you would configure your wiki like this, though.

@dmaza I don't think we should show the link if the page is going to throw an error anyways. It's effectively an access denied (and perhaps we could use that mechanism?).

Oh, you do also see the Special:Mute link on your own user, user_talk, etc., pages, taking you to Special:Mute for your own user. I don't know what happens when you mute yourself. Not sure if this is a problem.

I guess that's technically allowed in Special:Preferences as well? not sure what it would do either.

Assuming $wgEnableSpecialMute = true. Neither $wgEnableUserEmailBlacklist nor $wgEchoPerUserBlacklist has to be true, which means you can see this link even if there is nothing you can do with it. I don't know why you would configure your wiki like this, though.

@dmaza I don't think we should show the link if the page is going to throw an error anyways. It's effectively an access denied (and perhaps we could use that mechanism?).

It shows an error message saying "Mute features are unavailable. This might be because: you haven't confirmed your email address or the wiki administrator has disabled email features and/or email blacklist for this wiki. "
We could check for $wgEnableUserEmailBlacklist but we can't check for $wgEchoPerUserBlacklist. I don't think there is anything we can do really other than what's already in place.

Regarding muting yourself, that's currently allowed on SpecialPreferences and there are no side effects afaik

I don't think there is anything we can do really other than what's already in place.

I don't see why we couldn't have an access check / hook so the link isn't displayed? I think special pages already have this mechanism?

It looks like SpecialPage::userCanExecute() can be overridden to determine if the user has "access". You can get the subpage with $this->par. I can move this to a new ticket if you'd like.

Sure, lets have another task and we can investigate there

I think I prefer Mute options now that I think about it. :P

That was my initial thought. :) Will change.

There is currently an open discussion on the English Wikipedia about the text of this link: https://en.wikipedia.org/wiki/Wikipedia:Requests_for_comment/2020_left_sidebar_update#Mute_preferences_%E2%86%92_Mute_this_user