Skip to content

Show webview about missing installation dependencies#2720

Merged
phillco merged 11 commits into
mainfrom
installationDependencies
Jan 18, 2025
Merged

Show webview about missing installation dependencies#2720
phillco merged 11 commits into
mainfrom
installationDependencies

Conversation

@AndreasArvidsson

@AndreasArvidsson AndreasArvidsson commented Jan 11, 2025

Copy link
Copy Markdown
Member

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
Comment thread packages/cursorless-vscode/resources/installationDependencies.js Outdated
Comment thread packages/cursorless-vscode/resources/installationDependencies.js Outdated

@phillco phillco left a comment

Copy link
Copy Markdown
Member

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.

Comment thread packages/cursorless-vscode/src/InstallationDependencies.ts Outdated
Comment thread packages/cursorless-vscode/src/InstallationDependencies.ts Outdated
Comment thread packages/cursorless-vscode/resources/installationDependencies.html Outdated
Comment thread packages/cursorless-vscode/resources/installationDependencies.html Outdated
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
@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

Development

Successfully merging this pull request may close these issues.

Detect common installation mistakes and show error message Show installation instructions on Cursorless install

2 participants