[SIEM] Start of deprecated lifecycle refactor#46293
[SIEM] Start of deprecated lifecycle refactor#46293stephmilovic merged 12 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/siem |
|
Hi @stephmilovic, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in your Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile? |
💔 Build Failed |
x-pack/legacy/plugins/siem/public/components/auto_sizer/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/auto_sizer/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/auto_sizer/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/auto_sizer/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/auto_sizer/index.tsx
Outdated
Show resolved
Hide resolved
|
jenkins, test it |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
x-pack/legacy/plugins/siem/public/components/auto_sizer/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/edit_data_provider/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/edit_data_provider/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/event_details/stateful_event_details.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/event_details/stateful_event_details.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
we might need to do something global instead of doing it for every single test files
There was a problem hiding this comment.
Agreed, I created a new issue for this #46469
x-pack/legacy/plugins/siem/public/components/fields_browser/field_browser.tsx
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/siem/public/components/fields_browser/index.tsx
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
There was a problem hiding this comment.
nit - you do not even need the return
💚 Build Succeeded |
There was a problem hiding this comment.
LGTM, I tested locally and I reviewed the code. With this PR we will be in better shape when we moved to a more hooks way app. @stephmilovic I Appreciate all the work and fix that you/we encounter during the review process.
- stephs edit, more bugs :(
💚 Build Succeeded |
We found more bugs, @steph and I agree to more testing to make sure that we won't break anything with this PR
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
💚 Build Succeeded |
💔 Build Failed |
|
retest |
|
After much pain, |
💚 Build Succeeded |
XavierM
left a comment
There was a problem hiding this comment.
LGTM
I re-tested locally, I did not see any errors
💔 Build Failed |
💚 Build Succeeded |
Summary
Resolves https://github.com/elastic/siem-team/issues/456
This PR refactors many many components from
PureComponenttomemo. We have been having unintentional side effects in some of our render phase lifecycle methods. This PR removes a few effects that we caught including:componentWillMount in navigation/index.tsxcomponentWillReceiveProps in navigation/index.tsxcomponentWillReceiveProps in tab_navigation/index.tsxIt also begins a refactor to remove any lifecycle methods and replace with hooks. I had to cut myself off, and will continue in a new PR as some of the components I have my eye to refactor are a bit complicated and this PR is already quite large. The PR also removes
LoadMoreTableas it is no longer in use.Please thoroughly test, manually and with Cypress. This doesn't change functionality, just updated syntax and reduced renders. Refactored components include:
AddToKqlComponentAutoSizerDataDrivenColumnsDeleteTimelineModalButtonDragDropContextWrapperComponentDraggableWrapperComponentFieldsBrowserFlyoutPaneComponentFooter(timeline)Header(timeline column)HelpMenuComponentHostsFilterComponentHostsTableComponentKueryAutocompletionLastUpdatedAtLazyAccordionNetworkFilterComponentNetworkTopNFlowTableComponentNoteCardsNotesOpenTimelineModalButtonPagingControlPropertiesProviderItemBadgeResizeableSiemNavigationComponentStatefulBodyComponentStatefulEditDataProviderStatefulEventStatefulEventDetailsStatefulFieldsBrowserComponentStatefulSearchOrFilterComponentStatefulTimelineComponentSuperDatePickerComponentTabNavigationWithHoverActionsRemaining refactors will take place in the following issues:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers