Skip to content

v6: Redesign Schema Explorer panel structure#4299

Draft
trevor-scheer wants to merge 11 commits into
graphiql-6from
trevor/doc-explorer-redesign
Draft

v6: Redesign Schema Explorer panel structure#4299
trevor-scheer wants to merge 11 commits into
graphiql-6from
trevor/doc-explorer-redesign

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

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

Summary

  • PanelHeader for the docs panel becomes a fixed eyebrow label, Schema Explorer. The type name moves into a new breadcrumb row below the header.
  • New SchemaDocumentation root view: two eyebrow sections (ROOT TYPES and ALL SCHEMA TYPES · N) replace the old accordion. Root operation rows show a MethodPill and target type name. All-types rows show a kind badge (TYPE, SCALAR, ENUM, INPUT, INTERFACE, UNION) and type name in mono.
  • New Breadcrumb row: mono font, depth segments color-coded as --accent-blue / --accent-green-light / --fg-strong, chevron separators; clicking a segment navigates back to that depth.
  • New SearchRow content-area component: inline Search schema input with keycap hint; listbox renders as a floating popover in the content area, replacing the old absolutely-positioned search overlay.
  • New TypeCard: TYPE badge (mono, uppercase, accent-blue tinted), type name in mono, description, and an implements X · Y row with --accent-orange links.
  • New FieldsList: collapsible FIELDS · N header, mono rows with field name in --accent-green-light, colon in --fg-muted, return type in --accent-orange, optional description in --fg-subtle, and a 2px --accent-blue left border on the active row. Horizontal padding bumped to 16px across all content sections for breathing room.
  • TypeDocumentation gains a hideHeader prop so it can suppress its own description / implements / fields block when TypeCard + FieldsList render those above.

Test plan

  • Open the Docs panel. Confirm the header shows SCHEMA EXPLORER with no extra buttons, a search input, and two eyebrow sections: ROOT TYPES and ALL SCHEMA TYPES · N.
  • Confirm each root operation row shows its MethodPill (QRY/MUT/SUB), operation label, and target type name. Click a row and confirm it navigates into the type detail.
  • In ALL SCHEMA TYPES, confirm each row shows a kind badge and mono type name. Click a row and confirm navigation.
  • Confirm the breadcrumb row appears below the header when inside a type, with color-coded segments. Click an intermediate segment and confirm it navigates back.
  • Confirm TypeCard shows the kind badge, name, description, and implements list for an object type that implements interfaces.
  • Confirm FieldsList shows mono rows with green field names and orange return types; click a field row and confirm it navigates in.
  • Type in the inline search row and confirm the listbox popover appears with results.
  • Toggle light / dark theme; confirm root view and type-detail both render correctly.
  • Navigate to an enum type and confirm enum values still render below.

Refs: #4219

- PanelHeader title is now the eyebrow label "Schema Explorer" with filter and search icon buttons in actions
- New Breadcrumb component below the header: mono font, color-coded depth segments (root blue, intermediate green, current strong), chevron separators, click-to-navigate
- New SearchRow component: inline search below breadcrumb with "Filter fields..." placeholder and keycap hint, listbox drops as a content-area popover
- New TypeCard component: [TYPE] badge (accent-blue tinted, mono, uppercase), type name in mono, description paragraph, "implements X · Y" row with orange accent links
- New FieldsList component: "FIELDS · N" collapsible header, each row mono fieldName (green) : returnType (orange), 2px accent-blue left border on active row, optional description in fg-subtle
- TypeDocumentation gains `hideHeader` prop to suppress description/implements/fields when TypeCard+FieldsList render them
- Unit tests updated to query new breadcrumb selectors instead of removed title element
- Cypress docs selectors updated: back navigation via breadcrumb, title checks via breadcrumb-current
- Storybook stories extended: object/interface/input/enum type detail, breadcrumb nav, all using v6 components
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: 473dc8d

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

Replace the v5-style `SchemaDocumentation` component with a new eyebrow-section
layout: `ROOT TYPES` shows each operation with its `MethodPill` and target type
name; `ALL SCHEMA TYPES · N` lists every non-built-in type with a kind badge
(`TYPE`, `SCALAR`, `ENUM`, etc.). Drops the description paragraph and
collapsible accordion. Both sections use the same uppercase letter-spaced
header style as `FieldsList`.

Also bumps horizontal padding from 14px to 16px consistently across
`TypeCard`, `FieldsList`, `SearchRow`, `Breadcrumb`, and `TypeExtra` so the
type-detail view has a bit more breathing room.
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 18, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

The override in `doc-explorer.css` was zeroing all four sides of
`TypeCard`'s padding via a more-specific descendant selector, beating
the component's own `padding: var(--px-10) var(--px-16)`. Move the
padding declaration into the override and drop the now-redundant rule
in `type-card.css`.
@trevor-scheer trevor-scheer force-pushed the trevor/doc-explorer-redesign branch from ca6f6b6 to 6bb166e Compare May 18, 2026 18:56
`FieldCard` renders a `FIELD` badge + mono `name : returnType` header
plus description, mirroring `TypeCard`. `ArgumentsList` renders a
collapsible `ARGUMENTS · N` eyebrow with mono `name : Type = default`
rows, mirroring `FieldsList`. Directives use the same eyebrow + mono
row treatment.

`FieldDocumentation` is rewired to use these components and the
`ExplorerSection` icon headers are dropped from the field view.
@trevor-scheer trevor-scheer force-pushed the trevor/doc-explorer-redesign branch from 6bb166e to 7be025d Compare May 18, 2026 18:59
`FieldDocumentation` now renders descriptions through `FieldCard`
(plain text in `.graphiql-doc-explorer-field-card-description`)
instead of `MarkdownContent` (`.graphiql-markdown-description`).
Update the cypress assertions accordingly and drop the trailing
newline the markdown renderer used to add.
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