dialog render-to-layer version#2129
Conversation
src/overlay.jsx
Outdated
There was a problem hiding this comment.
Why did you remove this property?
There was a problem hiding this comment.
carelessness - merging from #1845 by hand... apologies
4521d70 to
a7566df
Compare
|
@oliviertassinari - rebasing this wasn't as the warning have moved completely, so git merge had a bad day at the office. I've manually rolled in your changes. Can I suggest no further changes to |
src/overlay.jsx
Outdated
There was a problem hiding this comment.
Shouldn't the show property be required instead of adding a default value?
src/overlay.jsx
Outdated
There was a problem hiding this comment.
There is two setState call. Do you if this will have an impact on perf?
Actually, it looks like we don't need to have show in the state.
Can't we just use the show property?
|
@oliviertassinari - your'e right, state not required, have removed :) |
src/overlay.jsx
Outdated
There was a problem hiding this comment.
You removed the function call to this method.
So I think that we can remove preventScrolling and allowScrolling method.
This component is also used by LeftNav, I have just checked, it should be fine.
I think that it will also be good to move _allowScrollingand _preventScrolling inside _applyAutoLockScrolling since their are only called by this method.
There was a problem hiding this comment.
componentWillUnmount calls _allowScrolling, had a think about combining, but think its best to keep this separate. Does that sound ok?
|
@chrismcv I think that I'm done with my comments and that we can soon merge 😄. |
365e81b to
c01336d
Compare
|
@oliviertassinari - |
|
I have noticed one issue. When we open the dialog for a second time, the height is not correct. |
|
@oliviertassinari apologies - rebase caused some confusion there, hence open and close. I had another rebase issue so manually merged it (see b4b7bb9). Does this fix your height issue? |
|
@chrismcv The height issue is gone, great work 👍! |
[Dialog] Use render-to-layer component
This PR created a wrapped dialog component that uses the render to layer component to put the dialog in a separate dom tree.
The reason for the wrapping is so that refs can continue to be used as normal within the dialog component for animation.
(This doesn't depend on the #2043 branch)