-
Notifications
You must be signed in to change notification settings - Fork 259
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: Close Side Panel #208
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is in the right direction. The animation is also very nice. I pointed out a few regressions that this introduces which would need to be fixed.
My recommendation is to keep the existing tabs as unchanged as possible and introduce this hiding functionality 1 level higher.
Optional recommendation:
I see that the 2 panels share a lot of functionalities. A nice quality of life improvement is to refactor these new functionalities into its own component which then wraps around the panel (i.e. A SidePanel class that takes in a parameter left or right and children).
You can see something similar in this right click menu PR.
Totally optional :) Nice work so far! It's very close
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very close to done!
One last regression is the ability to resize the panel that I mentioned. There's a delay introduced with the dragging.
This is a good reason to move the resize logic 1 level higher. There's some transition and mix/min width that is interfering with the resizing.
Very close thanks for being quick and accommodating :)
@@ -74,17 +78,26 @@ const LayersPanel = observer(() => { | |||
return ( | |||
<div | |||
className={clsx( | |||
'border min-w-60 max-w-96 bg-black/80 backdrop-blur rounded-tr-xl shadow', | |||
'fixed left-0 z-50 top-20 transition-width duration-300 opacity-100 bg-black/80', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing and this would be good. The transition duration is messing with the ability to drag the panel size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely!
Description
What is the purpose of this pull request?
Added the functionality to close and open Layer and Edit panels