Page MenuHomePhabricator

Check for the ReferenceTooltips gadget having a non-canonical name
Open, Needs TriagePublic1 Estimated Story Points

Description

We want a list of possible names of the ReferenceTooltips gadget. This way we can disable it, when a conflicting gadget is active.

@JStrodt_WMDE found a list of wikis that use referenceTooltips in upper and lowercase. This conflicts with what we found before via T234204: Investigation: how many wikis have the ReferenceTooltip Gadget enabled by default?.

Tasks:

  • Run some script and create an up-to-date list of wikis where referenceTooltips is lowercase.
  • Look for other names with a regex like /.*ref.*tool.*/i.
  • Update configuration with what we found.

Outcome

Code: gitlab.com/wmde/gadget-checker
Result: csv | spreadsheet

Implementation

  1. Iterate over all wikis (API libraries)
  2. Look for the gadget in each wiki:
    1. Search through the gadgets of each wiki (via gadget API - example) for the ReferenceTooltip data by applying loose rules which match against script and style files, and gadget name. Overcollect rather than undercollect. Look for other names with a regex like /.*ref.*tool.*/i.
    2. Using the page search to look for raw source for MediaWiki:Gadgets-definition and searching for ReferenceTooltips.js. It's also possible that the javascript file has been renamed.
  3. Store data (wiki, gadget installed: true/false, enabled by default: true/false, custom name) in a suitable form.

Event Timeline

Change 663185 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[operations/mediawiki-config@master] [DNM] ReferenceTooltips gadget names for ReferencePreviews

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

awight renamed this task from referenceTooltips gadget name is not always capitalized to Check for the ReferenceTooltips gadget having a non-canonical name.Feb 10 2021, 12:42 PM
awight updated the task description. (Show Details)
Lena_WMDE set the point value for this task to 3.Feb 10 2021, 2:13 PM

We found more conflicting gadgets:

List of wikis that have the following gadgets activated per default:

WikiGadget
https://af.wikipedia.orgReferenceTooltips
https://am.wikipedia.orgReferenceTooltips
https://ar.wikipedia.orgCiteTooltip
https://as.wikipedia.orgReferenceTooltips
https://az.wikipedia.orgreferenceTooltips
https://ba.wikipedia.orgreferenceTooltips
https://be-tarask.wikipedia.orgReferenceTooltips
https://be.wikipedia.orgReferenceTooltips
https://be.wikisource.orgReferenceTooltips
https://bh.wikipedia.orgReferenceTooltips
https://bn.wikipedia.orgReferenceTooltips
https://bn.wikisource.orgReferenceTooltips
https://bs.wikipedia.orgReferenceTooltips
https://bug.wikipedia.orgReferenceTooltips
https://ca.wikipedia.orgReferenceTooltips
https://ca.wikiquote.orgReferenceTooltips
https://ce.wikipedia.orgreferenceTooltips
https://ckb.wikipedia.orgReferenceTooltips
https://cs.wikipedia.orgReferenceTooltips
https://cs.wikisource.orgReferencePopups
https://cs.wiktionary.orgReferencePopups
https://da.wikipedia.orgReferenceTooltips
https://de.wikisource.orgReferenceTooltips
https://el.wikipedia.orgReferenceTooltips
https://en.wikipedia.orgReferenceTooltips
https://en.wikiversity.orgReferenceTooltips
https://es.wikipedia.orgReferenceTooltips
https://es.wiktionary.orgReferenceTooltips
https://fa.wikipedia.orgReferenceTooltips
https://fi.wikisource.orgReferenceTooltips
https://gl.wikipedia.orgReferenceTooltips
https://gom.wikipedia.orgReferenceTooltips
https://gom.wiktionary.orgReferenceTooltips
https://gu.wikipedia.orgReferenceTooltips
https://gu.wikiquote.orgReferenceTooltips
https://he.wikibooks.orgRefTooltip
https://he.wikinews.orgRefTooltip
https://he.wikipedia.orgCiteTooltip
https://he.wikisource.orgCiteTooltip
https://hi.wikipedia.orgReferenceTooltips
https://hu.wikipedia.orgReferenceTooltips
https://hy.wikipedia.orgReferenceTooltips
https://hyw.wikipedia.orgReferenceTooltips
https://id.wikipedia.orgReferenceTooltips
https://ilo.wikipedia.orgReferenceTooltips
https://is.wikipedia.orgReferenceTooltips
https://it.wikibooks.orgReferenceTooltips
https://it.wikipedia.orgReferenceTooltips
https://it.wikiquote.orgReferenceTooltips
https://it.wikisource.orgReferenceTooltips
https://it.wikiversity.orgReferenceTooltips
https://ja.wikinews.orgReferenceTooltips
https://ja.wikipedia.orgReferenceTooltips
https://ka.wikipedia.orgReferenceTooltips
https://kk.wikipedia.orgReferenceTooltips
https://kn.wikipedia.orgReferenceTooltips
https://kn.wikisource.orgReferenceTooltips
https://ko.wikipedia.orgReferenceTooltips
https://ko.wikisource.orgReferenceTooltips
https://ko.wiktionary.orgReferenceTooltips
https://lez.wikipedia.orgreferenceTooltips
https://lv.wikipedia.orgReferenceTooltips
https://mai.wikipedia.orgReferenceTooltips
https://ml.wikipedia.orgReferenceTooltips
https://ms.wikipedia.orgReferenceTooltips
https://myv.wikipedia.orgreferenceTooltips
https://ne.wikipedia.orgReferenceTooltips
https://nl.wikipedia.orgReferenceTooltips
https://no.wikipedia.orgReferenceTooltips
https://or.wikipedia.orgReferenceTooltips
https://pl.wikipedia.orgReferenceTooltips
https://pl.wiktionary.orgReferenceTooltips
https://pt.wikipedia.orgReferenceTooltips
https://ru.wikibooks.orgreferenceTooltips
https://ru.wikinews.orgreferenceTooltips
https://ru.wikipedia.orgreferenceTooltips
https://ru.wikisource.orgreferenceTooltips
https://sa.wikipedia.orgReferenceTooltips
https://simple.wikipedia.orgReferenceTooltips
https://sk.wikipedia.orgReferenceTooltips
https://sr.wikipedia.orgReferenceTooltips
https://sr.wiktionary.orgReferenceTooltips
https://sv.wikipedia.orgReferenceTooltips
https://sv.wikisource.orgReferenceTooltips
https://ta.wikipedia.orgReferenceTooltips
https://tg.wikipedia.orgreferenceTooltips
https://th.wikipedia.orgReferenceTooltips
https://ti.wikipedia.orgReferenceTooltips
https://tr.wikipedia.orgReferenceTooltips
https://udm.wikipedia.orgreferenceTooltips
https://uk.wikinews.orgReferenceTooltips
https://uk.wikipedia.orgReferenceTooltips
https://uk.wikiquote.orgReferenceTooltips
https://ur.wikipedia.orgReferenceTooltips
https://vec.wikisource.orgReferenceTooltips
https://vi.wikipedia.orgReferenceTooltips
https://zh-yue.wikipedia.orgReferenceTooltips
https://zh.wikipedia.orgReferenceTooltips

These are about 160 of 900 wikis that will never see PagePreviews and ReferencePreviews. Note this list includes a bunch of projects that don't even have the Popups extension enabled at the moment. As of now the extension is only enabled on all the Wikipedias and a few Wikivoyages. I believe it's still a god idea to list all exceptions in https://gerrit.wikimedia.org/r/663185, even for wikis where it currently can't have an effect. The list is not long, maintenance cost is low. This way we/anybody can enable Popups on more wikis without immediately running into duplicate popups.

I believe it's still a god idea to list all exceptions in https://gerrit.wikimedia.org/r/663185, even for wikis where it currently can't have an effect.

That seems right to me, too. Including the exact mapping of each wiki to gadget name now looks fragile and expensive.

Lena_WMDE changed the point value for this task from 3 to 1.Mar 3 2021, 9:13 AM

Change 663185 merged by jenkins-bot:
[operations/mediawiki-config@master] ReferenceTooltips and other gadget names for ReferencePreviews

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

Mentioned in SAL (#wikimedia-operations) [2021-03-03T12:26:06Z] <Urbanecm> urbanecm@deploy1002 Synchronized wmf-config/InitialiseSettings.php: 90a205ffd60c95c4e87b0da46d9d85138ab74455: Add ReferenceTooltips and other gadget names for ReferencePreviews (T274353) (duration: 01m 10s)

To demo:

  • Log into he.wikipedia.org
  • Enable the Reference Previews beta feature
  • Make sure your CiteTooltip gadget is enabled ("הוספת רמז")
  • View an article and hover the footnote. Should be no reference previews (CiteTooltip will not appear either—don't worry, this is intentional!)
  • Disable the gadget.
  • View an article and hover. Reference previews should appear.