Explore: Add resize to split view, with Min/Max button (#54420)

* Add split resize to Explore without keeping width in state

* debug commit

* ugly hack around split lib only supporting one child

* Use SplitView to accomodate one or two elements, remove debug code, fix test

* More cleanup, fix state action

* Fix even split from manual size scenario

* cleanup

* Add new state elements to test

* Handle scrollable on internal element for virtualized lists

* Left align overflow button for explore

* Change min/max buttons

* Apply suggestions from code review

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Add more suggestions from the code review

* Fix problems tests found

* commit broken test with debug info

* Add test, remove debug code

* Remove second get of panes

* Remove second get of panes

Co-authored-by: Elfo404 <me@giordanoricci.com>
This commit is contained in:
Kristina
2022-09-23 08:20:33 -05:00
committed by GitHub
parent 80c49688a1
commit c3e4f1f876
12 changed files with 312 additions and 44 deletions

View File

@@ -24,6 +24,7 @@ export interface Props {
className?: string;
isFullscreen?: boolean;
'aria-label'?: string;
buttonOverflowAlignment?: 'left' | 'right';
}
/** @alpha */
@@ -42,6 +43,7 @@ export const PageToolbar: FC<Props> = React.memo(
className,
/** main nav-container aria-label **/
'aria-label': ariaLabel,
buttonOverflowAlignment = 'right',
}) => {
const styles = useStyles2(getStyles);
@@ -132,7 +134,9 @@ export const PageToolbar: FC<Props> = React.memo(
)}
</nav>
</div>
<ToolbarButtonRow alignment="right">{React.Children.toArray(children).filter(Boolean)}</ToolbarButtonRow>
<ToolbarButtonRow alignment={buttonOverflowAlignment}>
{React.Children.toArray(children).filter(Boolean)}
</ToolbarButtonRow>
</nav>
);
}