The main change is that "error" isn't a state anymore, but an optional attribute of a Conversation. That way, we can show the error at the bottom of the conversation instead of replacing the whole thing (after a few experimentations, it felt to be the best alternative)
Simple Error
Detailed Error
The "Dismiss" button clears the error. For detailed errors, it's possible to disable the Dismiss button, the Retry button, or both. The layout will adapt.
I also made it possible for detailed errors to be "warnings". It makes more sense when you want to report something to the user, but there is no need to retry. For instance:
But I still don't have a strong opinion on this. Feel free to iterate on that.
Same story for the design: I went for something that looks better, but is not too fancy. Feel free to make updates.
Other things:
Detailed errors support Markdown in title & message
Errors can be triggered from any conversation… but there is no "top-level" error yet.
I have only ported the "syntax highlight" error so far. But with the system in place, we will be able to port more!
Closes #41
The main change is that "error" isn't a state anymore, but an optional attribute of a Conversation. That way, we can show the error at the bottom of the conversation instead of replacing the whole thing (after a few experimentations, it felt to be the best alternative)
The "Dismiss" button clears the error. For detailed errors, it's possible to disable the Dismiss button, the Retry button, or both. The layout will adapt.
I also made it possible for detailed errors to be "warnings". It makes more sense when you want to report something to the user, but there is no need to retry. For instance:
But I still don't have a strong opinion on this. Feel free to iterate on that. Same story for the design: I went for something that looks better, but is not too fancy. Feel free to make updates.
Other things:
I have only ported the "syntax highlight" error so far. But with the system in place, we will be able to port more!