Page MenuHomePhabricator

Move "Data item" link outside of sidebar toolbox
Open, MediumPublic5 Estimated Story Points

Description

Problem:
When Wikidata started we added the link to the related Wikidata Item to the toolbox section of the sidebar of the article. Later the In Other Projects Sidebar was developed to show links to all the other Wikimedia projects based on Wikidata's sitelinks. However it does not include a link to Wikidata. We didn't want to duplicate the link. Since the In Other Projects Sidebar wasn't enabled everywhere we didn't want to remove it from the toolbox section either.
Now the In Other Projects Sidebar is enabled on all Wikimedia projects. We should move the Wikidata Item link to the In Other Projects section.

Screenshots:

IronMan.png (1×980 px, 203 KB)

BDD
GIVEN a Wikipedia article
WHEN it is connected to a Wikidata Item
THEN link to the Wikidata Item is added to the In Other Projects section
AND link to the Wikidata Item is not added to the Toolbox section

Technical Notes
The link should retain an id to be identifiable by gadgets and user scripts. Suggested id wb-otherproject-wikibase-item
After the switch, some caching issues may happen. If the new link doesn't appear, you can purge the cache by adding "?action=purge" at the end of the page URL.

Details

Reference
bz64315
SubjectRepoBranchLines +/-
mediawiki/extensions/Wikibasemaster+138 -26
mediawiki/extensions/Wikibasemaster+9 -6
mediawiki/extensions/Wikibasemaster+59 -138
mediawiki/extensions/Wikibasemaster+59 -135
mediawiki/extensions/Wikibasemaster+3 -3
mediawiki/extensions/Wikibasemaster+3 -3
mediawiki/extensions/Wikibasemaster+2 -5
mediawiki/extensions/Wikibasewmf/1.34.0-wmf.19+59 -138
mediawiki/extensions/Wikibasewmf/1.34.0-wmf.19+5 -2
mediawiki/extensions/Wikibasemaster+5 -2
mediawiki/extensions/Wikibasemaster+3 -3
mediawiki/extensions/Wikibasemaster+3 -3
mediawiki/extensions/Wikibasemaster+135 -59
Show related patches Customize query in gerrit

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@WMDE-leszek Places that use wikibase-t

amsa@amsa-Latitude-7480:/var/lib/mediawiki$ ssh mwmaint1002.eqiad.wmnet
Linux mwmaint1002 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64
Debian GNU/Linux 9.9 (stretch)
mwmaint1002 is a Mediawiki Maintenance Server: pagetriage extension (mediawiki::maintenance::pagetriage)
mwmaint1002 is a Mediawiki Maintenance Server: parser cache purging (mediawiki::maintenance::parsercachepurging)
mwmaint1002 is a noc.wikimedia.org (noc::site)
The last Puppet run was at Wed Aug 14 14:16:05 UTC 2019 (20 minutes ago). 
Debian GNU/Linux 9 auto-installed on Wed Sep 19 00:33:58 UTC 2018.
Last login: Tue Aug 13 20:59:28 2019 from 2620:0:861:3:208:80:154:86
ladsgroup@mwmaint1002:~$ mwgrep "t-wikibase"
avwiki              MediaWiki:Sidebar-related.js
azbwiki             MediaWiki:Gadget-Extra-Editbuttons.js
azwiki              MediaWiki:Gadget-sidebarRelated.js
azwiki              MediaWiki:Gadget-wikidataHeaderLink.js
azwiki              MediaWiki:Sidebar-related.js
bawiki              MediaWiki:Gadget-sidebarRelated.js
cewiki              MediaWiki:Sidebar-related.js
ckbwiki             MediaWiki:Sidebar-related.js
dewikivoyage        MediaWiki:Gadget-WikivoyageTools.js
euwiki              MediaWiki:Common.js
euwiki              MediaWiki:Vector.css
fawiki              MediaWiki:Gadget-Extra-Editbuttons.js
fawiki              MediaWiki:Sidebar-related.js
fawiki              MediaWiki:TofawikiFinal.js
fawikisource        MediaWiki:Gadget-Extra-Editbuttons.js
fawikivoyage        MediaWiki:Gadget-WikivoyageTools.js
hywiki              MediaWiki:Gadget-relatedIcons.css
hywiki              MediaWiki:Gadget-wikidataHeaderLink.js
incubatorwiki       MediaWiki:Wp/bgn/TobgnwikiFinal.js
inhwiki             MediaWiki:Common.css
itwikisource        MediaWiki:Gadget-editFormAutore.js
itwikisource        MediaWiki:WikidataLink.js
lezwiki             MediaWiki:Common.css
lezwiki             MediaWiki:Sidebar-related.js
plwiki              MediaWiki:Gadget-WikidataInfo.js
pswiki              MediaWiki:TopswikiFinal.js
pswikivoyage        MediaWiki:Gadget-WikivoyageTools.js
ruwiki              MediaWiki:Common.css
ruwiki              MediaWiki:Gadget-common-action-delete.js
ruwiki              MediaWiki:Gadget-relatedIcons.css
ruwiki              MediaWiki:Gadget-sidebarRelated.js
ruwiki              MediaWiki:Gadget-wikidataHeaderLink.js
ruwikiquote         MediaWiki:Gadget-common-action-delete.js
sahwiki             MediaWiki:Gadget-sidebarRelated.js
sdwiki              MediaWiki:TourwikiFinal.js
sourceswiki         MediaWiki:Common.js
svwiki              MediaWiki:Gadget-allauktoritetsdata.js
testwiki            MediaWiki:Gadget-databoxeditor.js
testwikidatawiki    MediaWiki:Guidedtour-tour-wbstatements.js
tgwiki              MediaWiki:Common.css
tgwiki              MediaWiki:Gadget-common-action-delete.js
tgwiki              MediaWiki:Gadget-relatedIcons.css
tgwiki              MediaWiki:Gadget-sidebarRelated.js
udmwiki             MediaWiki:Gadget-relatedIcons.css
udmwiki             MediaWiki:Sidebar-related.js
ukwiki              MediaWiki:Sidebar-related.js
urwiki              MediaWiki:TourwikiFinal.js
uzwiki              MediaWiki:Sidebar-related.js
wikidatawiki        MediaWiki:Gadget-InterProjectLinks.css
wikidatawiki        MediaWiki:Guidedtour-tour-wbstatements.js

(total: 50, shown: 50)

