Skip to content

Commit

Permalink
fix tabbar overflow (#2919)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheyenbrock committed Nov 25, 2022
1 parent 645a2c3 commit f6cae4e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/hip-maps-tickle.md
@@ -0,0 +1,6 @@
---
'graphiql': patch
'@graphiql/react': patch
---

Fix overflow when there are lots of tabs that don't fit into the tab bar at once
2 changes: 1 addition & 1 deletion packages/graphiql-react/src/ui/tabs.css
@@ -1,6 +1,6 @@
.graphiql-tabs {
display: flex;
overflow-y: auto;
overflow-x: auto;
padding: var(--px-12);

& > :not(:first-child) {
Expand Down
2 changes: 1 addition & 1 deletion packages/graphiql/src/components/GraphiQL.tsx
Expand Up @@ -408,7 +408,7 @@ export function GraphiQLInterface(props: GraphiQLInterfaceProps) {
<div className="graphiql-horizontal-drag-bar" />
) : null}
</div>
<div ref={pluginResize.secondRef}>
<div ref={pluginResize.secondRef} style={{ minWidth: 0 }}>
<div className="graphiql-sessions">
<div className="graphiql-session-header">
<Tabs aria-label="Select active operation">
Expand Down
2 changes: 2 additions & 0 deletions packages/graphiql/src/style.css
Expand Up @@ -47,6 +47,7 @@
.graphiql-container .graphiql-main {
display: flex;
flex: 1;
min-width: 0;
}

/* The current session and tabs */
Expand All @@ -60,6 +61,7 @@
max-height: 100%;
margin: var(--px-16);
margin-left: 0;
min-width: 0;
}

/* The session header containing tabs and the logo */
Expand Down

0 comments on commit f6cae4e

Please sign in to comment.