Sparnatural icon indicating copy to clipboard operation
Sparnatural copied to clipboard

Segregate widget value selection from RDFJs pattern creationg

Open SteinerPascal opened this issue 2 years ago • 1 comments

Currently the widgets come with a certain RDFjs pattern. this limits the widget to a certain pattern if patterns should be added it has to be added in the code. Decouple widgets into two parts.

  1. value selection (list, map, date etc.)
  2. rdfjs creation (values with uris, geo filters, date filter etc.)

It would then be possible to mix them. For example: use to list widget to create geo filters and not only values with URIs.

SteinerPascal avatar Nov 08 '22 10:11 SteinerPascal

The decoupling should be between the widget and the widget value : multiple widgets can produce the same widget value (e.g. List and Autocomplete both produce a URI as a value). Then for a given WidgetValue, the SPARQL generation is always the same. And, in your proposal, the same Widget could produce different WidgetValue but based on which criteria ? I would argue that this would actually correspond to a new kind of Widget (say "ListSelectionGeoWidget"), that has its own code, and then generate the same WidgetValue as the MapWidget.

tfrancart avatar Nov 09 '22 14:11 tfrancart