Implement `modules/thank-with-google` JS store foundation
See original GitHub issueSimilar to #5364: We should “migrate” the modules/subscribe-with-google store to become the foundation for a new modules/thank-with-google store.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The JS store
modules/subscribe-with-googleshould be consistently renamed tomodules/thank-with-google. - The JS file
googlesitekit-modules-subscribe-with-google.jsshould be renamed togooglesitekit-modules-thank-with-google.js.- Its reference in PHP, including the PHP handle, should also be renamed accordingly.
- No selectors/actions/logic/settings (anything really) should be changed in the module store as part of this issue.
- Any references to the
subscribe-with-googlemodule slug in JS should be changed to reference thethank-with-googlemodule slug (see #5364). - Any references to the
swgModulefeature flag in JS should be changed to reference thetwgModulefeature flag (see #5364). - Instead of using the “Google G” as icon for the (previously “Subcribe with Google”) module, we should use the new Thank with Google icon which is present e.g. here in the Figma file.
- Any references to any “Subscribe with Google” name permutations in the JS codebase should be changed to refer to the corresponding “Thank with Google” name.
- Any
@sinceannotations within the (renamed)assets/js/modules/thank-with-googledirectory should be changed ton.e.x.t., de-facto making this code new.
Implementation Brief
Note: The ACs are very close to code here already, so no need to rehash all of this. Please review the ACs closely together with the relevant code and point out any more complex changes necessary or follow-up questions.
- Rename
assets/js/modules/subscribe-with-googletoassets/js/modules/thank-with-google.- Replace every instance of
subscribe-with-googlewiththank-with-googlein code and file names inside the directory. - Update the code in comments accordingly as well where it references
Subscribe with Google.
- Replace every instance of
- In
assets/js/modules/**thank**-with-google/datastore/constants.js- Export
modules/subscribe-with-googleasMODULES_THANK_WITH_GOOGLE. - Delete the
STORE_NAMEconstant. - Update all usage of the above
STORE_NAMEwithMODULES_THANK_WITH_GOOGLEconstant.
- Export
- In
webpack.config.jsfile:- Update the
googlesitekit-modules-subscribe-with-googleentry togooglesitekit-modules-thank-with-googleand use the new path (post rename).
- Update the
- In the assets registration
Subscribe_With_Google/Thank_With_Googleclass:- Update the asset name and path.
- In
assets/js/modules/thank-with-google/index.js:- Update feature flag to use
twgModule. - Update Icon to the new Thank With Google Logo from the figma file.
- Add
thank-with-google.svgto graphics directory.
- Add
- Update feature flag to use
- Finish and merge #5392.
- Update failing tests.
Test Coverage
- Update failing tests and broken stories.
QA Brief
- Once both #5391 and #5392 has been merged:
- Following QA Brief of #5364 should be sufficient.
- Module will have the new Tank with Google Icon as par figma design.
- QA:Eng All mentions of SWG will be replaced with TWG in the source code.
Changelog entry
- Add foundation for new Thank with Google feature (JS).
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
JavaScript | Foundation for Sites 6 Docs
Everything is transpiled to ES5 but the modules. Dedicated to modern bundlers, like Webpack 2+ or Rollup. They will automatically use this bundle...
Read more >Quick Read: The JS Foundation - SitePoint
All week we're publishing articles focused on everything Open Source, Free Software and Community, so keep checking the OSW tag for the latest ......
Read more >Hosted Projects - OpenJS Foundation
The OpenJS Foundation hosts some of the most important projects in the JavaScript ecosystem. As a neutral non-profit organization, our goal is to...
Read more >17 Best Drugstore Foundations That Professional Makeup ...
CoverGirl TruBlend Matte Made Liquid Foundation. Shop Now$12. Out of all of the drugstore makeup items you can buy, New York City-based ...
Read more >The Best Drugstore Foundation of 2022 - Beauty with Hollie
We've put together the best drugstore foundations in 2022. ... It doesn't mean you spend more, it simply allows me to keep this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@nfmohit Thanks for stepping in. ❤️
@wpdarren This should be good to go now. Cheers.
@wpdarren Just wanted to let you know that those are being handled in #5452 and #5457.