-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Show webview about missing installation dependencies #2720
Conversation
packages/cursorless-vscode/resources/installationDependencies.js
Outdated
Show resolved
Hide resolved
packages/cursorless-vscode/resources/installationDependencies.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than building up the HTML manually with JavaScript, since our layout is quite simple, let's just move this to a HTML file that the script can load and hydrate. I think the result will be more maintainable.
We don't have access to a templating library, but since we only have a couple of variables to inject we can just do this manually. There can still be some dynamic JavaScript as necessary but we don't need to build the entire template that way.
This also makes it easier to use a CSS block in rather than inlining all the styles for each block. We could also consider putting that in its own dedicated file and have the script load and inject it, although the style is pretty simple that it may not be worth it.
It would be nice if you could just open the html file locally (file://) to iterate on the design, and this code would just make it work within the VS Code webview context.
Co-authored-by: Phil Cohen <phillip@phillip.io>
Co-authored-by: Phil Cohen <phillip@phillip.io>
packages/cursorless-vscode/resources/installationDependencies.html
Outdated
Show resolved
Hide resolved
packages/cursorless-vscode/resources/installationDependencies.html
Outdated
Show resolved
Hide resolved
…html Co-authored-by: Phil Cohen <phillip@phillip.io>
…html Co-authored-by: Phil Cohen <phillip@phillip.io>
Came up during #2720; if you land on the README it doesn't actually tell you what to do. ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
Came up during cursorless-dev/cursorless#2720; if you land on the README it doesn't actually tell you what to do. ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
Came up during #2720; if you land on the README it doesn't actually tell you what to do. ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet
If the user is missing some installation dependencies. eg talon, cursorless-talon, command server, we now show a web view informing them
Fixes #1953
Fixes #528
Checklist