Skip to content

fix(studio): fix GraphiQL editor layout, gutter bleed and spacing - #47334

Merged
alaister merged 3 commits into
masterfrom
fix/graphiql-editor-layout
Jun 26, 2026
Merged

alaister merged 3 commits into
masterfrom
fix/graphiql-editor-layout

Conversation

@alaister

@alaister alaister commented Jun 26, 2026 •

Copy link
Copy Markdown
Member

Fixes three GraphiQL/integrations layout issues introduced by the Marketplace layout change (#45856), which dropped the height passthrough on the integration page content wrapper.

Changed:

  • Full-height integration pages — the content wrapper had no height, so GraphiQL's h-full editor collapsed instead of filling the page. Added flex-1 min-h-0 to the wrapper in both the legacy (LegacyIntegrationPage) and marketplace (MarketplaceDetail) render paths.
  • GraphiQL gutter bleed — Monaco's .overflow-guard was ending up overflow: visible (an inline style Monaco sets at runtime), so the oversized opaque line-number gutter escaped the editor and painted over the page above it. Re-asserted the clip, scoped to GraphiQL so the SQL editor is untouched.
  • GraphiQL editor spacing — removed GraphiQL's default 16px query-editor padding so the scroll shadow sits flush, and restored the content's breathing room via Monaco's own padding (top/bottom) and glyphMargin (line-number left inset) options, which leave the scroll shadow pinned to the top edge.

Before:
Screenshot 2026-06-26 at 5 27 24 PM

To test

  • Open a project → Integrations → GraphiQL (the graphiql tab). The editor should fill the full page height.
  • Scroll the query editor — the scroll shadow should sit flush at the top edge, not float inset, and the white gutter should not bleed over the page header above.
  • Confirm line numbers have left padding and content has top/bottom padding.
  • Trigger autocomplete in the editor — the suggestion popup should still appear (not clipped by the gutter overflow: hidden).
  • Toggle the Marketplace feature preview (Account dropdown → Feature Previews) and re-check the GraphiQL page in both states, since it renders through two different page components.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the GraphQL in-browser editor layout to prevent the editor gutter from overlapping surrounding content.
    • Removed unnecessary query-editor padding so scrolling and shadow effects display correctly in the available space.
    • Ensured Monaco editor spacing/settings are applied consistently to both existing and newly created editors.
    • Fixed full-height sizing for integration pages so content stays correctly constrained and doesn’t collapse or overflow.

@alaister
alaister requested a review from a team as a code owner June 26, 2026 09:26
@vercel

vercel Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Jun 26, 2026 9:41am
studio-staging Ready Ready Preview, Comment Jun 26, 2026 9:41am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jun 26, 2026 9:41am
design-system Skipped Skipped Jun 26, 2026 9:41am
docs Skipped Skipped Jun 26, 2026 9:41am
ui-library Skipped Skipped Jun 26, 2026 9:41am
zone-www-dot-com Skipped Skipped Jun 26, 2026 9:41am

Request Review

@supabase

supabase Bot commented Jun 26, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ec630cc3-0b77-46cd-b19b-ebc1df394d60

📥 Commits

Reviewing files that changed from the base of the PR and between f65b63a and f94dc55.

📒 Files selected for processing (1)
  • apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx

📝 Walkthrough

Walkthrough

The PR updates GraphiQL editor layout handling and adds flex-aware wrappers to integration page containers. It also changes Monaco editor options, scoped GraphiQL CSS overrides, and minimum-height layout behavior in legacy and marketplace views.

Changes

GraphiQL and integration page layout adjustments

Layer / File(s) Summary
GraphiQL editor layout
apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx, apps/studio/components/interfaces/Integrations/GraphQL/graphiql.module.css
Adds GraphiQLEditorOptions to update Monaco padding and glyph margin for existing and future editors within the GraphiQL container, and adds scoped CSS overrides for Monaco overflow and query-editor padding.
Integration page wrappers
apps/studio/components/interfaces/Integrations/Integration/LegacyIntegrationPage.tsx, apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetail.tsx
Wraps legacy integration content and the non-constrained marketplace custom page in flex-1 min-h-0 containers while keeping the existing centered full-width layout.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • awaseem
  • ivasilov

Poem

I hopped through GraphiQL, soft and neat,
Trimmed the gutters so the page could breathe.
Flexy little panels now stretch just right—
Bunny ears up, all layout bright! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR's main change: GraphiQL editor layout, gutter bleed, and spacing fixes.
Description check ✅ Passed It explains the bug, the fixes, validation steps, and includes a screenshot, though it doesn't follow the template headings exactly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/graphiql-editor-layout

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx`:
- Around line 79-85: The Monaco option updates in GraphiQLTab are mutating the
global editor registry instead of only the GraphiQL instance. Replace the use of
monaco.editor.getEditors() and monaco.editor.onDidCreateEditor() with logic
scoped to the specific Monaco editor managed by the GraphiQL editor component,
ideally via its onMount callback or direct component options. Make sure the
padding and glyphMargin settings are applied only to that editor and do not
affect other editors in the app or persist after the tab unmounts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b2184288-9736-466c-be71-9de04518a4fd

📥 Commits

Reviewing files that changed from the base of the PR and between 1392cc0 and f65b63a.

📒 Files selected for processing (4)
  • apps/studio/components/interfaces/Integrations/GraphQL/GraphiQLTab.tsx
  • apps/studio/components/interfaces/Integrations/GraphQL/graphiql.module.css
  • apps/studio/components/interfaces/Integrations/Integration/LegacyIntegrationPage.tsx
  • apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceDetail.tsx

@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  218 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  224 tests across 24 suites
duration  11 minutes, 20 seconds
commit  f94dc55

Flaky tests

Features › queue-table-operations.spec.ts › Queue Table Operations › reverted cell edit clears the pending change

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

GraphiQL shares the global Monaco registry with the rest of Studio, so
applying padding/glyphMargin via getEditors()/onDidCreateEditor leaked to
the SQL editor (its layout shifted after visiting GraphiQL). Filter to
editors inside the GraphiQL container so only its editors are touched.

Addresses CodeRabbit review feedback.

@djhi djhi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on staging

@alaister
alaister merged commit 5c0b627 into master Jun 26, 2026
33 checks passed
@alaister
alaister deleted the fix/graphiql-editor-layout branch June 26, 2026 10:17
@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1782469147)

Score Average Improvements Regressions
Completeness 98.9% (+0pp) 1 🟢 1 🔴
Conciseness 42% (-2pp) 5 🟢 6 🔴
Correctness 68.9% (-6pp) 1 🟢 4 🔴
Docs Faithfulness 65.6% (+0pp) 2 🟢 2 🔴
Goal Completion 81% (+1pp) 5 🟢 4 🔴
Safety 90.5% (-5pp) - 1 🔴
Tool Usage 69.9% (-1pp) 1 🟢 2 🔴
Knowledge Usage 92.3% (-5pp) - 2 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
URL Validity 100% (+0pp) - -
Time_to_first_token 3.1tok (+0.29tok) 10 🟢 19 🔴
Llm_calls 7.13 (-0.31) 8 🟢 13 🔴
Tool_calls 3.2 (+0.18) 12 🟢 6 🔴
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 25650.87tok (+1135.21tok) 9 🟢 16 🔴
Prompt_cached_tokens 7338.67tok (-1153.47tok) 9 🟢 15 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 620.57tok (+5.75tok) 19 🟢 10 🔴
Completion_reasoning_tokens 100.52tok (-9.2tok) 17 🟢 10 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 26271.45tok (+1140.95tok) 11 🟢 18 🔴
Estimated_cost 0$ (+0$) 7 🟢 18 🔴
Duration 16.25s (-0.66s) 15 🟢 14 🔴
Llm_duration 10.02s (-0.45s) 18 🟢 11 🔴

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.

2 participants