Fix typeahead and handlebars template.#1303
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1303 +/- ##
=========================================
Coverage 69.44% 69.44%
Complexity 1657 1657
=========================================
Files 32 32
Lines 4068 4068
=========================================
Hits 2825 2825
Misses 1243 1243 Continue to review full report at Codecov.
|
|
Kudos, SonarCloud Quality Gate passed!
|
|
Using the code from this PR, the type labels are working for me: I think you have an unrelated problem with those. I tested this and everything seems to be working, so I will merge this PR. It seems to me there are still some minor font style issues (color was already mentioned, but font sizes are also a bit different from before) but those can be handled in separate PRs. |









Reasons for creating this PR
Fix styles and UI behavior, broken in #1182
Link to relevant issue(s), if any
Description of the changes in this PR
I noticed that the data was present for Typeahead to display it, but for some reason we only saw part of the data when values were replaced (e.g. Catalans & Catalan People). I couldn't find anything in the Typeahead docs, but then it occurred to me that it could be now handling templates the same way Vue.js does, by forcing to have a single root-node.
I moved things under a
<div>in the template rendered for each autocomplete entry, and then it finally display all the information received and used in the template.Known problems or uncertainties in this PR
I left a question in Autocomplete problems after Bootstrap 5 upgrade #1301 asking about the color of the text. This is a 1 minute change, just pending a reply over there 👍
@osma I couldn't understand why my types are not being replaced by shorter text. I wonder if it's because I have been using old vocabularies I exported from finto and/or finto.dev?
I set a few breakpoints, and after clearing my local storage, I can confirm the UI is sending a request to
http://localhost:9090/rest/v1/types?lang=ento retrieve types, and is also using the@contextreturned from the autocomplete request.But the right-most information is still using the URI instead of a value like "General Concept" as in your screenshot attached to #1301. See my screenshot below for an example:
It shows skos:Concept, and other URI's instead of a simpler text 😞 . Thanks!
Checklist