-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(Transition): Add component #813
Conversation
Current coverage is 98.08% (diff: 6.52%)@@ master #813 diff @@
========================================
Files 137 137
Lines 2244 2243 -1
Methods 0 0
Messages 0 0
Branches 0 0
========================================
- Hits 2244 2200 -44
- Misses 0 43 +43
Partials 0 0
|
@levithomason I've added initial example, looks that it feels good with our augmentaion pattern 👍 Main problem that we need have there animation control like in jQuery: $('.autumn.leaf').transition('scale'); I'm thinking about binding internal method of render() {
let control
const element = <Transition as='div' contol={control}>Test</Transition>
return (
<div>
{transtion}
<Button onClick={control}>Run</Button>
</div>
)
} But it looks horrible 😢 We can clone there pattern with trigger, but it will be perfect to get elegant way for animation controlling. |
I'm not sure I follow this, could you expound? Animating Multiple ComponentsI think we should use In/OutI think we'll need to support in/out animations right away as well. There will likely be tricky things to deal with here regarding out animations and component unmount. |
I added all the animations and an "Explorer" example for easier testing. We can use this as we build out the component. I also think the |
feat(Transition): Add component
9be89ae
to
3e92cee
Compare
@jcarbo @levithomason I've added more animations and reworked component, take a look and punish me 👍 Animating Multiple ComponentsYes, I agree with you there, it's next step. |
This is looking really good so far 👍 I spent some time looking into ReactCSSTransitionGroup and others. It appears the Facebook team will no longer support ReactCSSTransitionGroup, however, the react-bootstrap team has offered to continue support. They will be transferring their Transition component to the reactjs org. It seems to do most or all of what we're about to do here. We may be able to drop it in and wrap it, for now, then later if our needs outgrow it we can maintain our own (much like we did with our Portal). It is probably worth taking a look at that Transition component, even if only for inspiration. Triggering animationsCurrently, animations are triggered by toggling CallbacksI think we need callbacks for every stage of the animations, reference react-bootstrap Transition props. Potential queue bugsI notice when rapidly clicking the Will wait for the children update to further review, keep it up! |
Main problem that I see with
Yep, it look like issue with hot reload. |
Hm, there shouldn't be any reloading involved, I'm only clicking "Run" in the docs but not changing any code. There is no rebuild happening. Let me know if I'm missing the point here. |
…antic-UI-React into feat/transition Conflicts: docs/app/Examples/modules/Transition/Transitions/TransitionExampleScale.js docs/app/Examples/modules/Transition/Transitions/index.js src/modules/Transition/Transition.js
Fixed, problem was with CallbacksI think we prefer SUI callbacks, so I added them. |
Awesome, will give it a whirl as soon as I can :) |
Looking good so far 👍 Will wait for docs on the callbacks / direction to review those. There are a couple things I'm not sure about yet:
|
Basically, I wanted something that makes $('.leaf').transition('jiggle')
$('.leaf').transition('horizontal flip in') // Specifying a direction example <Transition active={active} animation='jiggle' />
<Transition active={active} animation='horizontal flip' direction='in' /> <Transition in={in} animation='jiggle' />
<Transition in={in} animation='horizontal flip' direction='in' /> In fact, we have there |
I've marked this for review so I can come back to it and give it the time it deserves. |
This looks awesome! |
it also seems to be unfriendly to the case if you use plaintext, vs a DOMElement/Component as a child |
my last interruption on your PR for the day--the SUI transition docs aren't loading for me ATM (on a plane). i'm observing that the slide Transition here retains its node size. i expected on slide-out for the width or height to go to 0. is an intended supported use case to actually dynamically shrink/remove the node? |
I'll back to this issue soon, I'll have some ideas on it and want to try them. |
@layershifter I'd like to get a basic version of this merged. What scope could we cut to get an MVP version out? The only concern I'd have is ensuring the MVP API doesn't box us in from being able to add the rest of the features we need. |
@levithomason I'll try to find enough time on this weekend. |
@layershifter did you mean to close this PR? |
I described the reason for the closure there. |
I did read the note, but, perhaps I'm not understanding correctly. I would think the bulk of the work in this PR would be reusable and that we'd only need to update it rather than closing it. |
Technically, my initial ideas were defeated. So, I think that I have the vision of this component, but I want finish other issues (#524, #1072) before. I closed it to allow someone make the right MVP of |
Wish these transitions worked on React/Semantic UI...I was excited to use Semantic until I found out the transitions (or any animation) were non existent. |
WIP
Fixes #200.
TODO
interval
andreverse
;looping
and animation on load;direction
for overringactive
;in
/out
fromactive
on static animations.