From 763a9b6aa917917f4d32593548413f916f9740ec Mon Sep 17 00:00:00 2001 From: Sergey Date: Mon, 12 Apr 2021 18:38:33 +0300 Subject: [PATCH] rtl toggler proposal --- text/0000-rtl-ltr-switcher.md | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 text/0000-rtl-ltr-switcher.md diff --git a/text/0000-rtl-ltr-switcher.md b/text/0000-rtl-ltr-switcher.md new file mode 100644 index 0000000..ab1f616 --- /dev/null +++ b/text/0000-rtl-ltr-switcher.md @@ -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 `` 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 + +--