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

Display toasts for successful or failed dev extension installs #22893

Closed
wants to merge 2 commits into from

Conversation

Swiftaff
Copy link
Contributor

@Swiftaff Swiftaff commented Jan 9, 2025

Closes #21237

Release Notes:

  • Added toasts to dev extension install process.

This is my first attempt at a github PR - please review and let me know if any issues with general approach or wording, or other changes needed!

I am emitting events from the dev extension install process, and subscribing to them from the workspace module (it can go elsewhere if more appropriate) to show toasts instead of silently failing, when installing a dev extension from the command palette or the extensions UI.

To test successful install toasts:

  1. use command palette - type F1, type 'dev', select 'zed: install dev extension', or press Ctrl-Shift-X to show Extensions tab, and click on 'Install Dev Extension' button
  2. select directory of a local dev extension which is not just a theme, e.g. I used this one https://github.com/WeetHet/reason-zed
    a) it will first popup with an initial autoclosing toast.
    image

b) then ideally it will succeed with a complete autoclosing toast.
image

Extensions can take a few seconds to install, so there can be a wait for the second toast - it may be worth adding a timed loop or just change wording to say please wait?

Test manifest error toast

  1. uninstall the dev extension if installed above
  2. edit the extension.toml manifest with an invalid key, e.g.'id_invalid = "reason"'
  3. use command palette or dev install button again to install
  4. displays autoclosing toast
    image

Test rustup error toast (the error first reported in this issue)

  1. commenting out line 354 in extension_builder.rs to simulate rustup failing - build zed
  2. uninstall the dev extension if installed above
  3. fix the manifest file if invalid from above
  4. use command palette or dev install button again to install
  5. displays toast error - manually closeable
    image

Note there are no changes for the 2nd part of this ticket mentioned by uncenter - unsure how to tackle that.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 9, 2025
@maxdeviant maxdeviant self-assigned this Jan 9, 2025
@maxdeviant
Copy link
Member

Thank you for taking the time to put together this PR!

I don't think this implementation is quite what we want to go with. For one, the workspace crate should not depend on extension_host.

I opened up #22914 to show an error toast when a dev extension fails to install.

@maxdeviant maxdeviant closed this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Install Dev Extension" silently fails because rustup is not installed
2 participants