Assign appropriate classes/IDs for lock and global block notices
Closed, ResolvedPublicFeature

Description

Feature summary:

Block notices on Special:Contribs have a wrapper marked with the classes mw-contributions-blocked-notice/mw-contributions-partialblocked-notice, but lock notices and global block notices are not, which makes differentiating them hard.

Use case(s):
Userland customizations.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I'd like to take this one. The GlobalBlocking notice here is built in GlobalBlockingHooks::onSpecialContributionsBeforeMainOutput, which I recently worked on for T381236, so I'll mirror the existing mw-contributions-blocked-notice wrapper pattern for the global block notice and do the same for the lock notice in CentralAuth. Any objection?

Change #1312283 had a related patch set uploaded (by Rajveer42; author: Rajveer42):

[mediawiki/extensions/GlobalBlocking@master] Add mw-globalblocking-contribs-notice class to the contribs block notice

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

Change #1312283 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Add mw-globalblocking-contribs-notice class to the contribs block notice

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

I'd like to take this one. The GlobalBlocking notice here is built in GlobalBlockingHooks::onSpecialContributionsBeforeMainOutput, which I recently worked on for T381236, so I'll mirror the existing mw-contributions-blocked-notice wrapper pattern for the global block notice and do the same for the lock notice in CentralAuth. Any objection?

That makes sense to me, thanks! Leaving this task open for the CentralAuth patch.

I think CheckUser-GlobalContributions has been tagged by mistake, as the task only talks about the notices shown only on Special:Contributions (Special:GlobalContributions does not display them), but please clarify if this is not the case.

@matmarex GlobalContributions does show a lock notice if the target is locked.

Dreamy_Jazz subscribed.

The fix for this likely would be outside CheckUser-GlobalContributions, but if there is feel free to tag that tag again (re-adding Product Safety and Integrity as we own GlobalBlocking)

Change #1317483 had a related patch set uploaded (by Rajveer42; author: Rajveer42):

[mediawiki/extensions/CentralAuth@master] Add mw-centralauth-contribs-locked-notice class to the lock notice

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

NguoiDungKhongDinhDanh is right.

  • SpecialGlobalContributions extends ContributionsSpecialPage and calls parent::execute().
  • parent::execute() fires the SpecialContributionsBeforeMainOutput hook.
  • The CentralAuth handler does not perform any page-specific check.
  • As a result, the lock notice is also displayed on SpecialGlobalContributions.
  • Change 1317483 adds the CSS class in that handler, so it applies to both pages.

The global block notice is different:

  • GlobalBlocking's handler is gated by shouldShowBlockLogExtract().
  • Because of that condition, the global block notice may not appear on SpecialGlobalContributions.
Tgr subscribed.

Thanks for the patches!

Change #1317483 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Add mw-centralauth-contribs-locked-notice class to the lock notice

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