-
Notifications
You must be signed in to change notification settings - Fork 512
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
fix(ai-help): nicer error message #10424
Conversation
Add an icon and background for the error generating answer error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, just one nit (missed opportunity).
@@ -6,6 +6,6 @@ export const MESSAGE_SEARCHING = "Searching for MDN content…"; | |||
export const MESSAGE_SEARCHED = "Consulted MDN content:"; | |||
export const MESSAGE_ANSWERING = "Generating your answer…"; | |||
export const MESSAGE_ANSWERED = "Answer:"; | |||
export const MESSAGE_FAILED = "Error generating your answer!"; | |||
export const MESSAGE_FAILED = "Error generating your answer! Please try again."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, could we add the "Please try again" in React and make "try again" a button/link that resubmits the question? Like here:
yari/client/src/plus/ai-help/index.tsx
Lines 677 to 680 in 4a663e1
Please{" "} | |
<Button type="link" onClickHandler={retryLastQuestion}> | |
try again | |
</Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message looks duplicated.
One nit: Can you update the screenshots in the PR description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Add an icon and background for the error generating answer error message.
(MP-678)
Screenshots
Before
After
How did you test this change?
Added
<div className="ai-help-message-progress errored">{MESSAGE_FAILED}</div>
inyari/client/src/plus/ai-help/index.tsx
Line 320 in 4a663e1