Skip to content

[DataEntryTable] RTL text slightly cut off and inconsistently indented #4129

@imnasnainaec

Description

@imnasnainaec

In Data Entry, when entering words in a semantic domain, if the vernacular or gloss language is RTL (e.g., Farsi or Arabic), then the initial (right) side of the word can be slightly clipped. Moreover, because the clear-the-text button (x that appears when your cursor is over the textbox), is on the right, the word is indented away from the right edge, but only when it's editable. If the entry has other senses or is protected, the vernacular is greyed out and not-editable, and thus, in the RTL case, not indented.

Farsi examples:
Image
Image

Option A:

In src\utilities\fontComponents.tsx:

  • Modify NormalizedTextField so that the X button is on the other end if document.body.dir === "rtl"
  • Modify TextFieldWithFont so that the X button flips to the other side if the rtl/ltr of the lang prop doesn't match document.body.dir.

Option B:

  • Report to MUI that the TextField doesn't handle RTL scripts well (label, X not switching side; Farsi text clipping)

Option C:

  • In 'ReviewEntriesTable`, manually add an indent if the vernacular box is both RTL and disabled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions