Understand to what extent the current primary sources tool front-end codebase can be migrated to a Wikibase client:
https://www.mediawiki.org/wiki/Extension:Wikibase_Client
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Hjfocs | T166495 [Epic] Front-end redesign | |||
Declined | Hjfocs | T166499 [Story] Avoid dependency on the Wikidata UI | |||
Resolved | Afnecors | T166513 [Story] Investigate the Wikibase Client MediaWiki extension | |||
Resolved | Afnecors | T167025 Install and play with Wikibase |
Event Timeline
Comment Actions
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).
PRO
- 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.
CONS
- 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.
Comment Actions
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 https://www.wikidata.org/wiki/Q7317.
<div class="wikibase-snakview"> <div class="wikibase-snakview-property-container"> <div class="wikibase-snakview-property" dir="auto"></div> </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> </div> </div>
Maybe it can be useful jQuery.wikibase.
Comment Actions
A possible solution might be to create a Wikibase extension which uses jQuery.wikibase to manipulate the UI of wikidata item.