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

[CLNP-3692] Apply postcss-rtlcss plugin for RTL support #1134

Merged
merged 5 commits into from
Jun 13, 2024

Conversation

AhyoungRyu
Copy link
Contributor

@AhyoungRyu AhyoungRyu commented Jun 12, 2024

To address https://sendbird.atlassian.net/browse/CLNP-3692, applied postcss-rtlcss plugin for the better RTL support without tedious manual CSS style modifications.

What has been done?

  • Added plugin configuration to storybook/main.ts - Allows testing of RTL support during development.
  • Added plugin configuration to rollup.config.js - Ensures build artifacts support RTL languages.
  • Created useHTMLTextDirection custom hook - Applies the dir attribute to modal and dropdown portal components for correct RTL rendering.

Why postcss-rtlcss Plugin?

postcss-rtlcss automates the conversion of LTR CSS to RTL, ensuring consistency and reducing manual errors.
It automates CSS transformation by converting LTR styles to RTL, ensuring proper alignment and display in RTL mode.

You can play around in here https://elchininet.github.io/postcss-rtlcss/ to see what kind of modifications could be made by this plugin.

Copy link

netlify bot commented Jun 12, 2024

Deploy Preview for sendbird-uikit-react ready!

Name Link
🔨 Latest commit 704c90e
🔍 Latest deploy log https://app.netlify.com/sites/sendbird-uikit-react/deploys/666a8636236a4b0008acb8b1
😎 Deploy Preview https://deploy-preview-1134--sendbird-uikit-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@chrisallo chrisallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@bang9
Copy link
Contributor

bang9 commented Jun 13, 2024

Switch

Animation direction might need to be changed

2024-06-13.9.22.40.mov

@bang9
Copy link
Contributor

bang9 commented Jun 13, 2024

TextInput + Mention

It would be good to check how mentions work in RTL as the standard

2024-06-13.9.24.58.mov

@bang9
Copy link
Contributor

bang9 commented Jun 13, 2024

FileViewer + MFM

Icon direction

image

@bang9
Copy link
Contributor

bang9 commented Jun 13, 2024

Amazing plugin!

@AhyoungRyu
Copy link
Contributor Author

@bang9 Great. Thanks for checking the details. Let me check and update :)

@AhyoungRyu
Copy link
Contributor Author

So I made some fixes for these

processKeyFrames boolean false Flip keyframe animations

@AhyoungRyu
Copy link
Contributor Author

I'm merging this into the base branch #1132 🚀

@AhyoungRyu AhyoungRyu merged commit 7cbe2da into feat/CLNP-3674 Jun 13, 2024
8 checks passed
@AhyoungRyu AhyoungRyu deleted the feat/CLNP-3692 branch June 13, 2024 05:58
AhyoungRyu added a commit that referenced this pull request Jun 24, 2024
Applied [postcss-rtlcss
plugin](https://github.com/elchininet/postcss-rtlcss) for the better RTL
support without tedious manual CSS style modifications.

- [x] Added plugin configuration to storybook/main.ts - Allows testing
of RTL support during development.
- [x] Added plugin configuration to rollup.config.js - Ensures build
artifacts support RTL languages.
- [x] Created useHTMLTextDirection custom hook - Applies the dir
attribute to modal and dropdown portal components for correct RTL
rendering.

postcss-rtlcss automates the conversion of LTR CSS to RTL, ensuring
consistency and reducing manual errors.
It automates CSS transformation by converting LTR styles to RTL,
ensuring proper alignment and display in RTL mode.

You can play around in here https://elchininet.github.io/postcss-rtlcss/
to see what kind of modifications could be made by this plugin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants