Extension:VisualData

From mediawiki.org
MediaWiki extensions manual
VisualData
Release status: stable
Implementation Hook , Special page
Description VisualData is a full-fledged metadata management framework based on json-schema able to easily record, organize and query collection of data on your wiki.
Author(s) (thomas-topway-ittalk)
Latest version 1.0.4 (2024-02-24)
Compatibility policy Master maintains backward compatibility.
MediaWiki >= 1.35.0
License GNU General Public License 2.0 or later
Download
  • $wgVisualDataCreateJobsWarningLimit
  • $wgVisualDataDisableSlotsNavigation
  • $wgVisualDataDisableVersionCheck
  • $wgVisualDataJsonDataTrackingCategory
  • $wgVisualDataEditDataNamespaces
  • $wgVisualDataDisableSidebarLink
  • visualdata-caneditdata
  • visualdata-canmanageschemas
Quarterly downloads 33 (Ranked 115th)
Translate the VisualData extension if it is available at translatewiki.net

VisualData is a full-fledged metadata management framework based on json-schema able to easily record, organize and query collection of data on your wiki.

It is characterized by a strong emphasis on the UI/UX side and aims to present itself as a lightweight or modern alternative to Semantic MediaWiki and Cargo.

Key-features[edit]

  • Based on json-schema and slots
  • forms and pop-up forms auto-generated from json-schema
  • Integrated SchemaBuilder to easily create json-schema compliant schemas, with nested items and OOUI widgets
  • Forms are validated with industry-standard ajv-validator
  • SMW's style inline queries and result formats
  • Can import/store/query large amount of data (with hierarchical structure) in specific articles/the entire wiki, and to rebuild them in minutes

UI elements[edit]

The extension adds the following interface elements to your wiki (some of them only for authorized users and/or sysops)

  • A sidebar section where to access all special pages offered by the extension



  • The action tab "Edit data" by which to assign schemas to article and fill-in them through automatically generated OOUI forms



  • and a namespace tab where to access the slot with json-data registered within an article through the extension



The visibility of each of them can be managed using the global parameters below.


Installation[edit]

  • Download and place the file(s) in a directory called VisualData in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php
wfLoadExtension( 'VisualData' );
  • Run php maintenance/update.php (this will install the required tables)
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Make sure to run

php extensions/VisualData/maintenance/RebuildData.php

after each update of the extension. This will drop/recreate the tables based on the data stored on the wiki

Main sections[edit]

New article UI
Schema Builder & File upload
Edit data
Result formats
Browse data
Maintenance scripts
Maintenance scripts

Rights and privileges[edit]

The extension creates the following user rights. They can be both included manually in the LocalSettings.php or to be managed through the interface (special page Special:UserRights). Sysops and bureaucrats are assigned with the complete set of permissions by default.

Rights[edit]

variable description
visualdata-caneditdata Can edit metadata related to wiki articles by editing/assigning json-schemas to them
visualdata-canmanageschemas Can create/edit/delete schemas through the SchemaBuilder

Example configuration[edit]

$wgGroupPermissions['*']["visualdata-caneditdata"] = true;
$wgGroupPermissions['*']["visualdata-canmanageschemas"] = false;

Groups[edit]

group Can edit data Can manage schemas
sysop, bureaucrat Yes   Yes  
visualdata-admin Yes   Yes  
visualdata-editor Yes   N  

Global parameters[edit]

variable description default
$wgVisualDataDisableSlotsNavigation hide slots tab on the navigation panel false
$wgVisualDataDisableSidebarLink hide VisualData's links section on the sidebar false
$wgVisualDataEditDataNamespaces default namespaces with editable metadata 0, 4 (Main, Project)
$wgVisualDataJsonDataTrackingCategory add a tracking category to articles with data true
$wgVisualDataCreateJobsWarningLimit number of jobs created without emitting a notice 0
$wgVisualDataDisableVersionCheck disable version check of the extension false

Known issues[edit]

  • rename of schema properties is not yet reflected on names within json data and parser functions, so currently property names in schemas, in json data and within parser functions have to be kept in sync manually.
  • queries require that the first printout exists, otherwise the row will not show. This could be solved using DUAL keyword
  • the SchemaBuilder and the form processor does not yet support the directives oneOf, anyOf and support for the $ref keyword
  • table/datatables do not yet provide dynamic navigation, although a navigation may be implemented by users using the limit/offset parameters and variables

Roadmap[edit]

  • handle rename of properties and schemas, constraining the 3 related components (json-schema, json-data, wikitext in forms and/or queries) together
  • Ajax navigation for datatables, SearchPanes and SearchBuilder
  • completing the SchemaBuilder and the form presenter with support for oneOf, anyOf and support for the $ref keyword
  • version control for schemas and related data, so that edits of the schema constrain to the data related to the previous data structure
  • partial editing of schemas and field operations like Firebase's ArrayUnion, ArrayRemove, etc.
  • version control notice shown through Extension:Echo and/or complying better design practice
  • UI for bulk-edit of json data in the BrowseData special page
  • Query builder
  • Preload json-ld/schema.org entities as json-schemas
  • associate json-ld/schema.org vocabulary to user-defined schemas

Support & bugs[edit]

Please post error messages in the Talk page of the extension. Updates will be occasionally posted on the MediaWiki's Wikitech mailing list.

For professional support please write at the email address posted here

See also[edit]

References[edit]

Test it out ![edit]

WikiSphere