Skip to content
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

Filenames have an ugly "</strong>" printed next to them. #4120

Closed
3 of 4 tasks
joachimhagheim opened this issue Mar 8, 2024 · 3 comments · Fixed by #4125
Closed
3 of 4 tasks

Filenames have an ugly "</strong>" printed next to them. #4120

joachimhagheim opened this issue Mar 8, 2024 · 3 comments · Fixed by #4125
Labels
bug help wanted utils Related to @rjsf/utils

Comments

@joachimhagheim
Copy link
Contributor

joachimhagheim commented Mar 8, 2024

Prerequisites

What theme are you using?

Any

Version

5.17.1

Current Behavior

List of files that have been uploaded contains extra "</strong>" element. Presumably there is either never a starting "<strong>" or the "<strong>" just ends immediately, leaving one extra. The text for the filename is also not bold, it is probably supposed to be bold. Theme does not seem to matter.
image

Expected Behavior

I expect it not to look terrible.

Steps To Reproduce

Literally just add this at the bottom of the "simple" playground project, underneath "telephone":

, "attachments": { "type": "array", "title": "Attachments", "items": { "type": "string", "format": "data-url" } }
Again the theme does not seem to matter, all the ones i've tried have been broken. Well, the functionality works, it just looks terrible.

Environment

Your playground. My project. And presumably anywhere else.

Anything else?

No response

@joachimhagheim joachimhagheim added bug needs triage Initial label given, to be assigned correct labels and assigned labels Mar 8, 2024
@joachimhagheim joachimhagheim changed the title Filenames have an ugly "\</strong>" printed next to them. Filenames have an ugly "</strong>" printed next to them. Mar 8, 2024
@heath-freenome
Copy link
Member

@joachimhagheim Given that we are a small group of volunteers, we really can't fix everything little thing. Are you willing to debug and fix this? The FileInfo widget is using the translateString() implementation with markdown... If you want to fix this easily (hopefully), in the @rjsf/utils package and find the enum.ts and change <strong> and </strong> to the associated markdown (**) I believe this should fix it.

@heath-freenome heath-freenome added help wanted utils Related to @rjsf/utils and removed needs triage Initial label given, to be assigned correct labels and assigned labels Mar 8, 2024
@joachimhagheim
Copy link
Contributor Author

@heath-freenome Your suggested fix seems to work for me locally.

@heath-freenome
Copy link
Member

@joachimhagheim can you provide a PR with the fix for everyone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted utils Related to @rjsf/utils
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants