Animate the SymbolModal's entrance/exit#3415
Conversation
d07bbca to
8356b51
Compare
Codecov Report
@@ Coverage Diff @@
## next #3415 +/- ##
========================================
- Coverage 50% 49.81% -0.19%
========================================
Files 107 108 +1
Lines 4460 4483 +23
Branches 920 919 -1
========================================
+ Hits 2230 2233 +3
- Misses 2230 2250 +20
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## next #3415 +/- ##
======================================
Coverage ? 51.5%
======================================
Files ? 110
Lines ? 4565
Branches ? 943
======================================
Hits ? 2351
Misses ? 2214
Partials ? 0
Continue to review full report at Codecov.
|
7cf448d to
a7d8f3b
Compare
|
I'm not sure how to resolve these flow issues as the Modal doesn't really have any typings different from other components. Then as for yarn check, I can't seem to resolve that either. Seems like some dependency of storybook isn't happy with the react version we have? |
a7d8f3b to
cbd4271
Compare
|
I will take a look again later, but from a quick reading it looks like you are expecting a single node as a child, and passing two.. i will take another look later in the evening. |
jasonLaster
left a comment
There was a problem hiding this comment.
Very cool. Just concerned about the wrapper overlaying the window.
| return Slide({ | ||
| in: enabled, | ||
| children: status => { | ||
| return dom.div( |
There was a problem hiding this comment.
It might help if the wrapper and modal were siblings. This way the modal could animate onto the <body>.
There was a problem hiding this comment.
Not sure I follow. Could you elaborate?
| .modal-wrapper.entered, | ||
| .modal-wrapper.exiting { | ||
| pointer-events: auto; | ||
| } |
There was a problem hiding this comment.
we should avoid having a div overlaying the window at all times.
another strategy might be to use z-index: -1.
There was a problem hiding this comment.
Good idea on moving the z-index.
@codehag I was looking into how to make a function have variadic arity in Flow but I'm not finding a good resource. 🙁 I'll keep digging. |
cbd4271 to
db227ed
Compare
| z-index: -1; | ||
| top: 0; | ||
| left: 0; | ||
| transition: z-index 0.4s ease-in-out; |
There was a problem hiding this comment.
I added this slightly longer transition to the z-index change to make sure we have enough time for the animation to play.
0b5e3da to
8175039
Compare
|
fixed up the flow types, was a tough case! |
b293364 to
7d27e2f
Compare
we might need a lower version of transition-group |
|
@codehag thanks for that! @jasonLaster the transition-group package.json seems to indicate we would have a good version. https://github.com/reactjs/react-transition-group/blob/master/package.json#L44 We could try rolling back to a different version but the 1.x has a slightly different API so I'd need to modify a bit further. |
|
Let's try a 1.x if that makes yarn happy. Basically downgrade do yarn
check, then maybe move forward
…On Tue, Jul 25, 2017 at 1:01 PM Wellington Cordeiro < ***@***.***> wrote:
@codehag <https://github.com/codehag> thanks for that! @jasonLaster
<https://github.com/jasonlaster> the transition-group package.json seems
to indicate we would have a good version.
https://github.com/reactjs/react-transition-group/blob/master/package.json#L44
We could try rolling back to a different version but the 1.x has a slightly
different API so I'd need to modify a bit further.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3415 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPiYnfrIdz_YciswSJI-lpBwrPl4tZBks5sRh9zgaJpZM4OgPqz>
.
|
|
I tried dropping to 1.x and still saw the same error. 🙁 |
|
What do we need this dependency to do? Why not just add a class that has
the transition?
…On Tue, Jul 25, 2017 at 1:19 PM Wellington Cordeiro < ***@***.***> wrote:
I tried dropping to 1.x and still saw the same error. 🙁
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3415 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPiYja4drxFi_w0lZHKig4CiuBR4T_7ks5sRiNIgaJpZM4OgPqz>
.
|
cc1140d to
98a6b33
Compare
|
I have a fix, just waiting for tests to pass |
|
This has been rebased to remove the offending yarn.lock inclusion -- if you modify it please pull this branch first and replace your local branch |
|
@codehag I pulled changes, rebased onto next and had to revert the yarn.lock entirely because even removing my dep and regenerating caused the error in |
|
@wldcordeiro try this:
this will give you a clean version I suspect that you still have the old yarn.lock file and that is what is causing the troubles. It is building on CI now, and also locally for me |
|
@codehag @jasonLaster with the changes you've made I think this is ready. I have nothing else I need to modify. There are some changes in the PR though that seem to have come from elsewhere. 🙁 |
4ddce7b to
535518b
Compare
|
Okay I think now the rebase madness is done. |
535518b to
8ac8235
Compare
|
The commit log here leaves evidence that I'm a time traveler. 😆 |
* Animate symbol modal using react-transition-group * Use z-index rather than pointer-events to move the .modal-wrapper * fixup yarn * Remove react-transition-group and just do the animation via the enabled prop and CSS * Adjust animation to use Photon recommendations. * drop duplicate close handler * make flow happy
* Animate symbol modal using react-transition-group * Use z-index rather than pointer-events to move the .modal-wrapper * fixup yarn * Remove react-transition-group and just do the animation via the enabled prop and CSS * Adjust animation to use Photon recommendations. * drop duplicate close handler * make flow happy
Associated Issue: #3234
Summary of Changes
Test Plan
Screenshots/Videos