fix: Fix the drag resizing in the GraphiQL (#20130)

* Set a min width for the left panel so that it doesn't get squished when the documentation panel is expanded.

* When the doc panel is closed via dragging, disable the plugin icon.
This commit is contained in:
Ivan Vasilov authored and GitHub committed 2024-01-03 16:24:41 +01:00
1 parent 4dda2ad7ac
commit 758c4572d1
1 file changed
+2 -2
@@ -100,7 +100,7 @@ export const GraphiQLInterface = ({ theme }: GraphiQLInterfaceProps) => {
direction: 'horizontal',
initiallyHidden: pluginContext?.visiblePlugin ? undefined : 'second',
onHiddenElementChange: (resizableElement) => {
if (resizableElement === 'first') {
if (resizableElement === 'second') {
pluginContext?.setVisiblePlugin(null)
}
},
@@ -207,7 +207,7 @@ export const GraphiQLInterface = ({ theme }: GraphiQLInterfaceProps) => {
<div className="graphiql-main">
<div
ref={pluginResize.firstRef}
style={{ minWidth: 0 }}
style={{ minWidth: '750px' }}
className={clsx('graphiql-sessions', styles.graphiqlSessions)}
>
<div