-
Notifications
You must be signed in to change notification settings - Fork 93
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
Graceful handling of partial SKOS XL data for concept labels #1356
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1356 +/- ##
============================================
+ Coverage 70.68% 71.15% +0.47%
- Complexity 1646 1649 +3
============================================
Files 32 32
Lines 3786 3786
============================================
+ Hits 2676 2694 +18
+ Misses 1110 1092 -18
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handling of concept.xlLabel.properties tooltip for the title row seems to be broken. Examples in the comments. OTOH, this could be merged as a fix to the original bug of concept preflabels not being shown at all.
I tested his with SKOS-XL data and it is indeed an improvement - the labels work now but the tooltips don't. With concept data looking like this:
The result in Skosmos UI looks like this. The labels work and Skosmos picks the right source information from the skosxl:Label object. The tooltips work when they are displayed in the concept information (foreign label info in this case), but the tooltips won't work as part of the title information. |
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
I added more unit tests, now the diff coverage is 100% 📈 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! :)
Reasons for creating this PR
This PR changes the way SKOS XL data for labels is handled. The old code expected that if a concept has some SKOS XL labels, it will have SKOS XL data for all labels. This isn't the case in current YSO where SKOS XL information is added only for a small number of labels. This PR makes the checks for SKOS XL data more careful. Result now looks like this (compare with issue #1346):
Link to relevant issue(s), if any
Description of the changes in this PR
true
when there is non-trivial SKOS XL data available specifically for that concept (prefLabel) / literal valuerdf:type
andskosxl:literalForm
) moved from Twig templates to PHP codedc:
namespace for gettext lookups for properties in thedc11:
namespace also for properties of SKOS XL Labels (this is already done for e.g. regular properties on concepts and it fixes issues displaying the correct labels for Dublin Core metadata)Known problems or uncertainties in this PR
dc:source "Kansalliskirjasto"@fi
in above screenshot), there is no mechanism for trying to find and select the value with the correct language tag; so if there were many similar values in different languages, only one of them would be shownChecklist
.sr-only
class, color contrast)