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 docs page for Reanimated Swipeable #2962

Merged
merged 10 commits into from
Jul 31, 2024

Conversation

latekvo
Copy link
Contributor

@latekvo latekvo commented Jun 26, 2024

This PR adds documentation page for the new Reanimated Swipeable component.

@latekvo
Copy link
Contributor Author

latekvo commented Jun 26, 2024

  1. Should the vanilla swipeable docs reference the new ones?
  2. Should the vanilla swipeable be marked as deprecated or not recommended?
  3. Do the new docs require any additional details besides the ones that i already added?
    (c.c. @j-piasecki )

@latekvo latekvo marked this pull request as ready for review June 27, 2024 07:52
Copy link
Member

@j-piasecki j-piasecki left a comment

Choose a reason for hiding this comment

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

You can also add type definitions to the props and update parts that relate to the old Animated api.

docs/docs/components/reanimated_swipeable.md Outdated Show resolved Hide resolved
docs/docs/components/reanimated_swipeable.md Outdated Show resolved Hide resolved
docs/docs/components/reanimated_swipeable.md Outdated Show resolved Hide resolved
docs/docs/components/reanimated_swipeable.md Outdated Show resolved Hide resolved
docs/docs/components/reanimated_swipeable.md Outdated Show resolved Hide resolved
docs/docs/components/reanimated_swipeable.md Outdated Show resolved Hide resolved
@j-piasecki
Copy link
Member

Should the vanilla swipeable docs reference the new ones?

It would be nice to show a warning that the new one should be used.

Should the vanilla swipeable be marked as deprecated or not recommended?

I think we can deprecate it (cc @m-bert)

Do the new docs require any additional details besides the ones that i already added?

See review above

@m-bert
Copy link
Contributor

m-bert commented Jun 27, 2024

Yes, I think we can deprecate old swipeables 😅

@latekvo latekvo requested a review from j-piasecki July 1, 2024 14:15
Copy link
Member

@j-piasecki j-piasecki left a comment

Choose a reason for hiding this comment

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

LGTM, please don't merge yet. It will get published automatically ReanimatedSwipeable hasn't been released yet.

docs/docs/components/reanimated_swipeable.md Show resolved Hide resolved
docs/docs/components/reanimated_swipeable.md Show resolved Hide resolved

progress: [0, 1]

drag: [0, +]
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand the [0, +], [0, -] notation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It means these values travel from 0 to positive infinity and from 0 to negative infinity respectively.
I copied this notation from the legacy Swipeable docs for consistency, but i can write it down differently if you'd prefer.

Copy link
Contributor

Choose a reason for hiding this comment

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

[0, +] is not that bad, but [0, -] is confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is [0, +∞] and [0, -∞] fine?

Copy link
Contributor

Choose a reason for hiding this comment

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

What I meant is not the infinity sign, but rather the notation of [0, -∞] (it doesn't follow formal definition of interval). I'm not sure though if that is what @kacperkapusciak meant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey so what's the verdict on this issue?

As far as I see, the formal way would be to note it this way: (-∞, 0] and [0, +∞)
But since here, it represents a mapping from input to output, i think [0, -∞) and [0, +∞) would be more readable.

Please let me know, which one you think would work better @m-bert.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I don't like [0, -∞) because it looks very unnatural to me. On the other hand I cannot think of any better idea 😞 One could argue that if we only talk about input and output range, we could leave formal notation (but it is not a strong argument)

Anyway, it was @kacperkapusciak who has started this discussion and I want to know what's his stance on this

@latekvo latekvo merged commit ff5e23c into main Jul 31, 2024
3 checks passed
@latekvo latekvo deleted the @latekvo/add_reanimated_swipeable_docs branch July 31, 2024 11:30
github-merge-queue bot pushed a commit to valora-inc/wallet that referenced this pull request Aug 6, 2024
…5714)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[react-native-gesture-handler](https://github.com/software-mansion/react-native-gesture-handler)
| [`^2.17.1` ->
`^2.18.1`](https://renovatebot.com/diffs/npm/react-native-gesture-handler/2.17.1/2.18.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-gesture-handler/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-gesture-handler/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-gesture-handler/2.17.1/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-gesture-handler/2.17.1/2.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>software-mansion/react-native-gesture-handler
(react-native-gesture-handler)</summary>

###
[`v2.18.1`](https://github.com/software-mansion/react-native-gesture-handler/releases/tag/2.18.1)

[Compare
Source](https://github.com/software-mansion/react-native-gesture-handler/compare/2.18.0...2.18.1)

#### 🐛 Bug fixes

- Fix build on RN 0.74 by [@&#8203;m-bert](https://github.com/m-bert)
in
[software-mansion/react-native-gesture-handler#3024

#### What's Changed

- Bump ws from 6.2.2 to 6.2.3 in /example by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#3003
- Bump requirejs from 2.3.6 to 2.3.7 by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#3009
- Bump fast-xml-parser from 4.2.5 to 4.4.1 by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#3016
- Bump ws from 6.2.2 to 6.2.3 in /docs by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#3021
- Add documentation page for `Pressable` component by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#2992
- Add docs page for Reanimated Swipeable by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#2962

**Full Changelog**:
software-mansion/react-native-gesture-handler@2.18.0...2.18.1

###
[`v2.18.0`](https://github.com/software-mansion/react-native-gesture-handler/releases/tag/2.18.0)

[Compare
Source](https://github.com/software-mansion/react-native-gesture-handler/compare/2.17.1...2.18.0)

#### ❗ Important changes

- Create a separate component out of the new Swipeable row by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#2936
- Create gesturized pressable component by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#2942,
[software-mansion/react-native-gesture-handler#2977,
[software-mansion/react-native-gesture-handler#2982,
[software-mansion/react-native-gesture-handler#2981
- Support for React Native 0.75 by
[@&#8203;j-piasecki](https://github.com/j-piasecki) in
[software-mansion/react-native-gesture-handler#2966

#### 👍 Improvements

- \[macOS] Add `ForceTouch` warning by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#2954
- Remove shared value read on the JS thread during detector update by
[@&#8203;j-piasecki](https://github.com/j-piasecki) in
[software-mansion/react-native-gesture-handler#2957
- Use a newer constructor for all Gesture Handler events on Android by
[@&#8203;j-piasecki](https://github.com/j-piasecki) in
[software-mansion/react-native-gesture-handler#2967
- Persist rotation and pinch gesture through pointer changes on android
by [@&#8203;coado](https://github.com/coado) in
[software-mansion/react-native-gesture-handler#2983
- \[macOS] Add `NativeViewGestureHandler` by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#3004
- Add `enabled` prop support to swipeable by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#3011

#### 🐛 Bug fixes

- Make handler comparator work only on non-null objects by
[@&#8203;j-piasecki](https://github.com/j-piasecki) in
[software-mansion/react-native-gesture-handler#2964
- fix: bind scope to null to prevent issues with inline requires by
[@&#8203;EvanBacon](https://github.com/EvanBacon) in
[software-mansion/react-native-gesture-handler#2972
- Replace `queueMicrotask` with `requestAnimationFrame` by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#2969
- Resolve circular dependencies on JS side by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#2970
- Fix Android native buttons emitting 2 press events when talkback is
enabled by [@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#3002
- Fix `ScrollView` intercepting touches through out-of-bounds children
by [@&#8203;j-piasecki](https://github.com/j-piasecki) in
[software-mansion/react-native-gesture-handler#3017
- Change `onPress` argument in buttons by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#3006
- \[macOS] Fix handlers not responding after opening context menu by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#3008
- \[iOS | macOS] Fix translation calculation in `LongPress` by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#3013
- Fix cancelling manual activation gestures blocking interactivity on
iOS by [@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#3007

#### 🔢 Miscellaneous

- Bump ws from 6.2.2 to 6.2.3 in /FabricExample by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#2949
- Bump braces from 3.0.2 to 3.0.3 in /MacOSExample by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#2956
- docs: bump `@swmansion/t-rex-ui` to 0.0.12 by
[@&#8203;patrycjakalinska](https://github.com/patrycjakalinska) in
[software-mansion/react-native-gesture-handler#2958
- Bump braces from 3.0.2 to 3.0.3 in /FabricExample by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#2965
- Set consistent prettier version across all package.jsons by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#2971
- Change naming scheme in package.json from camelCase to dash-case by
[@&#8203;latekvo](https://github.com/latekvo) in
[software-mansion/react-native-gesture-handler#2973
- Unify comments and simplify some conditions. by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#2984
- docs: Update Expo installation instructions by
[@&#8203;amandeepmittal](https://github.com/amandeepmittal) in
[software-mansion/react-native-gesture-handler#2991
- Bump fast-loops from 1.1.3 to 1.1.4 in /docs by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#2986
- Remove plural form in docs by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#2995
- Bump fast-loops from 1.1.3 to 1.1.4 in /example by
[@&#8203;dependabot](https://github.com/dependabot) in
[software-mansion/react-native-gesture-handler#2994
- Don't run old arch integrity check on every PR by
[@&#8203;j-piasecki](https://github.com/j-piasecki) in
[software-mansion/react-native-gesture-handler#2998
- docs: fix footer on landing by
[@&#8203;patrycjakalinska](https://github.com/patrycjakalinska) in
[software-mansion/react-native-gesture-handler#2997
- docs: Replace HireUsSection with `@swmansion/t-rex-ui` component by
[@&#8203;patrycjakalinska](https://github.com/patrycjakalinska) in
[software-mansion/react-native-gesture-handler#2996
- Mention `drawerWillShow` in `DrawerLayout` docs by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#3000
- chore: Refactor gradle task to JS scripts by
[@&#8203;maciekstosio](https://github.com/maciekstosio) in
[software-mansion/react-native-gesture-handler#3001
- Update dependencies related to tests by
[@&#8203;j-piasecki](https://github.com/j-piasecki) in
[software-mansion/react-native-gesture-handler#3005
- \[macOS] Switch `hasPointerInside` to `containsPointInView` by
[@&#8203;m-bert](https://github.com/m-bert) in
[software-mansion/react-native-gesture-handler#3012

#### New Contributors

- [@&#8203;coado](https://github.com/coado) made their first
contribution in
[software-mansion/react-native-gesture-handler#2983
- [@&#8203;amandeepmittal](https://github.com/amandeepmittal) made
their first contribution in
[software-mansion/react-native-gesture-handler#2991

**Full Changelog**:
software-mansion/react-native-gesture-handler@2.17.0...2.18.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
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.

4 participants