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

Bidi support: Structured text at static components is not supported in Carbon components #7291

Closed
amirbrans opened this issue Nov 15, 2020 · 9 comments
Labels
proposal: open This request has gone through triaging. We're determining whether we take this on or not. type: bidi ↔️ type: enhancement 💡

Comments

@amirbrans
Copy link

amirbrans commented Nov 15, 2020

Structured text is a predefined, machine-readable syntax or internal structure in static data. Some elements of the structured text contains Bidi text ( Arabic, Hebrew, Urdu) while others English text. Also, structured text can be bidirectional on some cases.
Common cases for structure text can be found in: file path, breadcrumb, file name, email address, text concatenation etc..
However, Carbon components does not apply structure text processing expected to happen for structure text patterns and as a result can obfuscate its structure, making the text’s display misleading or even incomprehensible.

An example illustrating structure text case with file path:

image

Examples in Carbon components:

  1. File path in label:

image

  1. URL in checkbox

image

@mattrosno , @joshblack , @adir01 FYI

@joshblack
Copy link
Contributor

Hi there @amirbrans! 👋 Could you share a quick CodeSandbox with steps to reproduce so we can make sure this issue is addressed?

@wajnberg
Copy link

wajnberg commented Apr 5, 2021

Hello @joshblack ,

I created this quick sandbox https://codesandbox.io/s/blazing-snow-jnuyh
to illustrate the problem

Please tell me if you need anything else
Thank you

@[email protected]. FYI

@joshblack
Copy link
Contributor

Thanks @wajnberg! 🙏

In terms of the expected outcome, what would need to be provided to the text in order to match the expected behavior? I tried re-creating this with a <span> to see what could applied to the text but couldn't seem to get the expected sequence 🤔

In other words:

<span>http://אבג1/דהו2/זחט3</span>

With dir="rtl" or direction: rtl in CSS didn't seem to work. Curious what your thoughts are here!

@laurenmrice
Copy link
Member

Hi @amirbrans and @wajnberg 👋, just checking in to see if you still have any thoughts on the above?^

@tay1orjones
Copy link
Member

Potentially related to #7264 ?

@adir01
Copy link

adir01 commented Jun 21, 2021

@wajnberg please comment
@tay1orjones yes, it is related to #7264

@wajnberg
Copy link

Hello @laurenmrice @mattrosno and @joshblack

We cannot resolve this problem just by adding css directives like dir=rtl.
Instead we should enclose each segment with <bdi> HTML element.
We have some code which achieves this.
Do you want me to share it with you ?

@joshblack
Copy link
Contributor

Totally agreed on above, I think these issues will fall under the discussion we've been having over in #7264

@sstrubberg sstrubberg added the proposal: open This request has gone through triaging. We're determining whether we take this on or not. label Dec 19, 2022
@tay1orjones
Copy link
Member

Duplicate of #7264

@tay1orjones tay1orjones marked this as a duplicate of #7264 Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal: open This request has gone through triaging. We're determining whether we take this on or not. type: bidi ↔️ type: enhancement 💡
Projects
Archived in project
Development

No branches or pull requests

8 participants