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

Show/Hide Sidebar workspace item using React Show #382

Merged
merged 3 commits into from
Dec 10, 2017
Merged

Show/Hide Sidebar workspace item using React Show #382

merged 3 commits into from
Dec 10, 2017

Conversation

BilalBudhani
Copy link
Contributor

I wanted to start contributing to Codesandbox project and was keenly looking for some issue to start from, I saw this one #358 interesting enough to work –– So I picked it up. After some fiddling around I got the expected behaviour described in the issue mentioned earlier.

Looking forward for some feedback from the maintainers.

Thanks.

@lbogdan
Copy link
Contributor

lbogdan commented Dec 10, 2017

Hey @BilalBudhani, that's very nice! While playing around with it, I've noticed that the "Dependecies" section (maybe because it's the last one?) opens fine, but closes without the animation. Can you maybe take a look at that? Thanks!

@BilalBudhani
Copy link
Contributor Author

Hey, @lbogdan thanks for the feedback. I just compared the behaviour of collapsing/uncollapsing between this version and codesandbox.io production version –– I can see the animation taking place in "Dependencies" section. Perhaps, the animation is being performed under 200ms and the height is relatively large than other sections that is why it is hard to differentiate (?). Do you want me to increase the animation time to 250-300ms?

@lbogdan
Copy link
Contributor

lbogdan commented Dec 10, 2017

It's not that, I've tried with animations slowed down to 10%, it just hides without any animation:

@BilalBudhani
Copy link
Contributor Author

BilalBudhani commented Dec 10, 2017

@lbogdan you were right, it was not animating –– I had to increase the animating time to catch this issue, Good catch! Thanks.

I implemented a fix, turns out keepState props was making the children component unmount before the animation even started. Therefore, I delegated the unmounting task to React-Show library (Check unmountOnHide property https://github.com/react-tools/react-show#usage).

@CompuIves
Copy link
Member

CompuIves commented Dec 10, 2017

I love this! Thanks @BilalBudhani, I'll review this after dinner and merge it in if all is good 😄 . Played with it already, and it looks+feels beautiful!

Copy link
Member

@CompuIves CompuIves left a comment

Choose a reason for hiding this comment

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

Perfect, thanks for building this!

@CompuIves CompuIves merged commit edf75c9 into codesandbox:master Dec 10, 2017
@tannerlinsley
Copy link

BTW - I just released React-show 2.0. Upgrade should be seamless, given you're not using any deprecated props. Upgrade for some more stability!

@BilalBudhani BilalBudhani deleted the sidebar-react-show branch December 14, 2017 07:14
@BilalBudhani
Copy link
Contributor Author

@tannerlinsley Sure, I will look into upgrading to 2.0 this weekend. Thanks for informing about the upgrade availability.

@tannerlinsley
Copy link

tannerlinsley commented Dec 14, 2017 via email

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.

4 participants