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

Show webview about missing installation dependencies #2720

Merged
merged 11 commits into from
Jan 18, 2025

Conversation

AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Jan 11, 2025

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

Screenshot 2025-01-11T15-11-03 - Visual Studio Code

Checklist

  • [/] I have added tests
  • [/] I have updated the docs and cheatsheet
  • [/] I have not broken the cheatsheet

@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner January 11, 2025 14:15
Copy link
Member

@phillco phillco left a 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.

packages/cursorless-vscode/src/InstallationDependencies.ts Outdated Show resolved Hide resolved
AndreasArvidsson and others added 2 commits January 18, 2025 19:15
…html

Co-authored-by: Phil Cohen <phillip@phillip.io>
…html

Co-authored-by: Phil Cohen <phillip@phillip.io>
@phillco phillco enabled auto-merge January 18, 2025 18:16
@phillco phillco added this pull request to the merge queue Jan 18, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jan 18, 2025
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
Merged via the queue into main with commit ca1a80e Jan 18, 2025
15 checks passed
@phillco phillco deleted the installationDependencies branch January 18, 2025 18:41
cursorless-bot pushed a commit to cursorless-dev/cursorless-talon that referenced this pull request Jan 18, 2025
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
cursorless-bot pushed a commit that referenced this pull request Jan 18, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants