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

demo: monaco type links for hover #3387

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

demo: monaco type links for hover #3387

wants to merge 6 commits into from

Conversation

acao
Copy link
Member

@acao acao commented Aug 2, 2023

this is an example of how to pass type information when clicking a type in a hover

currently we cannot figure out how to get it to work without causing a regression in the hover, where the code block styling is reverted to a simple non-tokenized code block, in order to get the <a href="command to work

type-info-on-hover-click

the only mystery is how to get this working and preserve syntax highlighting for hover types!

TODO:

  • generate the command inside monaco-graphql so we can pass the command ID to the graphql-language-service dynamically
  • execute a similar command on command/ctrl+click

@changeset-bot
Copy link

changeset-bot bot commented Aug 2, 2023

🦋 Changeset detected

Latest commit: 8719cd9

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

This PR includes changesets to release 11 packages
Name Type
graphql-language-service Patch
cm6-graphql Patch
codemirror-graphql Patch
@graphiql/react Patch
graphiql Patch
graphql-language-service-cli Patch
graphql-language-service-server Patch
monaco-graphql Patch
@graphiql/plugin-code-exporter Patch
@graphiql/plugin-explorer Patch
vscode-graphql 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

if (options.typeLinks && options.useMarkdown) {
text(
into,
`\n\`\`\`](command:DYNAMIC_1?${encodeURIComponent(
Copy link
Member Author

Choose a reason for hiding this comment

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

@jonathanawesome where the magic happens 😆

@acao acao changed the title demp: monaco type links demo: monaco type links Aug 2, 2023
@netlify
Copy link

netlify bot commented Aug 2, 2023

Deploy Preview for graphiql-test ready!

Name Link
🔨 Latest commit 8719cd9
🔍 Latest deploy log https://app.netlify.com/sites/graphiql-test/deploys/64cacd270b34ab0008ef2f89
😎 Deploy Preview https://deploy-preview-3387--graphiql-test.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #3387 (8719cd9) into main (7856b25) will increase coverage by 0.01%.
Report is 3 commits behind head on main.
The diff coverage is 83.13%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3387      +/-   ##
==========================================
+ Coverage   55.76%   55.77%   +0.01%     
==========================================
  Files         110      110              
  Lines        5242     5266      +24     
  Branches     1425     1437      +12     
==========================================
+ Hits         2923     2937      +14     
- Misses       1896     1902       +6     
- Partials      423      427       +4     
Files Changed Coverage Δ
...guage-service/src/interface/getHoverInformation.ts 61.81% <50.00%> (-2.34%) ⬇️
...nguage-service/src/utils/getVariablesJSONSchema.ts 90.59% <91.04%> (-3.28%) ⬇️

... and 2 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

@acao acao changed the title demo: monaco type links demo: monaco type links for hover Aug 8, 2023
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.

2 participants