[8.x] fix tty and related tests (#206919) #207205
Merged
+47
−38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
main
to8.x
:Questions ?
Please refer to the Backport tool documentation
\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\nCo-authored-by: Elastic Machine ","sha":"e7b5f3d84401ca0861b8d18588277e1d11e188ba","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor","React@18"],"title":"fix tty and related tests","number":206919,"url":"https://github.com//pull/206919","mergeCommit":{"message":"fix tty and related tests (#206919)\n\n## Summary\r\n\r\nCulled from https://github.com//pull/206411\r\n\r\nThis PR is informed from the work that's being done for the migration to\r\nReact 18, whilst trying out kibana with react 18 we had couple of test\r\nfail relating to this particular component, details here\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/266993#0194655f-1466-4ee3-80ed-54e398b09492)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/266993/jobs/0194655f-1466-4ee3-80ed-54e398b09492/artifacts/01946583-34ed-444a-bc55-10e684c325ef),\r\nit's worth mentioning the way the component was written causes\r\nunnecessary re-renders that doesn't actually make the interval for the\r\ntty playspeed exactly constant. The approach taken here is such that\r\nthere's no need to depend on state change to cause the next line to be\r\nwritten, now we setup a timer interval just once for the entire duration\r\nthat the tty is playing, and said timer only ever gets cleaned up on\r\npause.\r\n\r\n\r\nP.S. This fix does not utilize any APIs from react 18 so it's backward\r\ncompatible with our current version of react.\r\n\r\n### Checklist\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\nCo-authored-by: Elastic Machine ","sha":"e7b5f3d84401ca0861b8d18588277e1d11e188ba"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com//pull/206919","number":206919,"mergeCommit":{"message":"fix tty and related tests (#206919)\n\n## Summary\r\n\r\nCulled from https://github.com//pull/206411\r\n\r\nThis PR is informed from the work that's being done for the migration to\r\nReact 18, whilst trying out kibana with react 18 we had couple of test\r\nfail relating to this particular component, details here\r\n[[job]](https://buildkite.com/elastic/kibana-pull-request/builds/266993#0194655f-1466-4ee3-80ed-54e398b09492)\r\n[[logs]](https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/266993/jobs/0194655f-1466-4ee3-80ed-54e398b09492/artifacts/01946583-34ed-444a-bc55-10e684c325ef),\r\nit's worth mentioning the way the component was written causes\r\nunnecessary re-renders that doesn't actually make the interval for the\r\ntty playspeed exactly constant. The approach taken here is such that\r\nthere's no need to depend on state change to cause the next line to be\r\nwritten, now we setup a timer interval just once for the entire duration\r\nthat the tty is playing, and said timer only ever gets cleaned up on\r\npause.\r\n\r\n\r\nP.S. This fix does not utilize any APIs from react 18 so it's backward\r\ncompatible with our current version of react.\r\n\r\n### Checklist\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\nCo-authored-by: Elastic Machine ","sha":"e7b5f3d84401ca0861b8d18588277e1d11e188ba"}}]}] BACKPORT-->