Skip to content

Disable esc key on GraphiQL; Fix Playground styles in local dev#6268

Merged
mirekm merged 2 commits intomainfrom
fix/disable-esc-gqlexplorer
Jan 22, 2026
Merged

Disable esc key on GraphiQL; Fix Playground styles in local dev#6268
mirekm merged 2 commits intomainfrom
fix/disable-esc-gqlexplorer

Conversation

@mirekm
Copy link
Member

@mirekm mirekm commented Jan 21, 2026

No description provided.

@mirekm mirekm requested a review from a team as a code owner January 21, 2026 16:18
@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

🦋 Changeset detected

Latest commit: 5f61007

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

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR disables the Escape key in the GraphiQL playground modal and fixes styling issues in local development. The implementation moves from handling Escape key events at the keyboard listener level to disabling them at the modal component level, providing a cleaner and more reliable solution.

Changes:

  • Added disableEscapeKeyDown prop to Modal Content component to prevent Escape key from closing modals
  • Removed custom Escape key handler from useDevModeKeyTrigger hook, simplifying the implementation
  • Added GraphiQL CSS import to ensure proper styling in local development

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/components/Modal/Content.tsx Added disableEscapeKeyDown prop to allow modals to prevent closing via Escape key
src/components/GraphiQLPlain/GraphiQL.tsx Added CSS import for GraphiQL styles to fix rendering in local development
src/components/DevModePanel/useDevModeKeyTrigger.ts Removed Escape key handler and simplified hook signature
src/components/DevModePanel/DevModeProvider.tsx Updated to remove unused handleClose function and parameter
src/components/DevModePanel/DevModePanel.tsx Applied disableEscapeKeyDown prop to DevMode modal

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.60%. Comparing base (6b89f21) to head (5f61007).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/components/DevModePanel/DevModeProvider.tsx 0.00% 1 Missing ⚠️
...rc/components/DevModePanel/useDevModeKeyTrigger.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6268      +/-   ##
==========================================
+ Coverage   42.59%   42.60%   +0.01%     
==========================================
  Files        2454     2454              
  Lines       41653    41649       -4     
  Branches     9569     9219     -350     
==========================================
+ Hits        17743    17746       +3     
- Misses      22668    23872    +1204     
+ Partials     1242       31    -1211     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mirekm mirekm merged commit 6c31454 into main Jan 22, 2026
14 checks passed
@mirekm mirekm deleted the fix/disable-esc-gqlexplorer branch January 22, 2026 08:42
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.

3 participants