Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
josephguillaume opened this issue Jul 17, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@josephguillaume
Copy link
Contributor

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.

@timbl timbl added the bug Something isn't working label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants