Coder Social home page Coder Social logo

Add `whenInViewContext` higher-order component (HOC) to allow simplification of code that should only run inside some view contexts about site-kit-wp HOT 4 CLOSED

tofumatt avatar tofumatt commented on August 29, 2024
Add `whenInViewContext` higher-order component (HOC) to allow simplification of code that should only run inside some view contexts

from site-kit-wp.

Comments (4)

tofumatt avatar tofumatt commented on August 29, 2024 1

@benbowler Adding invariant checks makes sense, let's do that too 👍🏻

Also, while it wasn't in the ACs, let's add it to at least one component so we can QA it properly 👍🏻 I've added refactoring [GA4AdSenseLinkedNotification.js](https://github.com/google/site-kit-wp/blob/4cce042da8831b2ec8663e4d9767bc0610ae4e5a/assets/js/components/notifications/GA4AdSenseLinkedNotification.js#L115-L121) to the ACs 🙂

from site-kit-wp.

benbowler avatar benbowler commented on August 29, 2024

Created the IB. Some possible additions/questions:

  • We could add something like invariant if the user passes invalid prop combinations like both and include and exclude list or both view only and non view only?
  • I assumed we weren't using this new HOC yet in this ticket? Otherwise we could add a case/some cases to refactor as part of this work.

from site-kit-wp.

tofumatt avatar tofumatt commented on August 29, 2024

Looks good to me 👍🏻

IB ✅

from site-kit-wp.

mohitwp avatar mohitwp commented on August 29, 2024

QA Update ✅

  • Tested on main environment.
  • Verified AdSense set up for the website that has AdSense linked with Analytics.
  • Verified AdSense set up for the website that has AdSense not linked with Analytics.
  • Verified the notice when AdSense linked with analytics and when it's not linked.
  • Verified that no notification related to it appearing under settings.

When AdSense linked with Analytics

Recording.1215.mp4

When AdSense not linked with Analytics

Recording.1216.mp4

image

from site-kit-wp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.