Disable esc key on GraphiQL; Fix Playground styles in local dev#6268
Disable esc key on GraphiQL; Fix Playground styles in local dev#6268
Conversation
🦋 Changeset detectedLatest commit: 5f61007 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
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
disableEscapeKeyDownprop to Modal Content component to prevent Escape key from closing modals - Removed custom Escape key handler from
useDevModeKeyTriggerhook, 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
No description provided.