Page MenuHomePhabricator

[Story] Investigate the Wikibase Client MediaWiki extension
Closed, ResolvedPublic


Understand to what extent the current primary sources tool front-end codebase can be migrated to a Wikibase client:

Event Timeline

Trying vagrant roles: wikidata and wikibase_role (MediaWiki-Vagrant/Roles).

Wikibase is formed by three extensions: Wikibase Repository (repo), Wikibase Client (client) e WikibaseLib (lib).

A possible solution to our task is create a MediaWiki extension: Wikibase Primary Source Tool (folder pst).


  • Use Wikibase View component to access HTML snippets (templates.php). So that the PST fragments are up to date with Wikibase UI (for example in case of code refactoring). The tool will be more maintainable.


  • The Wikibase Primary Source Tool extension should be installed on Wikidata by default. Or create a section in Special:Preferences: a checkbox filed for activate/deactivate the tool.

The naming convention of CSS classes in HTML snippets of Wikibase are related to Wikibase Data Model:
Wikibase/DataModel/JSON#Snaks (here there is jQuery.wikibase code Wikibase View Documentation).

In fact the classes have the name/structure as the model (for example "snakview"). This is a snippet exctracted from

<div class="wikibase-snakview">
   <div class="wikibase-snakview-property-container">
      <div class="wikibase-snakview-property" dir="auto"></div>
   <div class="wikibase-snakview-value-container" dir="auto">
      <div class="wikibase-snakview-typeselector"></div>
      <div class="wikibase-snakview-value wikibase-snakview-variation-valuesnak">
          <a title="Q5" href="/wiki/Q5">human</a></div>

Maybe it can be useful jQuery.wikibase.

A possible solution might be to create a Wikibase extension which uses jQuery.wikibase to manipulate the UI of wikidata item.