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

Transition direction for pages ( rtl - ltr ) #266

Closed
Yasser85 opened this issue Jul 18, 2024 · 7 comments · Fixed by #272
Closed

Transition direction for pages ( rtl - ltr ) #266

Yasser85 opened this issue Jul 18, 2024 · 7 comments · Fixed by #272
Labels
enhancement New feature or request Sheet Page as Widget Issues will be answered under this theme

Comments

@Yasser85
Copy link

Yasser85 commented Jul 18, 2024

Ability to choose rtl transition direction when navigate to another page

Hello
I'm working on an app that supports both Right-to-Left and Left-to-Right directions for multi languages by simply wrapping with Directionality widget.
I have a WoltModalSheet with 3 wolt pages in the HomePage.
The sliding animation direction between SliverWoltModalSheetPage is always goes LTR even when I set the direction to RTL in parent widget.
for example:

MaterialApp(
          builder: (context, child) {
            return Directionality(
              textDirection: TextDirection.rtl,
              child: child!,
            );
          },
          home: const HomePage(),
),

I'm not sure if there is a way or some work around to do that, please tell me if there is any.
But it will be nice if there was a direct way to handle the slide direction automatically or manually.
Thanks in advance.

@Yasser85 Yasser85 added the enhancement New feature or request label Jul 18, 2024
@ulusoyca
Copy link
Collaborator

@MbIXjkee ^ Can we add this to our list when we refactor the page?

@ulusoyca ulusoyca added the Sheet Page as Widget Issues will be answered under this theme label Jul 18, 2024
@ulusoyca
Copy link
Collaborator

@Yasser85 Transition direction is currently designed to resemble reading a book. When you open the next page, the page comes from right to left regardless of text direction. When you go to previous page, it comes from left to right similarly. Hence, we will probably won't change the default behavior, but we are working on more customization of the the animations.

@Yasser85
Copy link
Author

@Yasser85 Transition direction is currently designed to resemble reading a book. When you open the next page, the page comes from right to left regardless of text direction. When you go to previous page, it comes from left to right similarly. Hence, we will probably won't change the default behavior, but we are working on more customization of the the animations.

Actually, this is wrong. In all RTL languages (Arabic, Urdu, Farsi, Hebrew, .... ), the books go right to left. Which means when you open the next page, the page comes from left to right.
Also when you use something like page indicator or toggle buttons inside woltsheets to make it easy to navigate between sheets, then changing the active button or current indicator dot will go with the direction (which is RTL in this case), but the animation will go opposite which looks unsurprisingly weird. (I hope the idea is clear)

So, at least if there is a way to disable the transition animation completely, it will be appreciated.

Thanks for the good work and this nice package.

@ulusoyca
Copy link
Collaborator

Thanks! Today I learned something new. On Monday I will discuss with our motions designers 🫡 I will fix this accordingly.

@ulusoyca
Copy link
Collaborator

After discussing with the motion team internally, we realized that this is a bug we should fix.

@ulusoyca ulusoyca reopened this Jul 22, 2024
@Yasser85
Copy link
Author

OK, thank you.

@ulusoyca
Copy link
Collaborator

This is available now as part of 0.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Sheet Page as Widget Issues will be answered under this theme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants