Skip to content

Conversation

@danielbeeke
Copy link

Here is the part of adding SHACL validation and the report to the output.

I exposed the report via a split button. The RDF can still be downloaded despite not conforming to the SHACL shape.

Here is a little screen cast showing the functionality

Screencast.from.2023-12-06.12-17-26.webm

@GerwinBosch GerwinBosch self-requested a review February 20, 2024 11:48
Copy link
Collaborator

@GerwinBosch GerwinBosch left a comment

Choose a reason for hiding this comment

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

@danielbeeke Thanks for your contribution! I don't have a lot of remarks about the code itself, just some UX considerations/suggestions below

  • Could you also add the SHACL report as an asset to the TriplyDB upload?
  • Please resolve the conflicts

Thanks again for your contribution!

P.S. @pietervaneverdingen From the video I'm a bit worried about the intuitiveness of the drag and drop functionality for the SHACL bindings with the current UI. Although, since that is not part of this PR I guess something to discuss at a later stage

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to solve this using CSS's :hover selector? The only issue I can forsee is that you need to be quite specific with the selector?

if (!report.conforms) {
const writer = new Writer()
for (const quad of report.dataset) writer.addQuad(quad)
writer.end((error, result) => setShaclReportTurtle(result))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a comment that this function is synchronous. In most functions, giving a callback indicates asynchronous functionality

Download RDF
</Button>
</Button> :
<SplitButton
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think UX wise, splitting into two makes a bit more sense, as they download separate results. a SHACL report and the transformed output. The split button approach makes more sense if we're talking about the same product. (Unless I missed something and the SHACL report does include the transformed result)

Comment on lines +91 to +93

{shaclConforms === false ? <span><br /><br /><FontAwesomeIcon icon={["fas", "xmark"]} /> The data does not conform to the selected SHACL shape</span> : null}
{shaclConforms === true ? <span><br /><br /><FontAwesomeIcon icon={["fas", "check"]} /> The data does conform to the selected SHACL shape</span> : null}
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be nice to use the mui Alert component for this. This might also offer a "better" place to allow the user to download the SHACL report (either as an action or as a button in the alert)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants