New plugin infrastructure for Skosmos 3.0#1790
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1790 +/- ##
=========================================
Coverage 71.02% 71.02%
Complexity 1645 1645
=========================================
Files 33 33
Lines 4314 4314
=========================================
Hits 3064 3064
Misses 1250 1250 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3868d51 to
7d216c0
Compare
osma
left a comment
There was a problem hiding this comment.
Looks very good. I gave a few suggestions for potential improvements - these are mainly aspects where we could do better than just copy the solution from Skosmos 2 directly.
|
I see that SonarCloud has two complaints about use of
(and the same for the Vue plugin) Can these be fixed as well? Sorry I didn't notice this in my earlier review. |
| const updateJsonLD = (conceptHTML) => { | ||
| const JsonLD = document.querySelector('script[type="application/ld+json"]') | ||
| const newJsonLD = conceptHTML.querySelector('script[type="application/ld+json"]') | ||
| const JsonLD = document.querySelector('#json-ld-data') |
There was a problem hiding this comment.
| const JsonLD = document.querySelector('#json-ld-data') | |
| const JsonLD = document.getElementById('json-ld-data') |
| const JsonLD = document.querySelector('script[type="application/ld+json"]') | ||
| const newJsonLD = conceptHTML.querySelector('script[type="application/ld+json"]') | ||
| const JsonLD = document.querySelector('#json-ld-data') | ||
| const newJsonLD = conceptHTML.querySelector('#json-ld-data') |
There was a problem hiding this comment.
| const newJsonLD = conceptHTML.querySelector('#json-ld-data') | |
| const newJsonLD = conceptHTML.getElementById('json-ld-data') |
There was a problem hiding this comment.
getElementById is a method of the document object so it can't be used with the conceptHTML object. This is why I used the querySelector method on both lines.
osma
left a comment
There was a problem hiding this comment.
Maybe fix the SonarCloud warnings and consider my suggestions for use of getElementById. Then this is good for merging 🎉
|



Reasons for creating this PR
Skosmos 3 does not currently have support for plugins. This PR adds new infrastructure for plugins.
Link to relevant issue(s), if any
Description of the changes in this PR
Known problems or uncertainties in this PR
Checklist
.sr-onlyclass, color contrast)