-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
add error callout on watch details page #36139
add error callout on watch details page #36139
Conversation
Pinging @elastic/es-ui |
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 looks great, tested locally and had a few UX suggestions.
}); | ||
} | ||
|
||
if (json.jira.fields.project && !json.jira.fields.project.key) { |
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.
I can imagine a user getting frustrated if they fix json.jira.fields
only to be yelled at for not having json.jira.fields.project
, and then fix json.jira.fields.project
only to be yelled at for not having json.jira.fields.project.key
. I think it might be a better UX if we just check for get(json, 'actionJson.jira.fields.project.key')
and then tell them they need json.jira.fields.project.key
. WDYT?
This comment applies to the issuetype
validation below, too.
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.
Good point :) Fixed!
@@ -134,6 +133,34 @@ const WatchDetailUi = ({ watchId }: { watchId: string }) => { | |||
|
|||
<EuiSpacer size="s" /> | |||
|
|||
{actionErrors && ( | |||
<EuiCallOut |
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.
Nice call! I think this is a big improvement over the modal. Is it possible for there to be a lot of actions, and they could all have errors? In this case, the callout would become very tall, and it would be difficult to correlate an error in the callout with a row in the actions table.
If you agree, then I think a more usable solution would be to make each "Config error" status a link which, when clicked, opens a flyout containing a danger callout like this one, except it only contains the errors for that specific action.
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.
> | ||
{Object.keys(actionErrors).map((action: string) => ( | ||
<Fragment key={action}> | ||
<EuiText size="xs"> |
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.
💔 Build Failed |
eab7d0a
to
178429c
Compare
💚 Build Succeeded |
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.
Tested locally, code LGTM
Changes in this PR include:
Note: I switched to the callout instead of a modal, since
EUI
docs seem to discourage using a modal for this type of usage. Let me know if you have any feedback regarding this.Testing:
For example, this watch adds an email watch without the
to
property (Email action attributes).Screenshots:
w/ changes:
old UI (for reference):