You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CLNP-5549] fix: Improve message layout direction hook reliability (#1242)
Aim to fix https://sendbird.atlassian.net/browse/SBISSUE-17616
## Description
Fixed an issue where the `dir` attribute was not being properly applied to message containers. Instead of using DOM manipulation through `useMessageLayoutDirection` hook, implemented a more React-friendly solution by directly setting the `dir` attribute on the message container component.
### Changes
- Removed `useMessageLayoutDirection` hook
- Updated `MessageList` component to directly handle text direction through the `dir` attribute
- Simplified the implementation while maintaining the same functionality
- Ensures proper text direction propagation to child elements
### Testing
Please test the following scenarios:
- Verify text direction changes properly when switching between LTR and RTL by changing the value of `forceLeftToRightMessageLayout` / `hTMLTextDirection`
- Check message alignment in both directions
- Confirm direction changes are properly propagated to child elements
### Note
This change simplifies our approach to handling text direction while maintaining full compatibility with our RTL support system.
0 commit comments