Open
Conversation
when already fully typed out, for consistency. Previous when typing COLOR_RED the suggestion for COLOR_RED would show, but once COLOR_RED was fully typed out the suggestion box would vanish. This was intended, but I think was the wrong choice - it's better to still allow the user to hit enter and not suddenly end up on a newline.
- Shows when typing - Ctrl-Space can trigger manually, Escape hides it - Some other small related UI adjustments
|
Oliver-Quail
requested changes
May 11, 2025
Collaborator
Oliver-Quail
left a comment
There was a problem hiding this comment.
Overall a very good new feature.
Please see comments for some suggested changes regarding best practice
| flexDirection: "column" | ||
| }}); | ||
|
|
||
| let functionHint = elem("div", {class: "sk-contents sk-notification sk-function-hint sk-contents-focusable", tabindex: "10"}, [ |
Collaborator
There was a problem hiding this comment.
Just out of interest why is tabindex set to 10?
Contributor
Author
There was a problem hiding this comment.
Honestly this is just to get the sk-contents-focusable focus-within outline working 😅, any tabindex will do. Better suggestions welcome there!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a code hinting window that automatically pops up when typing. It shows the parameters for the current function, and other overloads can be switched between with the arrows on the side. It can be triggered to show up using Ctrl-Space, and hidden using Escape.
The bulk of the logic is in
codeHinter.js. It handles the following:It also includes some other minor changes:
waitcursorKnown issues:
Thanks if you can take a look at this! I'd definitely appreciate any feedback on how the code could be improved, any aspects that seem like they could cause issues longer term, or if there are any remaining UI issues with it that I overlooked haha.
I'm also wondering if perhaps it could get in the way at times - maybe there should be a way to permanently toggle it on/off? It'd also be cool to consider how it could be further expanded - I know VS Code can show function/parameter descriptions as well, perhaps that could be future work from this. So hoping to make sure the code is reasonably readable haha.
Thanks! 😃
Type of change
How Has This Been Tested?
Testing Checklist
Checklist