ladsgroup@mwmaint1002:~$ mwgrep "t-wikibase" --user
commonswiki         User:OwenBlacker/common.css
commonswiki         User:VINAY NARASING RAO/common.js
dawiki              User:Steenth/vector.css
dewiki              User:Messerjokke79/vector.css
dewiki              User:Nenntmichruhigip/listOSM.js
dewiki              User:Yellowcard/vector.css
dewiki              User:ZellmerLP/common.css
enwiki              User:Amorymeltzer/modern.css
enwiki              User:Andrew Lorimer/vector.css
enwiki              User:Asav/common.js
enwiki              User:Danski454/wikidata Qnum.js
enwiki              User:Gary/layout.js
enwiki              User:Jayprakash12345/WikidataToolbar.js
enwiki              User:Karima Rafes/findIRIWikidata.js
enwiki              User:Lefverboy/common.css
enwiki              User:Lirnup/common.css
enwiki              User:Ningzailinn/vector.css
enwiki              User:November47/cologneblue.css
enwiki              User:Numbermaniac/common.css
enwiki              User:Pranavkak04/common.js
enwiki              User:PrimeHunter/common.js
enwiki              User:Shonagon/wikidata item.js
enwiki              User:Titodutta/scripts/SearchHelper.js
enwiki              User:WillieGreen721/common.css
enwikinews          User:Numbermaniac/common.css
enwikisource        User:OwenBlacker/common.css
etwiki              User:WikedKentaur/vector.js
fawiki              User:Ladsgroup/fix interwiki.js
frwiki              User:0x010C/script/AppendDatabox.js
frwiki              User:0x010C/script/DataboxEditor.js
frwiki              User:0x010C/script/DataboxEditorDev.js
frwiki              User:AntonierCH/InfoWD.js
frwiki              User:Ayack/AppendDatabox.js
frwiki              User:H4stings/script/AppendDatabox.js
frwiki              User:H4stings/script/AppendFootbox.js
frwiki              User:H4stings/script/DataboxEditor.js
frwiki              User:Reptilien.19831209BE1/js/test.js
frwiki              User:Rexcornot/ScriptWD.js
frwiki              User:Shonagon/numero wikidata.js
frwiki              User:Shonagon/wikidata item.js
frwiki              User:Simon Villeneuve/common.js
frwiki              User:Sukkoria/common.js
frwiki              User:Thierry Caro/script/AppendDatabox.js
frwiki              User:Wangfo/common.js
hewiki              User:Steeve815/wikidataItem.js
hiwikiversity       User:Jayprakash12345/common.css
htwiki              User:Mattho69/vector.js
hywiki              User:ԱշոտՏՆՂ/sidebarRelated.js
itwikisource        User:Alex brollo/common old.js
jawiki              User:Afaz/common.js
jawiki              User:渡辺亜紀子/common.css
kuwiki              User:WîkîBot/vector.js
mediawikiwiki       User:CalNation/common.css
mediawikiwiki       User:Makcmus/common.css
metawiki            User:-xfi-/global.css
metawiki            User:Arybolab/WikidataQuality-system.js
metawiki            User:Cenarium/global.css
metawiki            User:Frog23/global.js
metawiki            User:J ansari/globle.css
metawiki            User:Maxlath/hub.js
metawiki            User:Nw520/VoyageData.js
metawiki            User:Nw520/WikidataOnOsm.js
metawiki            User:Nw520/WikidataUtils.js
metawiki            User:OwenBlacker/global.css
metawiki            User:QueerEcofeminist/global.css
metawiki            User:Salgo60/global.js
metawiki            User:Sobloku/MediaWiki:Gadget-relatedIcons-icoWikipediaAdded.css
metawiki            User:Sobloku/global.css
metawiki            User:Sobloku/lang-weight.css
metawiki            User:Susannaanas/global.js
metawiki            User:Trustable/global.css
metawiki            User:Wargo/global.css
nlwiki              User:Troefkaart/common.css
nnwiki              User:Premeditated/script/DataboxEditor.js
nowiki              User:Soulkeeper/common.js
plwiki              User:Piastu/vector.css
plwiki              User:Zielu20/common.css
ruwiki              User:Alexei Kopylov/old.js
ruwiki              User:Alexei Kopylov/черновик/Gadget-common-action-delete.js
ruwiki              User:Putnik/Sidebar-related.js
ruwiki              User:Putnik/wikidata.js
ruwikisource        User:Sergey kudryavtsev/monobook.js
tewiki              User:Pavan santhosh.s/scripts/SearchHelper.js
ukwiki              User:Bunyk/filmstar.js
wikidatawiki        User:Bene*/common.js
wikidatawiki        User:Ggrefen/DisplayInriaTeam.js
wikidatawiki        User:Ggrefen/LrecDisplayInriaTeam.js
wikidatawiki        User:Jon Harald Søby/autoLastName.js
wikidatawiki        User:Karima Rafes/DisplayCodeWikidata.js
wikidatawiki        User:Karima Rafes/DisplayDataOfWikidata.js
wikidatawiki        User:Salgo60/SPA.js
wikidatawiki        User:Salgo60/Test.js

(total: 92, shown: 92)

Change 530146 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fixed the CSS class of Data item link in client wiki sidebar

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

Change 530373 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Re-add accesskey and title to Data item link in Other project sidebar

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

Change 531479 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Use the backwards-compatible HTML ID for the wikidata item link

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

Change 531479 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use the backwards-compatible HTML ID for the wikidata item link

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

Change 531528 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@wmf/1.34.0-wmf.19] Use the backwards-compatible HTML ID for the wikidata item link

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

Change 531528 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.34.0-wmf.19] Use the backwards-compatible HTML ID for the wikidata item link

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

Mentioned in SAL (#wikimedia-operations) [2019-08-21T18:15:20Z] <tarrow@deploy1001> Synchronized php-1.34.0-wmf.19/extensions/Wikibase/client/: SWAT: [[gerrit:531528|Use the backwards-compatible HTML ID for the wikidata item link (T66315)]] (duration: 00m 58s)

Accesskey and title tooltip are now restored.

Also, in order to not break existing gadget, we've temporarily restored the HTML ID "t-wikibase" to the link element. If you have already changed your script to use different ID, we kindly ask you to change it back to "t-wikibase".

You should inform the communities on this (skin) change. This is necessary because the toolbox item is already vanished but the item in the "other project" list not yet available. We had to make zero-edits to make the new item visible.

It should be mentioned that the "t-wikibase" id is not only used in style sheets but in JavaScript scripts, too. Maybe the new wb-otherproject-wikibase-item class has to be added to other style sheets.

The items in the other projects list are not ordered alphabetically, at least in non-English branches.

@RolandUnger Thanks for you feedback. We are going to look at this as soon as possible.
The change was announced in last week's TechNews, but you're right, we should have announced it on every wikis.

@RolandUnger Can you give me an example of a page where the old link is gone and the new link didn't appear yet?

Change 531654 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Revert "Use the backwards-compatible HTML ID for the wikidata item link"

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

Change 531655 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Revert "Fixed the CSS class of Data item link in client wiki sidebar"

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

Change 531656 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Revert "Add wb-otherprojects-wikibase-item to wikidata item link in other projects"

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

Change 531657 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Revert "Move "Data item" link to In Other Projects sidebar"

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

Change 531659 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Revert "Use the backwards-compatible HTML ID for the wikidata item link" This reverts commit cb8d56cb7cf77f0d11c996ed927ffbbb3dc92416.

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

FYI, 0-edits are not required, purging the cache by adding "?action=purge" at the end of the page URL works as well to make the new link appear.

Change 531677 had a related patch set uploaded (by WMDE-leszek; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@wmf/1.34.0-wmf.19] Revert "Use the backwards-compatible HTML ID for the wikidata item link" This reverts commit cb8d56cb7cf77f0d11c996ed927ffbbb3dc92416.

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

Change 531659 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Revert "Use the backwards-compatible HTML ID for the wikidata item link" This reverts commit cb8d56cb7cf77f0d11c996ed927ffbbb3dc92416.

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

Change 531677 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.34.0-wmf.19] Revert "Use the backwards-compatible HTML ID for the wikidata item link" This reverts commit cb8d56cb7cf77f0d11c996ed927ffbbb3dc92416.

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

Mentioned in SAL (#wikimedia-operations) [2019-08-22T13:27:56Z] <tarrow@deploy1001> Synchronized php-1.34.0-wmf.19/extensions/Wikibase/client/: [[gerrit:531677|Revert "Use the backwards-compatible HTML ID for the wikidata item link" (T230958, T66315)]] (duration: 00m 58s)

Hi everyone. The change moving the "Wikidata item" link to another part of the sidebar has been fully rolled back after discovering the issue of the link sometimes not being visible. Now the "Wikidata link" is back to the Toolbox section of the sidebar as before.

We apologize for the inconvenience that change has caused to Wikisource, Wiktionary and other communities. We haven't predicted the cache being an issue in case of such changes.

We will only re-do the moving of the link to the intended part of the sidebar once we are certain we've resolved the underlying issue with caching.

It should be mentioned that the "t-wikibase" id is not only used in style sheets but in JavaScript scripts, too. Maybe the new wb-otherproject-wikibase-item class has to be added to other style sheets.

Mind explaining what did you mean by adding wb-otherproject-wikibase-item to other style sheets? What style sheets you mean? Apologies for my ignorance, I am not an expert with non-Wikidata wiki specifics.

The items in the other projects list are not ordered alphabetically, at least in non-English branches.

Good point, they're not. This has apparently been the case already. I've found T86328 where it seems the conclusion was to order links using "group ID". That is rather obscure definition, but referring to WMF configuration (https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config/+/refs/heads/master/wmf-config/InitialiseSettings.php#20030) it seems the order decided is as below, where Wikidata is apparently part of "special" group:

  • 'wikipedia',
  • 'wikibooks',
  • 'wikinews',
  • 'wikiquote',
  • 'wikisource',
  • 'wikiversity',
  • 'wikivoyage',
  • 'wiktionary',
  • 'special'

If it was intended to change the ordering, I believe talking to @Lydia_Pintscher / opening a Phabricator request would be the best way forward with it.

@WMDE-leszek, for instance on the French Wikipedia and on the German Wikivoyage we added icons to the items of the "in other project" list to make them more prominent. That's why we added rules to the MediaWiki:Vector.css stylesheet. And that's why I asked to inform the communities to think about additions to other stylesheets.

@Lea_Lacroix_WMDE, because of the rollback I cannot give an example any longer. But we observed these failures both yesterday and today. I know that a purging is possible instead a zero-edit. But both actions have to be done manually by administrators or other authors of many projects which means a huge work for them.

You should keep smaller communities in mind because they have not the manpower to read all messages in the Wikimedia universe, to administrate and keep the Wikis running. And who are really angry that the Wikidata team is not doing their job like in case of T225497.

Change 531654 abandoned by Ladsgroup:
Revert "Use the backwards-compatible HTML ID for the wikidata item link"

Reason:
Done in Iac1bc30b6985f

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

Change 531655 abandoned by Ladsgroup:
Revert "Fixed the CSS class of Data item link in client wiki sidebar"

Reason:
Done in Iac1bc30b6985f

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

Change 531656 abandoned by Ladsgroup:
Revert "Add wb-otherprojects-wikibase-item to wikidata item link in other projects"

Reason:
Done in Iac1bc30b6985f

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

Change 531657 abandoned by Ladsgroup:
Revert "Move "Data item" link to In Other Projects sidebar"

Reason:
Done in Iac1bc30b6985f

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

Change 532363 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Reinstate "Move Data item link outside of sidebar toolbox"

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

Hello everyone,

Here's a new update about this feature. The developers have been working on a way to solve the cache issue. We still need more time to research and evaluate the impact of this change on gadgets, scripts, but also on the documentation (pages, screenshots and various other information places to be updated).
On the top of that, we acknowledge that this feature needs a proper announcement to every single wiki, to make sure that every communities are informed about the change and have time to adapt their tools and documentation if needed. This communication task will take some preparation time in order to be properly done.

Based on these elements, we will postpone the deployment to November or early December.
In case some wiki communities would have the link moved right away, there is a Javascript script that can do that, see T223526#5189640

Thanks for your understanding!

alaa_wmde moved this task from Incoming to Needs Work on the Wikidata-Campsite board.

To figure out a way around caching and/or other stuff before we move on with it later in November/December.

To figure out a way around caching and/or other stuff before we move on with it later in November/December.

AFAIK, the decision was to have both for a month and then drop the toolbox.

AFAIK, the decision was to have both for a month and then drop the toolbox.

This is a technical way/implementation of the change. We are not going to start with it until late 2019 to allow ourselves to communicate the change appropriately to all affected communities, and give all interested parties enough time to adapt.

AFAIK, the decision was to have both for a month and then drop the toolbox.

This is a technical way/implementation of the change. We are not going to start with it until late 2019 to allow ourselves to communicate the change appropriately to all affected communities, and give all interested parties enough time to adapt.

That's a different discussion. We were talking about the ways to get around the bug of link not being showed

This is a technical way/implementation of the change. We are not going to start with it until late 2019 to allow ourselves to communicate the change appropriately to all affected communities, and give all interested parties enough time to adapt.

Due to the communication aspect of this I'll move it to the product column

Recent discussions of this use with editors (c.f. https://en.wikipedia.org/w/index.php?title=Wikipedia:Requests_for_comment/2020_left_sidebar_update&oldid=960644483#Move_Wikidata_to_%22In_other_projects%22 ) that make use of the link, where the feedback was to keep it in tools. Moving it around sections based on external factors may be confusing.

Change 530373 abandoned by Addshore:

[mediawiki/extensions/Wikibase@master] Re-add accesskey and title to Data item link in Other project sidebar

Reason:

Abandoning per "we'll use t-wikibase as back/compat ID for now"

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

Recent discussions of this use with editors (c.f. https://en.wikipedia.org/w/index.php?title=Wikipedia:Requests_for_comment/2020_left_sidebar_update&oldid=960644483#Move_Wikidata_to_%22In_other_projects%22 ) that make use of the link, where the feedback was to keep it in tools. Moving it around sections based on external factors may be confusing.

I'm going to close the related Gerrit changes and flag this up with @Lydia_Pintscher and @Manuel

Change 532363 abandoned by Addshore:

[mediawiki/extensions/Wikibase@master] Reinstate \"Move Data item link outside of sidebar toolbox\"

Reason:

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

I'm going to close the related Gerrit changes and flag this up with @Lydia_Pintscher and @Manuel

Done, and we do still want this so leaving it open

Moving to Investigate to see what happened when this was tried before...