Default wf:issueClass wf:Task shows extra alternatives in table view
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 3
- Avg merge
- 7m
- Merged PRs (30d)
- 3
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in solid-ui src/table.js at inferColumns and the owl:disjointUnionOf handling, then inspect issue-pane settings/mintNew and trackerSettingsForm.ttl. Reproduce the default wf:Task table and trace why ActionItem and Product appear as Status alternatives. Done means the default configuration presents only open and closed, with the behavior covered by an appropriate regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100