-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[AO] Update the design of Threshold rule creation form #163313
[AO] Update the design of Threshold rule creation form #163313
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
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 metrics_row_with_agg
file handles what this one was doing.
expect(valueMatch).toBeTruthy(); | ||
}); | ||
|
||
it('should render a helpText for the of expression', async () => { |
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.
This test is no longer relevant as we removed its related code, the OF expression
Pinging @elastic/actionable-observability (Team: Actionable Observability) |
@@ -20,7 +20,7 @@ export const LABEL_LABEL = i18n.translate( | |||
export const LABEL_HELP_MESSAGE = i18n.translate( | |||
'xpack.observability.threshold.rule.alertFlyout.customEquationEditor.labelHelpMessage', |
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.
Make sure to rename the id or remove the related translations manually, as it is not clear when changing the (link)defaultMessage
, the related translations will be updated.
Update: I asked for an update in the thread that I shared, and I got an answer, no need to change anything :)
I am first checking the UI locally, I will check the code later.
We can use Also, for the @maciejforcone, what do you think? |
When adding the second condition, the position of the delete icon is a bit off.
@maciejforcone In the design, we don't have a delete icon for the first condition, don't we want to give the user the option to delete the first condition instead of the second if they want to? |
@maciejforcone Should we show the default equation in the ![]() Update ![]() |
@fkanout I noticed when the delete button is added, the aggregation width gets smaller, and there is a jump: Current version Screen.Recording.2023-08-11.at.17.06.06.movDesign ![]() Also, I am missing the divider between conditions according to design: ![]() |
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.
Overall looks good, nice job! 👏🏻
Added some questions and comments :)
<EuiSpacer size="xs" /> | ||
<EuiExpression | ||
data-test-subj="customEquation" | ||
description={'Equation'} |
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.
Do we need to translate this?
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.
Added the i18n
/> | ||
); | ||
}); | ||
const metricRows = customMetrics?.map((row) => ( |
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! 🧹
)} | ||
{criticalThresholdExpression} | ||
</StyledExpressionRow> | ||
<StyledExpressionRow style={{ gap: aggType !== 'custom' ? 24 : 12 }} /> | ||
|
||
{aggType === Aggregators.CUSTOM && ( |
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.
Is this condition still needed, or can we get rid f it?
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.
Deleted
@maryam-saeidi, It's already there, but maybe you don't have the last version of the PR branch.![]() ![]() |
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.
LGTM
Addressed your code related comments. UI/UX questions and comments (tweaks) could be done in a follow up PRs.
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: cc @fkanout |
Summary
Fixes #162768
Fixes #162544
After update