inveniosoftware / invenio-app-rdm

Turn-key research data management platform.
https://inveniordm.docs.cern.ch
MIT License
100 stars 144 forks source link

featured community: description displays HTML tags #2216

Closed zzacharo closed 1 year ago

zzacharo commented 1 year ago

Package version (if known): latest

Describe the bug

A community with html tags in its description is not properly displayed when featured.

Expected behavior

Display the text without the html tags or properly render the html.

Screenshots (if applicable)

Screenshot 2023-05-12 at 14 49 17

Additional context

Found https://zenodo-rdm-qa.web.cern.ch/communities

slint commented 1 year ago

Actually, this is an issue with the description field in general in data migration... In legacy Zenodo, description was a rich field, but now it's just plain text. If we convert the field to rich text, that's fine with me, but that requires also changes in the creation/update settings forms.

jennur commented 1 year ago

Actually, this is an issue with the description field in general in data migration... In legacy Zenodo, description was a rich field, but now it's just plain text. If we convert the field to rich text, that's fine with me, but that requires also changes in the creation/update settings forms.

@slint I think there are some misunderstandings regarding this task. My understanding is that this was reported as a bug in the frontend, but I think the issue is that these descriptions were added before the field change from rich text to plain text? Thus I believe this issue can be fixed through the community settings in the UI.

If this is the case, I think this task and my PR can be ignored and closed.

(I believe the reason for the change from rich text to plain text was because we added the new about page, and that this description field is now only intended for a sentence or two to show e.g. on the cards etc.)

slint commented 1 year ago

If this is the case, I think this task and my PR can be ignored and closed.

(I believe the reason for the change from rich text to plain text was because we added the new about page, and that this description field is now only intended for a sentence or two to show e.g. on the cards etc.)

Correct, this is a data migration issue, and not a UX issue, sorry for all the trouble 😬.

So the way to solve this is that we migrate both the legacy description and about page field to the page. That means description remains empty.

ntarocco commented 1 year ago

I am not sure that I understand very well the final outcome. I think that it makes sense to have the description field as HTML. Do you want to keep it plain text instead?

jennur commented 1 year ago

I am not sure that I understand very well the final outcome. I think that it makes sense to have the description field as HTML. Do you want to keep it plain text instead?

I don't think it makes sense that it is an HTML field, as it is supposed to be a short (and truncated) description for the cards etc.

slint commented 1 year ago

Ok, a final decision for this one (@ntarocco and @lnielsen, feel free to +1 or comment):


For the Zenodo data migration (to be shelved/moved to zenodo/zenodo-rdm) this has the following consequences:


Example of places where the description appears:

Community search results

image

Community index/splash page + featured communities carousel

image

Community selection modal for inclusion requests

image

github-actions[bot] commented 1 year ago

This issue was automatically marked as stale.