-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
WIP - Add bidirectional text support #42471
Conversation
3c1d6da
to
3175ba7
Compare
@nickvergessen May you give me some feedback before I touch other files? |
52a2824
to
455c969
Compare
To make it easier to review such PRs and create a roadmap for bidirectional text support in the entire NextCloud ecosystem, I have proposed to form a kind of working group here: Working Group for Adding Bidirectional Text Support. |
0d5734e
to
6cbe6f4
Compare
@joshtrichards Thanks for updating labels. The development is blocked for now because I need some feedback. Also for the mentioned items in my todo list, I need someone with a better understanding of the ecosystem to make decision. Should I rename CSS classes? Should we keep the class names but change the behavior for now? What about tooltips? If we make decision, I can move forward. We need more discussion, particularly about the roadmap for apps to adapt. If I need to contact any particular person, please let me know. Better to finish this PR sooner and start working on other parts. |
6cbe6f4
to
a5dfcab
Compare
Signed-off-by: ali ghorbani <[email protected]>
Signed-off-by: Mostafa Ahangarha <[email protected]>
Signed-off-by: ali ghorbani <[email protected]>
Signed-off-by: Mostafa Ahangarha <[email protected]>
Signed-off-by: Mostafa Ahangarha <[email protected]>
Signed-off-by: ali ghorbani <[email protected]>
Signed-off-by: Mostafa Ahangarha <[email protected]>
@miaulalala Thanks for your update. There are cases of changing styles or structures because of refactoring. This PR should address them before considering a merge. At this stage, I think the best thing to do is to ensure we are all on the same page. I am looking forward to receiving updates. |
I'm very interested in accomplishing the RTL and BiDi support for Nextcloud and I wish I had the required experience to help on this issue. However, I can help preview the result in the Arabic language as it is my mother's thong. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This sounds more like a separate technical debt issue than something that is a blocker here, right @ahangarha? :) (yes they could be changed, but can be done in a follow-up) Design-wise your pull request looks good, I think the approval needs to come from frontend/server rather. |
Fine by me from what I read, like you said @jancborchardt it needs some frontend/server feedback freom @sorbaugh and team / community. As for the questions/issues
I'd like to get some feedback from developers specifically folks developing apps, for example but not limited to @nickvergessen @ChristophWurst @st3iny @susnux @skjnldsv @juliushaertl @julien-nc @artonge My personal, non-expert view would be to
This would be the least breaking way even though non-adapting apps wouldn't support RTL then for the moment until the move to the new classes. But I think this would be the least invasive way to introduce RTL support for the platform. Does this cover all your points @ahangarha ? |
I agree with @AndyScherzinger Tooltips should be done using the native |
Thank you all for sharing your thoughts. I agree that we must work closely with the design and front-end team. I believe there are some complexities that require to have a clear roadmap to implement such a feature. I believe that this is needed to have a smooth transition with the minimum issues introduced to the existing users. I already proposed the formation of a Working Group for Adding Bidirectional Text Support. I try to be available for further discussion with the team. |
Given that I am one of nextcloud front-end developers and native arabic speaker, I would like to share my point of view on the above:
Indeed, there might be other challenges regarding the implementation and if you could list the ones you have found here, we are happy to discuss them. Regarding RTL support in general, it will be a long process but doable. Using the selected language, we can modify the layout to adapt to RTL reading, like switching left-side bar to the right or icons to the right etc.. If you are looking for specific information on common styles/behavior we are following, I can help narrow down the scope to those that are relevant. |
Just for information: We have finally a method to figure out if RTL is used since last l10n release :) |
@DorraJaouad Thanks for your reply and it is great to have a person in the core team who understands RTL languages.
That is the whole point of me pushing for bidirectional text support rather enforcing direction globally. There are many cases I can list where we have mixed content with RTL and LTR text. One is in the chat. The other is in the apps like note where one may need to not only create a document with mixed content, but also create multiple documents, each with different language. Another case is in apps like Deck where having mixed content is inevitable. We may consider the fact that the same text might be seen by people who use different languages for their NC. The content should render in correct direction regardless of the selected language. In all cases, the direction of each text should be correct. But I agree that sometimes for UX sake, we may enforce text alignment to be set to left or right. But I understand your concern. And if it was that straight forward to address issues, we would have fixed this issue long time ago. This is why I need to work closely with the core and specially the design team. We need to ensure that this gets implemented properly.
I think the new implementation is better because we set the global direction in the body tag. This way, only in the backend we need to make a list for RTL lanaugages, so we wont need to be worried about keeping the list in sync between FE and BE. |
Hi @ahangarha Thanks for all the work and thoughts already. Some comments from organisational point of view:
|
I totally agree with you. Your suggestion is very practical, making it very easy to move forward. I try to plan to work on this issue very soon again. Thanks for making it easy to work on this feature. |
+1 on the need for proper RTL. |
@nickvergessen |
@ahangarha sounds great. I created a Talk room on our Nextcloud instance where you are already having a guest account for any adhoc discussions where Github might not be the right tool and to have a short more chatty communication channel where comments would just polute a PR or Github issue. |
I'm interested as well. Can I join this chat room? |
@ahangarha I took the liberty to go through the pain of rebasing and resolving the conflicts and opened a new PR with a branch from Nextcloud's repository where you have push right at #47343 I would argue for using a in-repo branch which makes life a lot easier in terms of keeping up with the master branch and to have to ability to run all CI actions I did remove any compiled assets from the original commits that created conflicts. So it needs a re-compile. |
@alimahwer sure thing. Do you already have a guest account on that server? |
Not yet. could you pls provide me with the sign-up link. |
|
Summary
This PR is the first step towards adding bidirectional text support to the NextCloud ecosystem. It affects the entire project; accordingly, each app should have subsequent PRs.
The PR is 90+ percent complete. I decided to make the PR to
I had challenges in building the project. Generating
css
files and thedist
directory during development is something I am uncomfortable with.Because of supporting Samsung Internet, I needed to take some hacky approach.
Note:
We must update many components in NextCloud/vue. The most important one was the
header-menu
vue component which is already updated. Others will come soon. First, I need to ensure this PR is getting prepared for merge.Screenshots
TODO
.right
or.menu-left
.core/css/tooltip.scss
and its right|left classesdir
attribute on the body. (help needed)Checklist