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

Add auto alignment option in the Any block protocol #3

Open
3 tasks done
ahmedwael216 opened this issue Jul 24, 2023 · 3 comments
Open
3 tasks done

Add auto alignment option in the Any block protocol #3

ahmedwael216 opened this issue Jul 24, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ahmedwael216
Copy link

Have you read a contributing guide?

  • I have read CONTRIBUTING.md
  • I have searched the existing requests and didn't find any that were similar
  • I have considered creating a pull request instead and want to proceed

Clear and concise description of the problem

As described here me, and others want to add automatic RTL support to AnyType.

Suggested solution

Add a new alignment option:
Auto, that behaves like the HTML dir=auto.

Alternative

This could be handled by the clients just like how android is handling it correctly now.

see this

But I think the correct way is:

  • add auto to any-block
  • add an option for the user/or per space to choose default alignment
  • handle automatic alignment on every client.

Additional context

Honestly, I didn't know what exactly was the best solution, that's why I am opening an issue.

Maybe the team sees this issue as a low priority one and just handling it on every client is enough.

And maybe they see that my proposed solution is better.

Whatever it is, I just want to hear what they are thinking about this.

@ahmedwael216 ahmedwael216 added the enhancement New feature or request label Jul 24, 2023
@fuksman fuksman self-assigned this Jul 30, 2023
@fuksman
Copy link
Member

fuksman commented Jul 30, 2023

Hey @ahmedwael216, thanks for the input! We've discussed this recently and see RTL support as a part of the l10n project. Currently, there are two different streams involved: content-level and app-level.

The content-level is quite similar to what you have described: changing the block direction when the current input source is set to RTL language. However, options at the any-block level will not be sufficient, and implementation at the client level is still required. This means providing a correct layout for checkboxes and lists.

The app-level involves mirroring the entire layout of the app if the user's locale is set to RTL.

@ahmedwael216
Copy link
Author

@fuksman
What I actually want right now is the content level option, and I don't think it's related to l10n because it should be agnostic to AnyType's language.

And I know it will need work at the any-block level + all the clients(and am willing to do it).

quick question: how would we manage this(as PR to the code repos)

  • would we first implement the feature on all clients the add it to all the clients and any-block at the same time?

  • OR can we add it to any-block(because it won't do any harm to the clients RN) then work on the clients one by one?

@fuksman
Copy link
Member

fuksman commented Jul 30, 2023

JFYI: Currently, any-block is a collection of protofiles from anytype-heart. Changes made to these files in anytype-heart are reflected in any-block, but not the other way around. It may seem counterintuitive, but this approach was chosen to quickly fulfill our promise of an open data protocol under the MIT license during the open beta phase.

To make changes to any-block, you need to modify the following files in anytype-heart:

  • pkg/lib/pb/model/protos/models.proto
  • pb/protos/changes.proto
  • pb/protos/events.proto

Considering this, I suggest starting by implementing these changes simultaneously in one client (i.e., anytype-ts) and anytype-heart. The changes will then be reflected in any-block. Afterward, you can proceed with implementing the changes in other repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants