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

Improve right-to-left language support in inputs and outputs #24

Open
mapmeld opened this issue Dec 2, 2021 · 3 comments
Open

Improve right-to-left language support in inputs and outputs #24

mapmeld opened this issue Dec 2, 2021 · 3 comments

Comments

@mapmeld
Copy link
Contributor

mapmeld commented Dec 2, 2021

Is your feature request related to a problem? Please describe.

In newer versions of HuggingFace_Hub, text inputs and outputs left-justify their text, when we can add an attribute to automatically detect and adjust for right-to-left language text.

Describe the solution you'd like

recommended

  • Model Page, Widget input: either the <form> or the <span ... role="textbox"> element should have HTML attribute dir="auto" (no css equivalent)
  • Model Page, Text Generation and Speech Recognition output: the <p ... class="alert alert-success"> element should have dir="auto"

less critical

  • Model and Dataset readme: I believe what we had earlier would be JS after the markdown element renders, to select .prose > {h1, h2, h3, h4, p} and apply dir="auto"; the selection is so we don't mess with code / pre / table elements
  • Model Page, Fill-Mask Widget: the <div> around the bar chart could also have dir="auto"
  • Spaces (probably will submit to Gradio) - the user has more control here, so I might just advise the user that they can add direction: rtl CSS to text inputs and outputs
@osanseviero
Copy link
Contributor

cc @mishig25 @gary149

@gary149 gary149 self-assigned this Dec 3, 2021
@julien-c
Copy link
Member

julien-c commented Feb 9, 2022

tagging @severo on this, do you want to take care of this?

@severo severo self-assigned this Feb 10, 2022
@severo
Copy link
Collaborator

severo commented Feb 10, 2022

@adrinjalali adrinjalali transferred this issue from huggingface/huggingface_hub Mar 16, 2022
@severo severo removed their assignment Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants