-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add useResponseEditor
hook to @graphiql/react
#2411
Conversation
🦋 Changeset detectedLatest commit: 81cd37a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
Codecov Report
@@ Coverage Diff @@
## main #2411 +/- ##
==========================================
+ Coverage 65.70% 68.17% +2.46%
==========================================
Files 85 76 -9
Lines 5106 4754 -352
Branches 1631 1558 -73
==========================================
- Hits 3355 3241 -114
+ Misses 1747 1509 -238
Partials 4 4
Continue to review full report at Codecov.
|
packages/graphiql-react/src/editor/components/image-preview.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
33b32ee
to
81cd37a
Compare
The latest changes of this PR are not available as canary, since there are no linked |
This moves over the logic for the last (read-only) editor: The response editor. We also move the
ImagePreview
component to@graphiql/react
as it's only used in theuseResponseEditor
hook. This allows us to remove the utilities fromgraphiql
that have been temporarily copied over in #2404 (commonKeys
,importCodeMirror
) as well as theCodeMirrorSizer
utility (each editor takes care of resizing itself now using theuseResizeEditor
hook).