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

Feat: Close Side Panel #208

Merged
merged 11 commits into from
Aug 25, 2024
Merged

Feat: Close Side Panel #208

merged 11 commits into from
Aug 25, 2024

Conversation

kartik-raj7
Copy link
Contributor

Description

What is the purpose of this pull request?

Added the functionality to close and open Layer and Edit panels

  • New feature
  • Documentation update
  • Bug fix
  • Refactor
  • Release
  • Other

Copy link
Contributor

@Kitenite Kitenite left a 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

app/src/routes/project/LayersPanel/index.tsx Show resolved Hide resolved
app/src/routes/project/LayersPanel/index.tsx Show resolved Hide resolved
@kartik-raj7 kartik-raj7 requested a review from Kitenite August 23, 2024 20:12
Copy link
Contributor

@Kitenite Kitenite left a 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 :)

app/src/routes/project/LayersPanel/index.tsx Show resolved Hide resolved
@@ -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',
Copy link
Contributor

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.

@kartik-raj7 kartik-raj7 requested a review from Kitenite August 24, 2024 19:59
Copy link
Contributor

@Kitenite Kitenite left a comment

Choose a reason for hiding this comment

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

Lovely!

@Kitenite Kitenite merged commit 13ad1fe into onlook-dev:main Aug 25, 2024
@Kitenite Kitenite linked an issue Aug 25, 2024 that may be closed by this pull request
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.

[FEAT] Close side panels
3 participants