Skip to content

UI: Inventory of widgets #718

@danielbeeke

Description

@danielbeeke

Issue: Expansion of shui Viewers, Editors, and Property Roles

Description

To improve the utility of the shui namespace, we propose the inclusion of additional standard viewers and editors. While the current import of dash provides a strong foundation, modern RDF applications frequently require specialized handling for Markdown, Geospatial data, and complex HTML5 media elements.

Proposed Viewers & Editors

Category Component Description
Media shui:VideoViewer Handles subtitles, captions, and sources via property roles.
shui:AudioViewer Standard audio controls and source management.
shui:PictureViewer Optimized for and with alt-text.
shui:IIIfViewer Specifically for IIIF manifest/image integration.
Geospatial shui:SimpleGeoViewer Basic polygon/shape rendering without maplayer.
shui:MapGeoViewer Interactive map view for one single point or one single polygon.
shui:GeoMultiViewer Layered map view for multiple geo-entities. Uses property roles
shui:GeoEditor Input for WKT or GeoJSON strings.
Code/Markup shui:MarkdownViewer * Renders Markdown literals as HTML.
shui:MarkdownEditor * WYSIWYG or side-by-side Markdown editor.
shui:MermaidViewer * Renders diagram code into visual charts.
shui:JSONViewer Formatted view for rdf:JSON literals.
shui:SPARQLViewer * Syntax highlighting for SPARQL queries.

Handling Complex Media with shui:propertyRole

For complex HTML elements like <picture> or <video>, a flat literal is often insufficient. We propose leveraging shui:propertyRole to map specific properties of a shui:NodeShape to the internal requirements of the viewer.

Example: Picture Multi-Viewer Logic

A NodeShape representing an image could utilize the following new roles:

  • shui:AltRole: Maps a property to the alt attribute.

  • shui:SrcsetRole: Maps a property to responsive image sources.

  • shui:CreditRole: For attribution or captions.


Canonical IRIs for Literals (Question for the Group)

To implement the viewers marked with an asterisk (*), we need to finalize the canonical IRIs for these datatypes. Potential candidates include:

  • Markdown: https://w3id.org/formats/Markdown (or a specific IANA-based URN)

  • Mermaid: https://mermaid.js.org/datatype (?)

  • SPARQL: http://www.w3.org/ns/formats/SPARQL_Query

Proposed New Roles

  • shui:AltRole

  • shui:SubTitleRole

  • shui:CreditRole

  • shui:SrcsetRole

  • shui:GeoRole (To differentiate between primary coordinates and metadata)


Discussion Points

  1. Core widgets vs. comunity: Which of these potential widgets should be in SHACL 1.2 UI?
  2. Missing widgets: Do you have additional widgets that could be in SHACL 1.2 UI?

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIFor SHACL 1.2 UI spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions