-
Notifications
You must be signed in to change notification settings - Fork 295
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
Update @wordpress/data to the latest version #1769
Comments
These are the warnings I see in the console, but they aren't errors and don't impact tests/usability of the plugin: That said, we could mark this as blocked by that issue so these warnings don't appear in the plugin. They do only appear in development mode, so the warnings won't appear in the production version of the plugin (here's the same site running the version created by I wouldn't consider it a blocker because those notices only appear in development. |
IB ✅ |
Further testing of this shows |
Moving this back to the execution backlog with a much higher estimate, as this issue has totally eluded me. Upgrading We should plan to upgrade these critical dependencies, but it will take a lot more time. That said, there's a further discussion to be had about our usage of |
Sounds good, thanks for clarifying @techanvil ! IB ✅ (part deux 🚀) |
@techanvil would you please open the next you've issues identified here? |
Thanks for calling that out @aaemnnosttv. I've created followups #6356 and #6357. |
QA Update: ✅Verified:
Spent quite a lot of time going through the plugin and checking messages in the console. Also enabled services like Dashboard Sharing, GA4 Activation Banner to ensure that these areas do not have any errors or UI issues. The QA team is continuing to be cautious while completing testing on other tickets to ensure we are thorough. |
I noticed a console error (React warning) when changing the date range on the dashboard, but this appears to be coming from Screenshot![image](https://user-images.githubusercontent.com/1621608/212181689-07d842be-2e5e-4a71-a9b6-dc2d8d5be31e.png)Happy to finally close this one out after more than 2 years in the making 🎉 |
@aaemnnosttv is it worth creating a ticket for this? |
Feature Description
While updating dependencies via #1356, it became apparent that there were some issues with
@wordpress/data
, which has prevented us from updating it to its latest version as well as preventing us from updating to the latest versions ofreact
andreact-dom
.Currently we're using
react
andreact-dom
16.12.0 and@wordpress/data
4.12.0.When updating
@wordpress/data
to a version newer than 4.12.0, we run into an error wheneveruseSelect
is used.When updating only
react
andreact-dom
to a version newer than 16.12.0, the following error is thrown when opening a Site Kit module's settings view:Looking into the latter, it seems this problem is also somehow caused by the
useSelect
hook implemented by@wordpress/data
. Let's dive deeper into what the problem is here. (Note that WordPress packages currently rely on an older React version 16.9.0.)useSelect
which we're usinguseSelect
Potentially we will end up blocked by
@wordpress/data
fixing the underlying issue - let's file an upstream issue / pull-request about the problem if we can figure out what it is.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
@wordpress/data
should be updated toits latest version (currently 4.27.3)4.23.0
(as a first step towards later versions).react
andreact-dom
may be updated but only as necessaryImplementation Brief
Please note: This IB has been scoped to updating to
@wordpress/data
version 4.23.0, as that is the version that introduces the change that breaks the majority of our tests (see this comment below). Subsequent issues should be raised, one for updating to version 4.27.3 (the latest version that supports React 16), and another to then investigate updating to a more recent version which supports React 17 (currently, the latest@wordpress/data
version is 7.6.0).@wordpress/data
version 4.23.0.Test Coverage
beforeAll
. This reduces the initial failing test count from 813 to 213 at the time of writing. However when it comes to fixing the remaining tests we can also use the approach that the WordPress devs use (again see the comment below), switching to fake timers and callingjest.runAllTimers()
as needed. Additionally the techniques seen in the previous PR are still useful.Note: The list of remaining failing test suites is as follows:
This is correct at the time of writing, to recreate the list run this command:
QA Brief
Changelog entry
@wordpress/data
to 4.23.0,react
andreact-dom
to 16.14.0.The text was updated successfully, but these errors were encountered: