Added support for HTML in JSF UI for file description#12318
Conversation
bf89748 to
96433e0
Compare
f6d772c to
094b9d4
Compare
f2a16f3 to
bf5b3b9
Compare
bf5b3b9 to
be235cb
Compare
93e4138 to
80faa68
Compare
|
@pdurbin There is still a bug |
As I mentioned above, the search API is stripping html from the dataset and collection descriptions, but not the file description. So can we make that change in this PR? Or open a new one? |
|
FWIW: As far as I can see, these are all short descriptions. What actually shows in the card is a subset of the description, which may also add highlighting of the search term - seems like both of those could make showing html difficult. |
Yes, I agree, that's why I was asking about creating an issue for the search API to make it consistent (ie strip the html for all descriptions) |
97a9f8c to
6f66c9d
Compare
|
Hey all. Following talks today at standup about this PR, I thought I'd share this GitHub issue about a bug that affects how Dataverse currently highlights search terms on the search cards: #11410 |
6f66c9d to
3bb0cc6
Compare
3bb0cc6 to
c1e3bca
Compare
| </div> | ||
|
|
||
| <h:outputText value="#{Strings:abbreviate(result.descriptionNoSnippet, descriptionAbbreviationThreshold)}" rendered="#{result.descriptionSnippets.size() eq 0}"/> | ||
| <h:outputText value="#{Strings:abbreviate(MarkupChecker:sanitizeBasicHTML(result.descriptionNoSnippet), descriptionAbbreviationThreshold)}" escape="false" rendered="#{result.descriptionSnippets.size() eq 0}"/> |
There was a problem hiding this comment.
For consistency, we want the search card to not have a clickable link, just like the collection card and dataset card.
@ekraffmiller thanks for creating the following issue: |
pdurbin
left a comment
There was a problem hiding this comment.
I believe this is working the way we want now.
|
The HTML in the description for a file landing page is working fine:
As discussed at standup today, we want consistency across search cards. All search cards strip out the HTML like this, which is what we want:
@ekraffmiller created this related issue about the Search API (thanks!): |
| </div> | ||
|
|
||
| <h:outputText value="#{Strings:abbreviate(result.descriptionNoSnippet, descriptionAbbreviationThreshold)}" rendered="#{result.descriptionSnippets.size() eq 0}"/> | ||
| <h:outputText value="#{Strings:abbreviate(MarkupChecker:stripAllTags(result.descriptionNoSnippet), descriptionAbbreviationThreshold)}" escape="false" rendered="#{result.descriptionSnippets.size() eq 0}"/> |
There was a problem hiding this comment.
@stevenwinship - this is a change to the Dataset card, but it looks to me like html already didn't show in search cards for datasets, e.g. for the test dataset in https://demo.dataverse.org/dataverse/jms3d where the description is bolded. What am I missing?




What this PR does / why we need it: SPA already supports html in file description field. JSF UI also needs this functionality.
Which issue(s) this PR closes: #11397
Special notes for your reviewer:
Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Before:
After:

Is there a release notes update needed for this change?: included
Additional documentation: