Skip to content
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

DisablefillLeafsOnComplete by default #2488

Merged
merged 3 commits into from
Nov 3, 2022
Merged

DisablefillLeafsOnComplete by default #2488

merged 3 commits into from
Nov 3, 2022

Conversation

acao
Copy link
Member

@acao acao commented Jun 8, 2022

Users found this generally annoying by default, especially when there are required arguments

Fixes #2121

Without automatically prompting autocompletion of required arguments as well as lead expansion, it makes the extension harder to use

You can now supply this in your graphql config:

config.extensions.languageService.fillLeafsOnComplete

Setting it to to true will enable this feature.
Will soon add the ability to manually enable this in monaco-graphql as well.

For both, this kind of behavior would be better as a keyboard command, context menu item &/or codelens prompt. We could even re-create the graphiql behavior for this, where after choosing an autocomplete item, CMD + return will automatically fill leaf fields

@changeset-bot
Copy link

changeset-bot bot commented Jun 8, 2022

🦋 Changeset detected

Latest commit: e385cc0

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

This PR includes changesets to release 4 packages
Name Type
graphql-language-service-server Patch
monaco-graphql Patch
vscode-graphql Patch
graphql-language-service-cli 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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

The latest changes of this PR are available as canary in npm (based on the declared changesets):

graphql-language-service-cli@3.3.12-canary-27ecf339.0
graphql-language-service-server@2.9.2-canary-27ecf339.0
monaco-graphql@1.1.4-canary-27ecf339.0

@acao acao force-pushed the fill-leafs-opt-in branch 2 times, most recently from a408a27 to c79248b Compare June 8, 2022 10:23
@acao acao marked this pull request as draft June 8, 2022 10:49
@acao
Copy link
Member Author

acao commented Jun 8, 2022

Bah, forgot I need to change a bunch of tests

@acao
Copy link
Member Author

acao commented Jun 30, 2022

@stonexer what do you think - updating these tests with minor changes to the language service are cumbersome to the point that I wonder if snapshot tests would be more ideal sometimes?

the snapshot diffs would tell us everything we need to know about the changes. and then i could remove the boilerplate for asserting the expected output

@stonexer
Copy link
Collaborator

stonexer commented Jul 1, 2022

I also think the snapshot test might be more efficient on the language service. And we can be a little more detailed when we review the snapshot diff.

@acao acao marked this pull request as ready for review October 22, 2022 22:09
@acao acao force-pushed the fill-leafs-opt-in branch 2 times, most recently from f456264 to 21f65dc Compare October 22, 2022 22:25
Users found this generally annoying by default, especially when there are required arguments

Without automatically prompting autocompletion of required arguments as well as lead expansion, it makes the extension harder to use

You can now supply this in your graphql config:

`config.extensions.languageService.fillLeafsOnComplete`

Setting it to to `true` will enable this feature.
Will soon add the ability to manually enable this in `monaco-graphql` as well.

For both, this kind of behavior would be better as a keyboard command, context menu item &/or codelens prompt
@acao
Copy link
Member Author

acao commented Oct 27, 2022

@jonathanawesome you'll be pleased to see this bug fixed I'm sure, haha

Screenshot 2022-10-27 at 15 11 35

@acao acao merged commit 967006a into main Nov 3, 2022
@acao acao deleted the fill-leafs-opt-in branch November 3, 2022 22:43
This was referenced Nov 3, 2022
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.

monaco-graphql tabs through intellisense too aggressively
2 participants