-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[Meta] React@18 legacy mode upgrade QA #203114
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
Comments
Pinging @elastic/appex-sharedux (Team:SharedUX) |
@Dosant I've checked off this line. All parts of the Observability UI should be accounted for with the individual issues for individual teams. |
@Dosant Core-review complete with no significant findings. |
@Dosant |
I completed the testing for the Fleet + Integrations plugins and all worked as expected. Thanks for the great work here! |
We completed testing for threat-hunting thanks as well. |
Completed testing for entities and streams program. Everything is working as expected |
We've completed the React 18 manual testing for our areas in @elastic/obs-ux-management-team |
Test completed across Kibana Visualizations components, nothing concerning this upgrade have been found |
## Summary This PR upgrades React packages to version 18, while keeping Kibana running in Legacy mode (`ReactDOM.render`). This is the first phase of the React@18 upgrade; the second phase will gradually migrate Kibana to Concurrent mode (`createRoot`) (exact plan is tbd). Upgrade is intended to be non-breaking and behave just like React@17, but it still requires thorough testing from all teams that own UI to discover any potential critical UI issues. The testing was done in #203114. Most of the breaking work was completed in previous PRs and this PR only includes minor breaking jest tests tweaks / snapshots updates ### Backports: - This won't be backported to 9.0 - We will discuss if we should backport this to 8.x ### Risks Kibana’s UI functional tests coverage and significant manual testing that was done by a lot of teams in #203114 gives us a lot of confidence. However, since this was a large internal change for React they still could be issues hidden in "remote" parts of UIs, think of blank screens, error splash screens, unresponsive pages, new errors in the console, unpredictable UI behavior (like laggy text inputs that skip letters when typing fast). --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Konrad Szwarc <konrad.szwarc@elastic.co>
Rule Management team testing completed. No issues found 🚀 Also, removed the |
The React@18 upgrade PR was merged into main today. Thanks to everyone who helped with testing! I'll keep this issue open for a week or two to follow up on any issues that may arise |
Amazing job @Dosant and team! |
## Summary This PR upgrades React packages to version 18, while keeping Kibana running in Legacy mode (`ReactDOM.render`). This is the first phase of the React@18 upgrade; the second phase will gradually migrate Kibana to Concurrent mode (`createRoot`) (exact plan is tbd). Upgrade is intended to be non-breaking and behave just like React@17, but it still requires thorough testing from all teams that own UI to discover any potential critical UI issues. The testing was done in elastic#203114. Most of the breaking work was completed in previous PRs and this PR only includes minor breaking jest tests tweaks / snapshots updates ### Backports: - This won't be backported to 9.0 - We will discuss if we should backport this to 8.x ### Risks Kibana’s UI functional tests coverage and significant manual testing that was done by a lot of teams in elastic#203114 gives us a lot of confidence. However, since this was a large internal change for React they still could be issues hidden in "remote" parts of UIs, think of blank screens, error splash screens, unresponsive pages, new errors in the console, unpredictable UI behavior (like laggy text inputs that skip letters when typing fast). --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Konrad Szwarc <konrad.szwarc@elastic.co>
@rbrtj found one issue #217291 it is the same as one we saw previously mentioned in the description: useEffect must return undefined or destroy function, objects no longer allowed #195421- useEffect(() => fetch(), []); // fails with an error, likely blank screen
+ useEffect(() => {
+ fetch()
+ }, []); So far this is the only issue I've heard of, which sounds great :) I'll close this issue, but feel free to link more if anything else come up |
## Summary This PR upgrades React packages to version 18, while keeping Kibana running in Legacy mode (`ReactDOM.render`). This is the first phase of the React@18 upgrade; the second phase will gradually migrate Kibana to Concurrent mode (`createRoot`) (exact plan is tbd). Upgrade is intended to be non-breaking and behave just like React@17, but it still requires thorough testing from all teams that own UI to discover any potential critical UI issues. The testing was done in elastic#203114. Most of the breaking work was completed in previous PRs and this PR only includes minor breaking jest tests tweaks / snapshots updates ### Backports: - This won't be backported to 9.0 - We will discuss if we should backport this to 8.x ### Risks Kibana’s UI functional tests coverage and significant manual testing that was done by a lot of teams in elastic#203114 gives us a lot of confidence. However, since this was a large internal change for React they still could be issues hidden in "remote" parts of UIs, think of blank screens, error splash screens, unresponsive pages, new errors in the console, unpredictable UI behavior (like laggy text inputs that skip letters when typing fast). --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Konrad Szwarc <konrad.szwarc@elastic.co> (cherry picked from commit f7fa6dd) # Conflicts: # package.json # x-pack/solutions/security/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/__snapshots__/entry_content.test.tsx.snap # x-pack/solutions/security/plugins/security_solution/public/explore/network/components/arrows/__snapshots__/index.test.tsx.snap # x-pack/solutions/security/plugins/session_view/public/components/process_tree_alert/__snapshots__/index.test.tsx.snap # yarn.lock
|
Shared UX team is working on React@18 upgrade.
We plan to upgrade in 2 phases:
We’re almost ready to complete phase 1:
The final PR for the React@18 packages upgrade is minimal—it only updates the packages and includes a few snapshot updates. While we don’t expect any immediate benefits from this upgrade, it is an important step toward migrating to concurrent rendering, which will unlock performance improvements and new APIs.
Kibana’s UI functional tests coverage and a small number of discovered runtime issues give us a lot of confidence, but we need teams that own any UI to help with QA before the merge to discover any critical UI issues that could have been missed by functional testing.
#kibana-react-18
channelIf you have questions, please do not hesitate to reach out to the shared-ux team in
#kibana-react-18
channelPer team sub-task list (feel free to convert to sub-issue)
Mark [x] when Completed when finished testing your UIs with React@18
How to test
Testing can be done locally by using the PR (#209337) or from main with
REACT_18=true
ENV flag:You can also use cloud or serverless deployment from that PR.
Tip
Kibana is built with and running React@18.2.0, muting legacy root warning.
__REACT_DEVTOOLS_GLOBAL_HOOK__.renderers.get(1).version
in consoleWhat to look for
Tip
Look for blank screens, error splash screens, unresponsive pages, new errors in the console, unpredictable UI behavior (like laggy text inputs that skip letters when typing fast). You can also review the list of addressed runtime issues discovered by functional tests in the section below
Runtime issues discovered by functional tests
useId
can't be used withquerySelector
The ID scheme that is produced by new
useId
hook returns IDs that look like:S1:
, but:
is not a valid character for CSS identifiers, so code like breaks:useEffect
must return undefined or destroy function, objects no longer alloweduseEffect
return value #195421.value
of controlled text input inuseEffect
is causing typing issuesuseLayoutEffect
insearch_box
eui#8047useLayoutEffect
when setting value from a prop inreact-monaco-editor
#195775This pattern for controlled inputs breaks when running in legacy mode where it worked fine with React@17
Consider situation like this. This is a controlled input but the value is updated async. With React@18 we noticed that the lag could become worse as we were seeing some new flaky tests because of this where input skips letter:
In this case a state reducer was not pure as it threw an error when executed the first time (and not at later times). React@17 executed that reducer twice so error didn't propagate to the UI, wheres in React@18 that behavior has changed and we saw that error on UI. More details in the PR.
useEffect deps updates caused infinite loop but for some reason it stabilized with React@17, but not with React@18
Issues discovered outside of functional tests
... Please add any issues that are found outside of functional tests ...
If you have questions, please do not hesitate to reach out to the shared-ux team in
#kibana-react-18
channelThe text was updated successfully, but these errors were encountered: