-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ui] Refactor SplitPanelContainer (#20909)
## Summary & Motivation I set out to add a minimum size for the second panel in a `SplitPanelContainer`, and I fell into a refactoring rabbit hole. - Add a minimum size (width/height) for the second pane, as originally planned. - Rewrite into functional components, with an imperative handle on `SplitPanelContainer` to replicate its imperative API. - Set a minimum for a few different panes around the app (global asset graph, run log pane) - Fix up the expand/collapse panel on launchpad config, which has some tricky ref usage. - Tidy up a few other things that I found hard to follow or confusing. Note that this may lead to some panel size allocations being slightly different from before, in cases where we have a minimum size for the second panel. For instance, if I set a minimum of 400px for the second panel, and the first panel is set to occupy 75% of the container, that 75% will now apply to the available size *minus* 400px, instead of 75% of the full container. FWIW, I don't think this will be a noticeable change for most people. https://github.com/dagster-io/dagster/assets/2823852/b4bbc92d-c57b-468b-87a2-9216172ef4b1 ## How I Tested These Changes View launchpad, run page, global asset graph. Drag vertical and horizontal split panels, verify correct behavior. Verify that second-panel minimums are respected. Test split panel contain
- Loading branch information
Showing
6 changed files
with
194 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
c1740a1
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.
Deploy preview for dagit-storybook ready!
✅ Preview
https://dagit-storybook-4qcf1wu9t-elementl.vercel.app
Built with commit c1740a1.
This pull request is being automatically deployed with vercel-action
c1740a1
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.
Deploy preview for dagit-core-storybook ready!
✅ Preview
https://dagit-core-storybook-8my2ivtn0-elementl.vercel.app
Built with commit c1740a1.
This pull request is being automatically deployed with vercel-action