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-5218] feat: RTL support #203

Merged
merged 30 commits into from
Nov 21, 2024
Merged

[CLNP-5218] feat: RTL support #203

merged 30 commits into from
Nov 21, 2024

Conversation

bang9
Copy link
Collaborator

@bang9 bang9 commented Oct 15, 2024

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team developer-advocates@sendbird.com with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

CLNP-5218

Description Of Changes

Support RTL

import { I18nManager } from 'react-native';

I18nManager.allowRTL(true); // Required to use RTL in app
// I18nManager.forceRTL(true); // Required to test RTL

docs: https://sendbird.atlassian.net/wiki/spaces/SDK/pages/2580578356/RTL+Support+in+React-Native+UIKit

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

@bang9 bang9 self-assigned this Oct 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 3.44828% with 168 lines in your changes missing coverage. Please review.

Project coverage is 11.54%. Comparing base (44cabe5) to head (6148d13).

Files with missing lines Patch % Lines
packages/uikit-utils/src/shared/rtl.ts 23.80% 16 Missing ⚠️
...ct-native-foundation/src/components/Text/index.tsx 0.00% 15 Missing ⚠️
...tive-foundation/src/components/TextInput/index.tsx 0.00% 13 Missing ⚠️
...ges/uikit-react-native/src/libs/MentionManager.tsx 0.00% 11 Missing ⚠️
...ct-native-foundation/src/components/Icon/index.tsx 0.00% 8 Missing ⚠️
...ndation/src/ui/OpenChannelMessage/Message.user.tsx 0.00% 7 Missing ⚠️
...tion/src/ui/OpenChannelMessage/Message.user.og.tsx 0.00% 6 Missing ⚠️
...ParentMessageRenderer/ThreadParentMessage.user.tsx 0.00% 6 Missing ⚠️
packages/uikit-utils/src/hooks/react-native.ts 14.28% 6 Missing ⚠️
...actionBottomSheets/ReactionUserListBottomSheet.tsx 0.00% 5 Missing ⚠️
... and 53 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
- Coverage   11.57%   11.54%   -0.03%     
==========================================
  Files         356      357       +1     
  Lines        8389     8454      +65     
  Branches     2343     2240     -103     
==========================================
+ Hits          971      976       +5     
- Misses       7343     7477     +134     
+ Partials       75        1      -74     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@@ -42,6 +42,15 @@ const ProgressBar = ({ current = 100, total = 100, trackColor, barColor, overlay
return NOOP;
}, [percent]);

const progressBarPosition = (() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The progress bar that displays time should always be positioned on the left.
Therefore, when doLeftAndRightSwapInRTL is true, specifying right: 0 will position it on the left.

@bang9 bang9 force-pushed the feat/rtl branch 2 times, most recently from af7b421 to 140f4c3 Compare October 17, 2024 08:07
@bang9 bang9 changed the title feat: RTL support [CLNP-5218] feat: RTL support Oct 18, 2024
@bang9 bang9 requested a review from OnestarLee October 22, 2024 01:54
Copy link
Collaborator

@OnestarLee OnestarLee 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 bang9 added this pull request to the merge queue Nov 21, 2024
Merged via the queue into main with commit badf23f Nov 21, 2024
7 checks passed
@bang9 bang9 deleted the feat/rtl branch November 21, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants