Page MenuHomePhabricator

Add “indicators” area to Wikibase sitelinks
Open, LowPublic

Description

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>
    <span class="wikibase-sitelinkview-link wikibase-sitelinkview-link-$1">
        <!-- wikibase-sitelinkview-pagename -->
        $4
    </span>                                                            
</li>

(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

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 added a project: patch-welcome.