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

feat(Android): add ios like ios_from_left slide animation #2328

Merged

Conversation

chrispader
Copy link
Contributor

@chrispader chrispader commented Aug 30, 2024

Description

This PR is based on #1945 and implements the ios animation in the reverse direction (slide in from left to right, slide out from right to left)

Changes

Test code and steps to reproduce

Checklist

@chrispader
Copy link
Contributor Author

We should discuss how we want to name these two "ios-like" animations. Before there was only ios, but now that there are two animations - one for each direction - i renamed ios to ios_from_right and created ios_from_left.

I feel like this is the more consistent approach, compared to the other animations that exist. This would be a breaking change for apps that currently use ios, and therefore would need to be communicated in a new update.

@chrispader chrispader changed the title feat(Android): add ios like ios_from_left slide animation [WIP] feat(Android): add ios like ios_from_left slide animation Aug 30, 2024
@chrispader chrispader changed the title [WIP] feat(Android): add ios like ios_from_left slide animation feat(Android): add ios like ios_from_left slide animation Aug 30, 2024
@kkafar
Copy link
Member

kkafar commented Aug 30, 2024

Hey @chrispader, thanks a lot for a contribution 🙌🏻 I think we might want to take a backwardcompatible approach. Let's keep the old ios stack animation as is, and add two new: ios_from_right & ios_from_left. This way we won't break the compatibility. We can mark the ios one as deprecated & I'll remove it from screens 4.0. What do you think?

@kkafar kkafar self-assigned this Aug 30, 2024
@chrispader
Copy link
Contributor Author

sounds good! @kkafar

@chrispader
Copy link
Contributor Author

Just added back the ios animation option. This just links to the ios_from_right animation on Android.

I also added a depreaction warnings to the comments for ios animation.

@chrispader chrispader force-pushed the @chrispader/ios_from_left_animation branch from 1f9ce7d to b6130c7 Compare August 30, 2024 14:12
@kkafar
Copy link
Member

kkafar commented Sep 3, 2024

Thanks @chrispader, we just waiting for me to have time to test this & I believe we can merge. Thank you!

@chrispader
Copy link
Contributor Author

@kkafar no hurries. We already got this working through a patch in https://github.com/Expensify/App, so this is really only a feature addition to RNS :)

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing 🎉

@kkafar kkafar merged commit f80281b into software-mansion:main Sep 25, 2024
ja1ns pushed a commit to WiseOwlTech/react-native-screens that referenced this pull request Oct 9, 2024
…-mansion#2328)

## Description

<!--
Description and motivation for this PR.

Include Fixes #<number> if this is fixing some issue.

Fixes # .
-->

This PR is based on
software-mansion#1945 and
implements the `ios` animation in the reverse direction (slide in from
left to right, slide out from right to left)

## Changes

<!--
Please describe things you've changed here, make a **high level**
overview, if change is simple you can omit this section.

For example:

- Updated `about.md` docs

-->

<!--

## Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

### Before

### After

-->

## Test code and steps to reproduce

<!--
Please include code that can be used to test this change and short
description how this example should work.
This snippet should be as minimal as possible and ready to be pasted
into editor (don't exclude exports or remove "not important" parts of
reproduction example)
-->

## Checklist

- [x] Included code example that can be used to test this change
- [x] Updated TS types
- [x] Updated documentation: <!-- For adding new props to native-stack
-->
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [x] Ensured that CI passes
kkafar pushed a commit that referenced this pull request Oct 25, 2024
## Description

<!--
Description and motivation for this PR.

Include Fixes #<number> if this is fixing some issue.

Fixes # .
-->

This PR is based on
#1945 and
implements the `ios` animation in the reverse direction (slide in from
left to right, slide out from right to left)

## Changes

<!--
Please describe things you've changed here, make a **high level**
overview, if change is simple you can omit this section.

For example:

- Updated `about.md` docs

-->

<!--

## Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

### Before

### After

-->

## Test code and steps to reproduce

<!--
Please include code that can be used to test this change and short
description how this example should work.
This snippet should be as minimal as possible and ready to be pasted
into editor (don't exclude exports or remove "not important" parts of
reproduction example)
-->

## Checklist

- [x] Included code example that can be used to test this change
- [x] Updated TS types
- [x] Updated documentation: <!-- For adding new props to native-stack
-->
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [x]
https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [x] Ensured that CI passes

(cherry picked from commit f80281b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants