sparna-git / shacl-play

SHACL validation UI, SHACL documentation generator, SHACL generator from RDF.
http://shacl-play.sparna.fr
GNU Lesser General Public License v3.0
24 stars 15 forks source link

"draw" doesn't display diagram #94

Closed VladimirAlexiev closed 6 months ago

VladimirAlexiev commented 1 year ago

There is SVG in the page, and PlantUML source. I've pasted this source in https://github.com/plantuml/plantuml/issues/1376 and you can see the diagram there (it looks perfect). But nothing is displayed in the "show" page. I see these errors in the console:

DevTools failed to load source map: Could not load content for chrome-extension://ffaloebcmkogfdkemcekamlmfkkmgkcf/content_scripts.js.map: System error: net::ERR_BLOCKED_BY_CLIENT
main.js:5 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    at main.js:5:43
    at main.js:7:425
    at main.js:7:431
(anonymous) @ main.js:5
(anonymous) @ main.js:7
(anonymous) @ main.js:7
writer.fd84a220.js:29 Uncaught TypeError: Cannot use 'in' operator to search for 'animation' in undefined
    at ya (writer.fd84a220.js:29:29197)
    at Object.<anonymous> (writer.fd84a220.js:29:29237)
    at we (writer.fd84a220.js:1:514)
    at writer.fd84a220.js:48:4567
    at writer.fd84a220.js:75:754
tfrancart commented 1 year ago

hello @VladimirAlexiev , part of the problem (but only part) is due to line 337 in your file :

        sh:property     []  ;

If you remove this line, then the diagram generation works when generating the complete documentation, but not when generating the diagram alone (from https://shacl-play.sparna.fr/play/doc).

image

We are looking at why it does not work when generating the raw diagram, and we are adding a test so that it does not fail in the situation of line 337

VladimirAlexiev commented 1 year ago

Fixed the blank sh:property. But I still don't see diagram in the generated documentation?

tfrancart commented 1 year ago

Watch out for the URL parameter includeDiagram=true, here is the correct link : https://shacl-play.sparna.fr/play/doc?url=https%3A%2F%2Fgithub.com%2FeuBusinessGraph%2Feubg-data%2Fraw%2Fmaster%2Fmodel%2Febg-shapes.shacl&includeDiagram=true#ebgsh:Identifier

Suggestion for an even better rendering : provide some header metadata (https://shacl-play.sparna.fr/play/doc#ontology)

tfrancart commented 6 months ago

Closing as this is now working correctly, for both diagram generation and documentation generation