-
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
[ILM] Surfacing policy error state #89701
[ILM] Surfacing policy error state #89701
Conversation
… called if component is not mounted
…o added test for various form error notifications across the collapsed phases
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
Do we want to also include an error callout at the top of the policy? |
@mdefazio we could, but creating elements above where a user is inputting something introduces a jump that would be better to avoid IMO. What do you think? |
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 work @jloleysens! I think this is a great UX improvement. Code LGTM. Verified locally.
One small suggestion - I'm not sure if the toast notification is still necessary (I can't recall having one for our other forms), but maybe @mdefazio can weigh in there.
if (!isMounted.current) { | ||
return; | ||
} | ||
// This is a hack, we need to wait for the next tick to let all of the async validation complete |
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 it worth opening up an issue on the form lib side to consider improving 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.
Hey Alison, that is good point!
}; | ||
|
||
test('shows phase error indicators correctly', async () => { | ||
// This test simulates a user configuring a policy phase by phase. The flow is the following: |
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.
Thanks for adding these comments 👍
@elasticmachine merge upstream |
@elasticmachine merge upstream |
We are considering changing the implementation of how form errors are detected, in conversation with @sebelga . |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Implementation change summary:
|
Changes with the |
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.
Latest changes LGTM. I like this approach better 👍 . I did not retest.
* added policy top-level callout for error state * added form errors context. errors are sorted by their field path into phases * added data test subject attributes and prevent setErrors from getting called if component is not mounted * update copy * refactored errors context and optimised setting of context value. Also added test for various form error notifications across the collapsed phases * add test for non-phase specific policy validation error * Remove unused import * refactor how errors are listened to, use the new "onError" callback Co-authored-by: Kibana Machine <[email protected]>
* added policy top-level callout for error state * added form errors context. errors are sorted by their field path into phases * added data test subject attributes and prevent setErrors from getting called if component is not mounted * update copy * refactored errors context and optimised setting of context value. Also added test for various form error notifications across the collapsed phases * add test for non-phase specific policy validation error * Remove unused import * refactor how errors are listened to, use the new "onError" callback Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
💔 Build Failed
Failed CI Steps
Test FailuresKibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/ml/data_frame_analytics/feature_importance·ts.machine learning data frame analytics total feature importance panel and decision path popover binary classification job should display the feature importance decision path in the data gridStandard Out
Stack Trace
Kibana Pipeline / general / X-Pack Detection Engine API Integration Tests.x-pack/test/detection_engine_api_integration/security_and_spaces/tests/delete_signals_migrations·ts.detection engine api security and spaces enabled deleting signals migrations rejects the request if the user does not have sufficient privilegesStandard Out
Stack Trace
Kibana Pipeline / general / X-Pack API Integration Tests.x-pack/test/api_integration/apis/management/index_management/indices·js.apis management index management indices list should list all the indices with the expected properties and data enrichersStandard Out
Stack Trace
and 1 more failures, only showing the first 3. Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
Fix #87520
Adds top-level indications of ILM policy form error states for the collapsible phases.
How to test
Screenshots
Checklist
Delete any items that are not applicable to this PR.