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
web: Add a resize drag component to the sidebar #4774
Conversation
This pull request has been linked to Clubhouse Story #12138: better support for long resource names. |
cc @SurbhiSGupta this is mostly a lightweight experiment to see how it feels. The drag component doesn't currently take up any width. It's only noticable if you mouse over and your cursor changes. |
also: there's no built-in MUI resizer component, but there's a lot of discussion about adding one, and they pointed to this component as the inspiration (which is why i picked it) |
Ooo I'm excited for this, I have instinctively tried to resize the sidebar countless times 😅 |
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 works beautifully! i only have two optional comments.
web/src/OverviewResourceSidebar.tsx
Outdated
height: 100%; | ||
width: 336px; | ||
min-width: 336px; |
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.
(nit) since we're using this value in a couple places/files, could you extract into a const
?
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.
done
web/src/OverviewResourcePane.tsx
Outdated
alerts={alerts} | ||
buttons={buttons} | ||
/> | ||
<SplitPane split="vertical" minSize={336} defaultSize={336}> |
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.
what do you think about adding the split pane to the storybook component for OverviewResourceSidebar
? it might be nice to have that as part of the demo view.
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.
ooh i like that idea!
Hello @lizzthabet,
Please review the following commits I made in branch nicks/ch12138:
5b89976 (2021-07-19 13:50:04 -0400)
web: Add a resize drag component to the sidebar
Fixes #4614
Code review reminders, by giving a LGTM you attest that: