-
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
Remove legacy data API and legacy higher-order components #2258
Comments
@felixarntz we have at least one HOC in |
Hi @felixarntz, just a couple of questions: Regarding
What would you like done here - should I remove the constants file and inline all the references, for example? Also, regarding this:
I think almost everything in there is unused, however these two files are used:
I don't have a huge amount of context on this legacy stuff 😅 - how would you like me to approach these? |
@johnPhillips Regarding It looks like Per the above three, you should then be able to use the legacy API and its Storybook data mocks completely. |
@johnPhillips – looks great, just a few points to tweak
These would also be replaced with modern counterparts from
This file has already been removed 😄 Otherwise, this looks good to go! |
Thanks @aaemnnosttv - IB updated 👍 |
IB ✅ |
Let's make sure this one get's both QA:Eng and regular QA for a thorough pass. @johnPhillips would you please update the QAB to include a section for both (one part for eng, the other QA)? |
@johnPhillips @aaemnnosttv Going to remove this from the 1.38.0 release since it's a lot of changes and not critical for user-facing functionality. Having some extra time to use it once merged makes sense. |
Taking over here to finish this up as John is out for a bit. |
QA |
Fair enough—I've made a follow-up PR at #3793 👍🏻 |
QA ✔️ |
The legacy data API and the legacy higher-order components
withData
andaddToFilter
should be removed once they are no longer used.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
assets/js/components/data
should be entirely removed. Before, it should be verified it is no longer used anywhere.assets/js/components/higherorder
should be entirely removed. Before, it should be verified it is no longer used anywhere..storybook/data/*
assets/js/util/cache-data.js
.storybook/data/*
should be removed. Those should be individually listed in the IB, so that decisions whether they can just be removed or whether they need to be replaced can be made.Implementation Brief
1. Remove
assets/js/components/data
collect-module-data.js
assets/js/components/Root/index.js
:<CollectModuleData>
dataAPI*
props<Root>
, find instances where these props are passed, and remove them:invalidate-cache-group.js
constants.js
Remove the file, and delete the imports from:
cache.js
This is used by
legacy-notifications
, but we should be able to substitute calls to the legacydata
API with their new counterparts throughout.assets/js/components/legacy-notifications/site/mark-notification.js
andassets/js/components/legacy-notifications/util.js
data.set
/get
with the counterpart calls to the newgooglesitekit-api
cache
imports and replace uses with the modern counterpart fromgooglesitekit/api/cache
invalidateCacheGroup
imports and replace uses with the modern counterpart fromgooglesitekit/api/cache
index.js
The imports can be removed from these files:
/test and /utils
test
andutils
directories.2. Remove
assets/js/components/higherorder/
withFeatureFlag.js
, however (see Remove legacy data API and legacy higher-order components #2258 (comment)).3. Storybook legacy data
.storybook/data/*
The following files are not used any more and can be removed:
These two files are in use and need an additional step before removal (see #2258 (comment) )
wp-admin-admin.php-page=googlesitekit-dashboard-googlesitekit.js
.storybook/utils/resetGlobals.js
wp-admin-admin.php-page=googlesitekit-settings-googlesitekit.js
stories/settings.stories.js
In both these cases:
Test Coverage
Visual Regression Changes
QA Brief
stories/settings.stories.js
).legacy-setup
legacy-notifications
Changelog entry
The text was updated successfully, but these errors were encountered: