Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions shacl12-ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,22 @@ <h3>SHACL Global Configuration</h3>
The preferred label property is determined according to the order of priority in the list from beginning (highest) to end (lowest).
</td>
</tr>
<tr>
<td><code>shui:defaultWidgetScore</code></td>
<td>
The score assigned by <a href="#scoring-algorithm-scoring-graph-preparation">scoring graph preparation</a> to a widget that a shape declares with <code>shui:editor</code> or <code>shui:viewer</code> and that the scoring graph does not otherwise score.
The value of <code>shui:defaultWidgetScore</code> is of datatype <code>xsd:decimal</code> or <code>xsd:integer</code>, which are the datatypes that <code>shui:score</code> permits.
It defaults to <code>40</code>, the score conventionally used for an explicitly declared widget.
</td>
</tr>
Comment on lines +1271 to +1278

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove that part. See #1195

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially thought this wasn't related to the referenced PR, but it turns out it is.

The core question here is: Do we want a shui:defaultWidgetScore that applies when no scoring shapes are added to a widget? Why would we need scoring shapes here? This situation was actually introduced by the merged PR.

To recap what that PR changed:

  • Preserved default behavior: Users can still create widgets without explicit score shapes.
  • Maintained spec compatibility: Hardcoding widgets via shui:editor and shui:viewer is still supported.
  • Preprocessed score graphs: Added score shapes to widgets missing them during a preprocessing phase (aligning with the proposed approach for data-only SHACL renderers without shapes).
  • Simplified scoring outputs: The previous scoring algorithm forced implementations into an awkward state where score and select functions had to return either a single IRI (if best was true) or an array of ScoreResults. This was difficult to implement, hard to read, and led to maintainability concerns. We restructured this to align with the task force’s overall vision. Also slect and score did not differ a lot from each other, but were different enough to need two functions.

It seems @bergos wants the ability to hardcode widgets without relying on the scoring system. These differing architectural viewpoints are currently blocking progress across multiple issues.

Proposal: Before proceeding further, let's explicitly resolve the core architectural questions regarding spec functionality, conformance, and whether we are targeting a single normative core or supporting multiple profiles as that is at the heart of this issue.

<tr>
<td><code>shui:defaultOrder</code></td>
<td>
The <a>effective order</a> assumed for <a>property shapes</a> and property groups that do not specify <code>sh:order</code>, as defined in <a href="#grouping-and-ordering">Grouping, Ordering, and Layout Hints</a>.
The value of <code>shui:defaultOrder</code> is of datatype <code>xsd:decimal</code> or <code>xsd:integer</code>, which are the datatypes that <code>sh:order</code> permits.
Where it is absent, a property shape or property group without <code>sh:order</code> has no <a>effective order</a>.
</td>
</tr>
</tbody>
</table>
<aside class="example" title="Sample Instance Data">
Expand All @@ -1277,7 +1293,9 @@ <h3>SHACL Global Configuration</h3>
shui:defaultNamespace "http://example.com/ns#" ;
shui:languagePreference ("" "en" "de") ;
shui:timeZone "Europe/Vienna" ;
shui:labelPreference (skos:prefLabel dcterms:title rdfs:label) .
shui:labelPreference (skos:prefLabel dcterms:title rdfs:label) ;
shui:defaultWidgetScore 40 ;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove that part. See #1195

shui:defaultOrder 0 .
</div>
</div>
</p>
Expand Down Expand Up @@ -1513,11 +1531,6 @@ <h3>Scoring Graph Preparation</h3>
</div>
</div>
</aside>
<p class="ednote">
The <a>global configuration</a> is defined by
<a href="https://github.com/w3c/data-shapes/pull/900">PR #900</a>, which is not merged yet.
Add `shui:defaultWidgetScore` to its property table once it is.
</p>
<p class="note">
Scoring graph preparation depends only on the <strong>shapes graph</strong> and the <strong>scoring graph</strong>,
not on a focus node or a shape node. It is therefore the same for every call of the score function over those two
Expand Down
Loading