Skip to content

Request for Comment: Text Direction (LTR/RTL) Handling for Page Content #4867

Open
@ssddanbrown

Description

@ssddanbrown

Current Handling

Within the page editor we set a text direction based upon the user's language preference.
If it's a RTL language, we'll load the editor as RTL, with added text direction controls. Otherwise it's shown as LTR.

When viewing page content, we set the direction to auto, meaning the browser will auto infer the content direction based upon the it's written in. From testing experience, this often means direction is inferred from the page name/title.

Current Problems

The difference in edit/display can cause differences in presentation between the editor and page view.
A RTL language editor can save their page, and see content flip if that content is written in English. I believe the reverse would be true too.

I don't think we should try to use auto in the editors, since the content will be changing and provide an unstable/uncontrolled experience.

Proposed Solution

  • Store the text direction against the page entry (much like we do for the editor type now).
    • Defaults to the page creator's language text direction.
  • Use the stored page text direction for display, regardless of viewer user language.
  • Use the stored page text direction for editing, regardless of editor user language.
  • Provide control to change this page text direction.

Questionables

  • Where do we expose the added text-direction control?
  • Should the markdown editor be flipped? Currently the layout is flipped in RTL but the code editor remains LTR.

Input Welcomed

I'd really like some feedback on this, especially as someone not well-versed in RTL languages myself, only familiar with them via supporting them in BookStack. Below are some specific areas I'd like feedback on:

  • Does the proposed solution seem sensible?
  • Are there additional considerations/issues that are not covered by this solution?
  • Could the solution introduce new issues?
  • Response to questionables above.

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