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

[Bug] Arrows , Chevrons and Panel icons direction is wrong in RTL languages #6016

Open
alirezaImani-f4L3e opened this issue Feb 11, 2025 · 3 comments
Labels
🐛 Bug Something isn't working | 缺陷 💄 Design Design an style | 样式问题

Comments

@alirezaImani-f4L3e
Copy link

📦 Environment

Docker

📌 Version

1.52.x

💻 Operating System

macOS

🌐 Browser

Chrome

🐛 Bug Description

Arrow , Chevrons and Panel icons direction is wrong when user using RTL languages .

📷 Recurrence Steps

Turn the application language to a RTL language like Arabic or Persian .

🚦 Expected Behavior

Directional icons that are sensitive to orientation should adapt when changing the language.

📝 Additional Information

No response

@alirezaImani-f4L3e alirezaImani-f4L3e added the 🐛 Bug Something isn't working | 缺陷 label Feb 11, 2025
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Feb 11, 2025
@lobehubbot
Copy link
Member

👀 @alirezaImani-f4L3e

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Feb 11, 2025

@alirezaImani-f4L3e Hello there! I'm here to assist you with any bugs, questions, or contributions you may have. Let's tackle this together!

The issue with directional icons not adapting correctly to RTL languages can be addressed by ensuring that the icons are conditionally rendered based on the text direction. In the codebase, the directional icons are styled to adapt to RTL languages by checking the direction context from ConfigProvider.ConfigContext. For example, in the Tool.tsx file, the icons are conditionally set based on the direction:

<Icon
  color={theme.colorTextQuaternary}
  icon={direction === 'rtl' ? LucideSquareArrowLeft : LucideSquareArrowRight}
  size={'large'}
/>

Ensure that similar conditional logic is applied wherever directional icons are used, so they render correctly for RTL languages [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

alirezaImani-f4L3e added a commit to alirezaImani-f4L3e/lobe-chat that referenced this issue Feb 11, 2025
Copy link

dosubot bot commented Feb 11, 2025

The issue with directional icons not adapting correctly to RTL languages can be addressed by ensuring that the icons are conditionally rendered based on the text direction. In the codebase, the directional icons are styled to adapt to RTL languages by checking the direction context from ConfigProvider.ConfigContext. For example, in the Tool.tsx file, the icons are conditionally set based on the direction:

<Icon
  color={theme.colorTextQuaternary}
  icon={direction === 'rtl' ? LucideSquareArrowLeft : LucideSquareArrowRight}
  size={'large'}
/>

Ensure that similar conditional logic is applied wherever directional icons are used, so they render correctly for RTL languages [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 💄 Design Design an style | 样式问题
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants