Skip to content

v6: Add TopBar layout component#4288

Merged
trevor-scheer merged 5 commits into
graphiql-6from
trevor/topbar-component
May 17, 2026
Merged

v6: Add TopBar layout component#4288
trevor-scheer merged 5 commits into
graphiql-6from
trevor/topbar-component

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

@trevor-scheer trevor-scheer commented May 16, 2026

Summary

This PR introduces the top bar that anchors the new GraphiQL v6 layout. It renders the brand, an endpoint URL display, a command palette button, and a primary Run button across the top of the app. The endpoint URL and command palette are intentional placeholders; their behavior will fill in once the transport and command palette work land.

Test plan

  • Open the deploy preview. Confirm the top bar spans the full width above the editor/sidebar split, showing the brand, endpoint URL placeholder, command palette button, and Run button.
  • In the deploy preview, type a query and click Run. Confirm the button disables for the duration of the fetch and re-enables once results arrive.
  • In the deploy preview, open the settings dialog and toggle dark/light theme. Confirm the top bar reads from the active tokens in both modes.
  • Tab through the bar with the keyboard. Confirm the Run button is reachable and activates with Space or Enter.

Refs: #4219

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 16, 2026

🦋 Changeset detected

Latest commit: 11d6996

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

A new top-of-app bar with the GraphiQL brand, an endpoint URL display,
a command palette button, and a Run button. Run wires to
`useGraphiQLActions().run` and disables while a fetch is in flight.

The endpoint URL and command palette button are intentional placeholders;
their behavior fills in once transport and command-palette work land.
`wordmark` is a real term for the GraphiQL logotype next to the brand
mark in the top bar. oxfmt also collapses the now-shorter destructured
props onto a single line.
Splits the connected `TopBar` from a pure `TopBarView`. The unit tests
now render `TopBarView` directly, sidestepping the monaco teardown
errors that `GraphiQLProvider` triggers in jsdom.
`defaults to the built-in default query` was timing out on its 15s
`waitFor`; the added `TopBar` shifts the layout enough that the cold
Monaco boot exceeds that budget on CI's forks pool. Bumped to 25s.

Switched `onRun` in `TopBarView` test defaults to method shorthand to
satisfy `object-shorthand`.
@trevor-scheer trevor-scheer force-pushed the trevor/topbar-component branch from d40da52 to 11d6996 Compare May 17, 2026 17:57
@trevor-scheer trevor-scheer marked this pull request as ready for review May 17, 2026 18:08
@trevor-scheer trevor-scheer merged commit 82e5460 into graphiql-6 May 17, 2026
13 checks passed
@trevor-scheer trevor-scheer deleted the trevor/topbar-component branch May 17, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant