-
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
[Cases] Use templates when creating a case #185880
[Cases] Use templates when creating a case #185880
Conversation
@@ -102,7 +114,11 @@ const ConnectorsDropdownComponent: React.FC<Props> = ({ | |||
margin-right: ${euiTheme.size.m}; | |||
margin-bottom: 0 !important; | |||
`} | |||
type={getConnectorIcon(triggersActionsUi, connector.actionTypeId)} | |||
type={ |
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 is needed to avoid the following bug:
Screen.Recording.2024-06-11.at.3.59.54.PM.mov
The icon class can be a lazy-loaded component. React will fall back to the nearest Suspense
causing the flyout on each render of the SVG icon to appear and disappear. By adding suspense here we isolate the loading inside the select option. With the fix:
Screen.Recording.2024-06-11.at.4.18.06.PM.mov
Thanks @umbopepato! Your investigation of the flaky tests made me figure it out!
x-pack/plugins/cases/public/components/case_form_fields/assignees.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/cases/public/components/case_form_fields/connector.tsx
Outdated
Show resolved
Hide resolved
@js-jankisalvi About:
@adcoelho I fixed the test with the infinitive loop here |
Created issue
yes, sure 👍 |
@js-jankisalvi Thank! Fixed in |
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.
Verified locally, works as expected 👍
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @cnasikas |
I've created a docs issue because I did not see one. |
Summary
This PR adds the ability for users to select a template when creating a case. When a user selects a template the cases form fields are populated with the values from the template. The solution picker in the flyout changed as:
Bug fixes
Testing
Fixes: #181871
Depends on: #185877
Checklist
Delete any items that are not applicable to this PR.
For maintainers