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

Implement collapsible sidebar with smooth animation #77

Closed
wants to merge 3 commits into from

Conversation

ntninja
Copy link
Contributor

@ntninja ntninja commented Jul 19, 2024

The connection indicator was moved to the right so that it always remains
visible everything else is collapsed, when pressing the new menu button.
A few places use slightly different spacing to making everything work.

Unfortunately, Chakra does not provide a “Horizontal Collapsible” component
(only a vertical collapsible and an horizontal overlay drawer), so a DIY approach
inspired by https://v2.chakra-ui.com/community/recipes/horizontal-collapse was
needed by to implement this with nice animations.

Updates to React 18 + Chakra 2 + Framer-Motion 11, since animation support
needs a newer Framer-Motion version which pulls in newer React which again
is only supported by newer Chakra.

Fixes #61

Based on #75, no real dependency through.

It looks pretty decent 🙂

@ekzhang
Copy link
Owner

ekzhang commented Jul 20, 2024

Sweet!

Updates to React 18 + Chakra 2 + Framer-Motion 11

Would you mind actually separating this? I'm very open to having a collapsible sidebar now and so on, but it would be nice to collaborate a bit on it between the two of us and that becomes easier if we split up the dependency stuff 🙏

@ntninja ntninja force-pushed the feat-sidebar-collapse branch from c499341 to 9a014e8 Compare July 20, 2024 16:22
ntninja added 3 commits July 23, 2024 17:34
Animation support needs a newer Framer-Motion version which pulls in newer
React which again is only supported by newer Chakra.
The old `ReactDOM.render` function is deprecated in React 18.

See: https://reactjs.org/link/switch-to-createroot
The connection indicator was moved to the right so that it always remains
visible everything else is collapsed, when pressing the new menu button. A few
places use slightly different spacing to making everything work.

Unfortunately, Chakra does not provide a “Horizontal Collapsible” component
(only a vertical collapsible and an horizontal overlay drawer), so a DIY approach
inspired by https://v2.chakra-ui.com/community/recipes/horizontal-collapse was
needed by to implement this with nice animations.

Fixes ekzhang#61
@ntninja ntninja force-pushed the feat-sidebar-collapse branch from 9a014e8 to 66f29c3 Compare July 23, 2024 15:37
@ntninja
Copy link
Contributor Author

ntninja commented Jul 23, 2024

@ekzhang: Done! (The dependency stuff is entirely constraint to the package*.json files, except for that one commit to initialize the DOM differently.)

@hanisntsolo

This comment has been minimized.

@ekzhang
Copy link
Owner

ekzhang commented Sep 4, 2024

Could you separate the dependency changes into a different PR? I don't really want to review a +1300 line feature PR

@ntninja
Copy link
Contributor Author

ntninja commented Sep 10, 2024

@ekzhang: Just in case you’re not aware: You can review the commits individually by just clicking on each in turn and reviewing them that way.

In any case, I've also pushed the first 2 commits over at #83. Thanks for reviewing/merging so far!

@ekzhang
Copy link
Owner

ekzhang commented Dec 31, 2024

Sorry it's been several months @ntninja — I think we should have the collapsible sidebar, but the interface designer in me isn't happy with the implementation here (specifically the choice of icons, the layout, and so on). I have some time now though so I probably think it'll be quicker to implement from scratch.

@ekzhang ekzhang closed this Dec 31, 2024
@ntninja
Copy link
Contributor Author

ntninja commented Jan 1, 2025

Not really sure what you mean, but I guess I’ll see what you mean when its published.

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.

UI: Minimize sidebar/toggle
3 participants