SolidOS/issue-pane

Default wf:issueClass wf:Task shows extra alternatives in table view

Opened this issue · 0 comments

If the default wf:Task is used as wf:issueClass, renderTable includes "action item" and "product" in the alternatives for the Status column in addition to "open" and "closed", even though wf:Task is defined as:
https://github.com/solid/issue-pane/blob/a213104dfb997a4592f5ff3fe82c2cc6d85a5f8c/wf.ttl#L46-L47

This occurs because renderTable relies on inferColumns in solid-ui table.js to infer alternatives for each column's selectors, and this just selects all classes that are rdfs:subClassOf wf:Task (https://github.com/solid/solid-ui/blob/c2d0c8aed526db4e35640d9f3d543434a2c310ec/src/table.js#L498)

ActionItem and Product are also defined as rdfs:subClassOf wf:Task
https://github.com/solid/issue-pane/blob/a213104dfb997a4592f5ff3fe82c2cc6d85a5f8c/wf.ttl#L77-L78
https://github.com/solid/issue-pane/blob/a213104dfb997a4592f5ff3fe82c2cc6d85a5f8c/wf.ttl#L139

Presumably this doesn't contradict the owl:disjointUnionOf statement.

A workaround is to use a custom state class instead of wf:Task, e.g.

:states rdfs:subClassOf wf:Task; owl:disjointUnionOf (wf:Open wf:Closed).
wf:Open rdfs:subClassOf :states.
wf:Closed rdfs:subClassOf :states.

(not sure if best practice would require the states to be subclasses of wf:Open and wf:Closed rather than reusing them)

My first impression was that the solution would involve overriding solid-ui table.js' default, but it's not clear whether that's possible.

There is a comment suggesting support for owl:disjointUnionOf (https://github.com/solid/solid-ui/blob/c2d0c8aed526db4e35640d9f3d543434a2c310ec/src/table.js#L1270). However, this part of the code is not reached anyway.
The existing constraint using owl:oneOf (https://github.com/solid/solid-ui/blob/c2d0c8aed526db4e35640d9f3d543434a2c310ec/src/table.js#L1272) would presumably have the same effect too, but specifying wf:Task owl:oneOf (wf:Open wf:Closed) constrains the issue column (rdf:type wf:Task) not the the status column (rdfs:subClassOf wf:Task).

It might be that the solution is to use a different default in settings/mintNew
https://github.com/solid/issue-pane/blob/a213104dfb997a4592f5ff3fe82c2cc6d85a5f8c/trackerSettingsForm.ttl#L24-L28

Happy to try to put together a PR here or at solid-ui if anybody has guidance on what the solution should be.