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

Automatically navigate to current type in DocExplorer #97

Closed
opatut opened this issue Feb 25, 2016 · 4 comments
Closed

Automatically navigate to current type in DocExplorer #97

opatut opened this issue Feb 25, 2016 · 4 comments

Comments

@opatut
Copy link

opatut commented Feb 25, 2016

I'd love to enable automatic documentation, so when I navigate within the query code, i.e. move the cursor in various places, the corresponding type is openend in DocExplorer.

Could be enabled/disabled by some toggle/checkbox at the bottom of the DocExplorer panel...

@asiandrummer
Copy link
Contributor

@opatut There's already a similar feature in typeahead - when you open up a typeahead, the bottom description box should contain a link to the page that has the corresponding type information. Would that suffice for you?

P.S. I do see a couple of typeahead states without the doc page link (e.g. VariableDeclaration and TypeCondition), and this shall be fixed soon.

@opatut
Copy link
Author

opatut commented Feb 26, 2016

While that feature is definitely useful, it's just not quite right for me. First, I have to move to the mouse to click that link to find out more about that type, and then it does not work quite well with the mouse (i.e. when moving the mouse down towards the Link, I hover over other typeahead elements, activating them, and my Link disappears -- also when clicking the link weird stuff happens to my focus and I cannot continue typing).

But that link gave me a different idea: instead of automatically updating the DocExplorer view when navigating, we could add Ctrl+Click (Cmd+Click ?) on Symbol names in the query input as action to open the corresponding type's docs. This would be similar to Eclipse's "Open declaration". We could then also add a shortcut to trigger this action for the item under the cursor (I think it's F3 in Eclipse, but I'm not sure).

That'd be less magic and less navigation between docs while simply typing your query. Also, probably better performance.

@asiandrummer
Copy link
Contributor

I can see how losing focus from the editor can cause pain. I think I'm growing on the idea.

Another shortcut makes sense - I'm not sure how a custom click action should play out, but it'd be a good workflow to treat doc explorer as a reference, which is exactly one of the purposes it should serve.

@leebyron
Copy link
Contributor

I really like this idea, @opatut! I think an "open declaration" feature would be great and agree that cmd-click is probably the right place to start with implementing this.

A keyboard shortcut to do the same for whatever is under your cursor is also a great idea.

leebyron added a commit that referenced this issue Jan 18, 2017
This leverages graphql/codemirror-graphql#96 to provide cmd+click to jump to the docs for tokens in the query and mouse-over tool tops to provide in context documentation as well.

Closes #97
leebyron added a commit that referenced this issue Jan 18, 2017
This leverages graphql/codemirror-graphql#96 to provide cmd+click to jump to the docs for tokens in the query and mouse-over tool tops to provide in context documentation as well.

Closes #97
leebyron added a commit that referenced this issue Jan 19, 2017
This leverages graphql/codemirror-graphql#96 to provide cmd+click to jump to the docs for tokens in the query and mouse-over tool tops to provide in context documentation as well.

Closes #97
leebyron added a commit that referenced this issue Jan 19, 2017
This leverages graphql/codemirror-graphql#96 to provide cmd+click to jump to the docs for tokens in the query and mouse-over tool tops to provide in context documentation as well.

Closes #97
leebyron added a commit that referenced this issue Jan 19, 2017
This leverages graphql/codemirror-graphql#96 to provide cmd+click to jump to the docs for tokens in the query and mouse-over tool tops to provide in context documentation as well.

Closes #97
acao pushed a commit to acao/graphiql that referenced this issue Jun 1, 2019
This builds on graphql#89 and graphql#90 to create a more specific parser rule and parser state for NamedType. This makes it easier to builds tools on top of codemirror-graphql which do interesting things when the names of types are encountered, such as jump-to-docs or hover cards.
acao pushed a commit to acao/graphiql that referenced this issue Jun 5, 2019
acao pushed a commit that referenced this issue Feb 20, 2022
feat(endpoint): Add picker for endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants