mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
This migrates the `Workspace::show_error` method to take a generic type that implements `WorkspaceError` instead. That trait containts methods to show a proper error message but most importantly means to help with providing actions given certain errors. The intention for this is rather easy: Whenever we show an error to the user on the workspace level, that error should be - actionable to a degree, even if that is only opening logs or whatnot - show a message that is understandable to the user - for not-too-critical errors, should hide after a certain delay and not force the user to dismiss it using their mouse. For now, there exist trait implementations for string error types and anyhow errors. The long term goal here is to get rid of these altogether and migrate everything to be strongly typed and especially actionable instead. Self-Review Checklist: - [ ] I've reviewed my own diff for quality, security, and reliability - [ ] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [X] Performance impact has been considered and is acceptable Release Notes: - N/A --------- Co-authored-by: Kirill Bulatov <kirill@zed.dev> Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||