Page MenuHomePhabricator

Add unique CSS class to disambiguation notifications
Closed, ResolvedPublic2 Estimated Story Points

Description

Some users want the ability to hide the disambiguation notification that was introduced with the Disambiguation-Wish-2021 project (T285508). See https://w.wiki/4u8y and https://w.wiki/4u8z.

mw.notification permits passing in an ID, but not a CSS class. Thus we may need to add this ability to it first, since there can be multiple instances of the same type of notification.

Acceptance criteria

Users should be able to hide disambiguation notifications through their personal CSS (i.e. https://meta.wikimedia.org/wiki/Special:MyPage/global.css). The CSS class name is to-be-determined.

Event Timeline

NguoiDungKhongDinhDanh renamed this task from Add unique CSS class to disamiguation notifications to Add unique CSS class to disambiguation notifications.Mar 2 2022, 2:49 AM

Change 767274 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/core@master] mediawiki.notification: add option to append CSS classes to notification

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

Change 767275 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/Disambiguator@master] ext.disambiguator: add CSS class to notification so it can be hidden

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

MusikAnimal set the point value for this task to 2.Mar 2 2022, 4:16 AM
MusikAnimal removed a project: Community-Tech.

Throwing this in the sprint as some last minute maintenance for the Disambiguation project. It's low-risk and should make for an easy code review.

Change 767274 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.notification: add option to append CSS classes to notification

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

Change 767275 merged by jenkins-bot:

[mediawiki/extensions/Disambiguator@master] ext.disambiguator: add CSS class to notification so it can be hidden

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

QA notes:

The goal here is to allow users to modify their personal CSS to hide the notification. This can be done at Special:MyPage/common.css -- where common.css applies to all skins. For example on the Beta English Wikipedia: https://en.wikipedia.beta.wmflabs.org/wiki/Special:MyPage/common.css (make sure you're logged in). Then add the following CSS and save:

.mw-disambiguator-notification { display: none; }

Then the disambiguation notifications should never show, i.e. by typing [[New York]] in the 2010 source editor on any article.

Thanks @MusikAnimal for the QA notes. I was able to verify that the disambiguation notification is disabled when the CSS is added to the user's page

Given the simplicity of this and the QA pass I'm going to go ahead and mark as resolved. I've documented this at mw:Help:Extension:Disambiguator and will let the enwiki users who requested it know about it when it deploys there on Thursday.