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 the new ReanimatedDrawerLayout component #3188

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

latekvo
Copy link
Contributor

@latekvo latekvo commented Oct 28, 2024

Description

This PR adds documentation page for the new ReanimatedDrawerLayout component.

wait for #3146

Test plan

  • open the documentation page for ReanimatedDrawerLayout

@latekvo latekvo marked this pull request as ready for review October 29, 2024 14:44
Copy link
Contributor

@m-bert m-bert left a comment

Choose a reason for hiding this comment

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

Not much for now as these comments may change a bit 😅

docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
Comment on lines +70 to +71
a function which is called when drawer is moving or animating.
Provided with a `progress` SharedValue parameter that indicates the progress of drawer opening/closing. Equals `0` when drawer is `closed` and `1` when `open`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also here, what equals 0?

docs/docs/components/reanimated-drawer-layout.mdx Outdated Show resolved Hide resolved
Comment on lines +56 to +58
a renderer function for the drawer component.
Provided with a `progress` SharedValue parameter that indicates the progress of drawer opening/closing. Equals `0` when drawer is `closed` and `1` when `open`.
This can be used by the drawer component to animated its children while the drawer is opening or closing.
Copy link
Contributor

Choose a reason for hiding this comment

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

First of all, I'd probably merge first two sentences as the second one sounds a bit odd on its own. Beside that

Equals `0` when drawer is `closed` and `1` when `open`.

What equals 0? A function? And let's stay consistent, if we use closed, then we should also use opened.

Either way, I believe it can be rewritten is a better way 😅

Copy link
Contributor Author

@latekvo latekvo Nov 4, 2024

Choose a reason for hiding this comment

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

I agree, does something like this work better?

a renderer function for the drawer component, provided with a progress SharedValue parameter that indicates the progress of drawer opening/closing animation.

  • progress equals 0 when the drawer is closed and 1 when the drawer is opened.
  • progress can be used by the drawer component to animated its children while the drawer is opening or closing.

Inspired by the progress description used in the reanimated_swipeable.md docs.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is definitely better 😅 What about:


a renderer function for the drawer component, provided with a progress parameter.

  • progress - SharedValue that indicates the progress of drawer opening/closing animation.
    • equals 0 when the drawer is closed and 1 when the drawer is opened
    • can be used by the drawer component to animated its children while the drawer is opening or closing

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.

3 participants