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

fix(ai-help): nicer error message #10424

Merged
merged 7 commits into from
Feb 27, 2024
Merged

fix(ai-help): nicer error message #10424

merged 7 commits into from
Feb 27, 2024

Conversation

fiji-flo
Copy link
Contributor

@fiji-flo fiji-flo commented Jan 30, 2024

Summary

Add an icon and background for the error generating answer error message.

(MP-678)


Screenshots

Before

image

After

image


How did you test this change?

Added <div className="ai-help-message-progress errored">{MESSAGE_FAILED}</div> in

{(message.content ||
and commented out the code below.

Add an icon and background for the error generating
answer error message.
@fiji-flo fiji-flo requested a review from a team as a code owner January 30, 2024 12:56
@github-actions github-actions bot added plus work around features related to MDN Plus plus:ai-help labels Jan 30, 2024
Copy link
Contributor

@caugner caugner left a 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.";
Copy link
Contributor

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:

Please{" "}
<Button type="link" onClickHandler={retryLastQuestion}>
try again
</Button>

@fiji-flo fiji-flo requested a review from caugner February 14, 2024 09:28
Copy link
Contributor

@caugner caugner left a 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?

client/src/plus/ai-help/constants.tsx Outdated Show resolved Hide resolved
@fiji-flo fiji-flo requested a review from caugner February 20, 2024 08:54
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks:

image image

@caugner caugner merged commit f1c13d8 into main Feb 27, 2024
15 checks passed
@caugner caugner deleted the MP-678-ai-help-loading-error branch February 27, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plus:ai-help plus work around features related to MDN Plus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants