-
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
fix(language-service): improve outline in embedded graphql #3848
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: a9d846d The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3848 +/- ##
==========================================
+ Coverage 63.98% 64.21% +0.22%
==========================================
Files 35 35
Lines 3088 3124 +36
Branches 951 962 +11
==========================================
+ Hits 1976 2006 +30
- Misses 1107 1113 +6
Partials 5 5
|
awesome work! my outline impl was originally quite half baked, thank you for fixing it! |
1f72129
to
a9d846d
Compare
rebasing this now - one spec file in the LSP server will fail, because of a known test bug, but I know this was already passing when you first submitted it, so it should work out fine! |
oof, yeah there were some upstream changes I think, let me take a closer look here within the week if you don't have time to |
In VSCode, I noticed that the editor sticky scroll headers were showing the wrong headers, and I tracked it down to the GraphQL language support. This also fixes the locations when you navigate to graphql sections using breadcrumbs or the outline panel.
I also emit outlines for all embedded graphql documents, rather than just the first one. This only works properly when the location data is correct (i tried this before fixing the location data, and it lead to some interesting results)
This PR also includes some additional typing and performance improvements, but I saw some mentions of an ongoing refactoring in the commit history, so I have just the targeted changes in a branch: main...forivall:graphiql:outline-embedded-offset-simple
I only added tests for my performance improvement, but let me know if you need more tests!