question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement `modules/thank-with-google` JS store foundation

See original GitHub issue

Similar 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-google should be consistently renamed to modules/thank-with-google.
  • The JS file googlesitekit-modules-subscribe-with-google.js should be renamed to googlesitekit-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-google module slug in JS should be changed to reference the thank-with-google module slug (see #5364).
  • Any references to the swgModule feature flag in JS should be changed to reference the twgModule feature 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 @since annotations within the (renamed) assets/js/modules/thank-with-google directory should be changed to n.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-google to assets/js/modules/thank-with-google.
    • Replace every instance of subscribe-with-google with thank-with-google in code and file names inside the directory.
    • Update the code in comments accordingly as well where it references Subscribe with Google.
  • In assets/js/modules/**thank**-with-google/datastore/constants.js
    • Export modules/subscribe-with-google as MODULES_THANK_WITH_GOOGLE.
    • Delete the STORE_NAME constant.
    • Update all usage of the above STORE_NAME with MODULES_THANK_WITH_GOOGLE constant.
  • In webpack.config.js file:
    • Update the googlesitekit-modules-subscribe-with-google entry to googlesitekit-modules-thank-with-google and use the new path (post rename).
  • In the assets registration Subscribe_With_Google/Thank_With_Google class:
    • 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.svg to graphics directory.
  • 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:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
kuasha420commented, Jun 28, 2022

@nfmohit Thanks for stepping in. ❤️

@wpdarren This should be good to go now. Cheers.

2reactions
nfmohitcommented, Jun 28, 2022

@wpdarren Just wanted to let you know that those are being handled in #5452 and #5457.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found