Skip to content
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

[8.9] [Security Solution] Use a stable reference for tour context value (#160487) #160692

Open
wants to merge 1 commit into
base: 8.9
Choose a base branch
from

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.9:

Questions ?

Please refer to the Backport tool documentation

…astic#160487)

## Summary

The TourContext value was a const object declared in the render of a
component, which meant it was referentially different on every render,
this context provider is so high up in the component tree, this is a
problem and causing some re-renders. Many ways to fix this, but I opted
for something that kept the code as close to the existing code as I
could. A library like why-did-you-render will catch this, also eslint
will if you just try to log the value of context in a useEffect like
below:
<img width="1182" alt="image"
src="https://github.com/elastic/kibana/assets/56408403/64a5c8d3-24f9-4918-a9ba-fc36bbc0b671">
Nothing should change from a functionality/user perspective.

(cherry picked from commit 96e6e22)
@kibana-ci
Copy link
Collaborator

kibana-ci commented Jun 27, 2023

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #5 / AlertsTableState field browser should insert a new field as column when its not a default one
  • [job] [logs] Security Solution Tests #6 / Detections : Page Filters Alert list is updated when the alerts are updated
  • [job] [logs] Security Solution Tests #6 / Detections : Page Filters Alert list is updated when the alerts are updated
  • [job] [logs] Security Solution Tests #6 / Detections : Page Filters Impact of inputs should recover from invalide kql Query result
  • [job] [logs] Security Solution Tests #6 / Detections : Page Filters Impact of inputs should recover from invalide kql Query result

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 11.0MB 11.0MB +215.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 13 15 +2
securitySolution 415 419 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 14 16 +2
securitySolution 496 500 +4
total +6

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kqualters-elastic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants