Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

RTL text rendering in components #594

Closed
3 tasks done
jurokapsiar opened this issue Dec 11, 2018 · 0 comments
Closed
3 tasks done

RTL text rendering in components #594

jurokapsiar opened this issue Dec 11, 2018 · 0 comments
Labels
vsts Paired with ticket in vsts

Comments

@jurokapsiar
Copy link
Contributor

jurokapsiar commented Dec 11, 2018

Feature Request

Problem description

Based on discussion from #5
In general, we need to get to a state where the text nodes are inside of elements that have dir='auto' attribute. This allows the browser to detect the text direction.

Proposed solution

If the text is composed of multiple parts (typically a translation with parameters), each of the parts needs to be separated in element. This is however out of scope for Stardust and should be handled in the i18n layer of the application.

Requirements:

  • use Text component to render any text inside of standard Stardust components
  • Text component renders <span dir='auto>{content} if the type of content is a string
    if user provides HTML/React nodes as an input for the component content, the user is responsible for adding dir='auto' by himself. This needs to be documented
  • revisit applying of truncateStyle in buttonStyles.ts - it needs to be applied even if the content contains or other elements
@jurokapsiar jurokapsiar changed the title RTL text renderingin components RTL text rendering in components Dec 11, 2018
@pkumarie2011 pkumarie2011 added the vsts Paired with ticket in vsts label Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
vsts Paired with ticket in vsts
Projects
None yet
Development

No branches or pull requests

2 participants