Page MenuHomePhabricator

Add “indicators” area to Wikibase sitelinks
Open, LowPublic


During community discussion for T95403: [Task] Investigation: Find a good place where to put icons for violation indication, @matej_suchanek suggested that a similar enhancement would also be useful for sitelinks. In addition to the current

<li class="wikibase-sitelinkview wikibase-sitelinkview-$1" data-wb-siteid="$1">                                                                                                               
    <span class="wikibase-sitelinkview-siteid-container">                                                                                                                                     
        <span class="wikibase-sitelinkview-siteid wikibase-sitelinkview-siteid-$1" title="$3">$2</span>                                                                                       
    <span class="wikibase-sitelinkview-link wikibase-sitelinkview-link-$1">
        <!-- wikibase-sitelinkview-pagename -->

(some whitespace added for clarity), there would be an extra span (probably wikibase-sitelinkview-indicators) after the wikibase-sitelinkview-link span, just before the wikibase-sitelinkview list item ends.

This could be used by at least the Move and Preview gadgets, and probably some more user scripts as well.

It looks like this could be done without breaking any existing gadgets or user scripts.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 7 2017, 5:54 PM
Sjoerddebruin added a subscriber: Sjoerddebruin.

I suppose to make this useful, we also need to add a JS hook for when sitelinks are saved (like the existing one for saving statements), so that we can follow the same pattern as recommended for statement indicators: hide the indicators while editing, clear them on save, let gadgets repopulate them after save via the hook.

thiemowmde triaged this task as Low priority.Dec 12 2017, 7:56 AM
thiemowmde added a project: patch-welcome.