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

rtl toggler proposal #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions text/0000-rtl-ltr-switcher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
- Start Date: 2021-02-12
- RFC PR: (leave this empty)
- React Cosmos Issue: (leave this empty)

# Summary

RTL / LTR switcher for preview area

# Motivation

Humanity has few languages where writing starts from the right of the page and continues to the left.

Famous UI-kits supports RTL in their component
- https://rsuitejs.com/guide/rtl
- https://material-ui.com/ru/guides/right-to-left/

It will very useful for the developers to have a toggler that can enable RTL and helps to develop universal UI components.

# Detailed design

- Add a toggle button with two states:
1. LTR (default) `arrow-right.svg`
1. RTL (pressed) `arrow-left.svg`
- Assign attribute `dir=rtl` to view-port iframe `<html>` element when the toggle button pressed
https://www.w3.org/International/questions/qa-html-dir

# Drawbacks

--

# Alternatives

set up `dir=rtl` directly in the browser dev tools

# Adoption strategy

--

# How we teach this

--

# Unresolved questions

--