Skip to content

Better ReactCSSTransitionGroup docs #587

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

Closed
sophiebits opened this issue Nov 21, 2013 · 5 comments
Closed

Better ReactCSSTransitionGroup docs #587

sophiebits opened this issue Nov 21, 2013 · 5 comments

Comments

@sophiebits
Copy link
Collaborator

Given the confusion #568, seems like our docs aren't quite good enough here. Right now we have:

In this component, when a new item is added to ReactTransitionGroup it will get the example-enter CSS class and the example-enter-active CSS class added in the next tick. This is a convention based on the transitionName prop.

but that's all.

@plievone
Copy link
Contributor

plievone commented Jan 2, 2014

Related issues / pull requests which may affect the docs: #761, #756, #719, #669, #536, #508, #161

@MalucoMarinero
Copy link

There could be a section that specifically states the timeline of the classes being applied, something like:

Timing of Animation Classes

Animation classes are applied on top of each component's regular css classes. When an animation starts it goes through the following sequence:

Immediately: Adds the <animation-name>-enter class.
1 tick afterwards: Adds the <animation-name>-enter-active class.
At the end of the transition: Removes both animation classes.

Remember, because the classes are not kept after the animation is complete, don't depend on the animation classes to keep a component visible.

@sophiebits sophiebits changed the title Better ReactTransitionGroup docs Better ReactCSSTransitionGroup docs Mar 17, 2014
@markijbema
Copy link
Contributor

Actually, I'm not sure whether 'at the end of the transition' is achievable. I think that should say very specific when it ends. Currently, it ends when any transition within this element ends (in my opinion, a bug), but even when fixed (#1301) it will end on the first transition (let's say you first transition visibility, and then color for instance). I think anything beyond that might have crazy cornercases.

Personally, I don't have a problem with this being handled incomplete, but it should be documented very well what is, and what isn't supported.

@sophiebits
Copy link
Collaborator Author

I think the docs here are good enough now; haven't heard much confusion.

@nmn
Copy link
Contributor

nmn commented Jul 21, 2014

I think the documentation for CSSGroup is pretty good. I think for the lower level Transition Group a few additions would really help. For example, the fact the callbacks have to asynchronous or they won't work. etc.

josephsavona pushed a commit that referenced this issue May 15, 2024
--- 

Revives e2e test infra from #587. 

- All React component-like functions are compiled. 

- `yarn jest` runs each e2e test twice (forget and no forget) 

Github Actions is already running `yarn test`, which includes all jest tests 

``` 

Run yarn test 

yarn run v1.22.19 

$ yarn workspaces run test 

> babel-plugin-react-forget 

$ yarn jest && yarn snap:build && yarn snap 

$ tsc && jest 

PASS main src/__tests__/Result-test.ts 

PASS main src/__tests__/DisjointSet-test.ts 

PASS e2e with forget src/__tests__/e2e/hello.e2e.js 

PASS e2e no forget src/__tests__/e2e/hello.e2e.js 

Test Suites: 
[4](https://github.com/facebook/react-forget/actions/runs/5732016200/job/15534129231?pr=1881#step:8:5) 
passed, 4 total 

Tests:       23 passed, 23 total 

Snapshots:   11 passed, 11 total 

Time:        
6.1[5](https://github.com/facebook/react-forget/actions/runs/5732016200/job/15534129231?pr=1881#step:8:6)3 
s 

```
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

No branches or pull requests

5 participants