google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 292 forks source link

Expand the logic of the `ACRNotificationCTAWidget` component for existing KMW users with manual set up #9372

Open zutigrm opened 2 months ago

zutigrm commented 2 months ago

Feature Description

The ACRSubtleNotification component logic should be expanded so it surfaces in the dashboard within key metrics widget area for the users who have setup KMW manually, once ACR events are detected. CTA should open selection panel

FIgma design can be found here

Refer to the Subtle banner notification for detected events section of the design doc


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

10upsimon commented 1 month ago

@zutigrm AC ✅ Moving to IB

eugene-manuilov commented 1 month ago

Thanks, @zutigrm, mostly looks good to me.

  • Ensure that conditions apply only when component is shown outside of VIEW_CONTEXT_SETTINGS context

Which conditions? The ones from the next point? Plus instead of using negative statement we should explicitly say for which context it should be displayed. In other words, instead of component is shown outside of ... context, we should say component is shown in A, B, C, D context.

zutigrm commented 1 month ago

Thanks @eugene-manuilov I updated IB to list the contexts

Which conditions? The ones from the next point?

I expanded on this sentence to clarify that it should apply for conditions in next points

eugene-manuilov commented 1 month ago

@zutigrm ok, since we updated #9371, we need to update IB for this ticket as well. Instead of adding conditions to the notification component, we need to update the widget to render different notifications based on aforementioned conditions. I think we can probably re-use the notification component from #9371 because it has similar content, right?

zutigrm commented 1 month ago

@eugene-manuilov Thanks, updated.

I think we can probably re-use the notification component from https://github.com/google/site-kit-wp/issues/9371 because it has similar content, right?

Yes that's the idea, that component will be reused and just conditions would be expanded

eugene-manuilov commented 1 month ago
  • Following above conditions, include the content variation matching this banner in Figma

@zutigrm the only difference between two versions of the notification is the CTA button:

Image Image

So, there is no need to add any additional logic to it. Instead we need to add two props to the notification to set CTA label and callback. And then in the widget, we need to use different CTA labels and callbacks based on the defined criteria.

zutigrm commented 1 month ago

@eugene-manuilov THanks, IB updated

eugene-manuilov commented 1 month ago

Thanks, IB ✔