Skip to content
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

Enhancement/10175 setup banner #10208

Open
wants to merge 53 commits into
base: develop
Choose a base branch
from
Open

Conversation

zutigrm
Copy link
Collaborator

@zutigrm zutigrm commented Feb 12, 2025

Summary

Addresses issue:

Relevant technical choices

Priority for ads banner has changed after this discussion with Mariya, Ads banner should go before audience segmentation

Note

Since follow up PR for #10169 moved the inline data to Ads datastore as persistent module data, it broke 3 issues which implement the selectors from site datastore, including one currently in QA. Due to the time constrains and to avoid getting 3 ready for review testing issues getting blocked, selectors were moved to the Ads datastore in this issue.

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 7.4.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

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

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.
  • Ensure there are no unexpected significant changes to file sizes.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

@zutigrm zutigrm marked this pull request as ready for review February 24, 2025 15:59
Copy link

github-actions bot commented Feb 24, 2025

Build files for d9b3a1d are ready:

This comment was marked as resolved.

@@ -20,13 +20,3 @@ export const CORE_SITE = 'core/site';

export const AMP_MODE_PRIMARY = 'primary';
export const AMP_MODE_SECONDARY = 'secondary';

Copy link
Collaborator Author

@zutigrm zutigrm Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selectors Inline data has been moved from core site datastore to the Ads datastore, otherwise issues will remain broken and blocked, so this is done as part of this issue. More details in PR description

@@ -55,13 +55,13 @@ export const selectors = {

if ( isModuleConnected ) {
return __(
'Ad blocker detected; please disable it to get the latest Ads data',
'To get the latest Ads data you will need to disable your Ad blocker',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adsense module warning message will be replaced in #10193. This will be the new message we will use for ad blocker everywhere (verified with Sigal and Mariya in UX channel)

@10upsimon 10upsimon self-requested a review February 25, 2025 08:46
Copy link
Collaborator

@10upsimon 10upsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zutigrm this one LGTM, moving to MR.

Copy link
Collaborator

@eugene-manuilov eugene-manuilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @zutigrm. This is a very strong start, but we need to make a few improvements. Please, see my comments.


function AdsModuleSetupCTAWidget( { WidgetNull, Widget } ) {
export default function AdsModuleSetupCTAWidget( { id, Notification } ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we need to move this component to the Ads module because we register it there. Plus this is no longer a widget, thus we need to rename it accordingly.

@@ -35,6 +35,7 @@ export default function Description( {
text,
learnMoreLink,
errorText,
AdditionalComponent,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be children.

SVG={ breakpointSVGMap[ breakpoint ] || AdsSetupSVG }
/>
</Notification>
<WooCommerceRedirectModal
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this to the Notification component children and remove Fragment usage.

Comment on lines +234 to +237
<WooCommerceRedirectModal
dialogActive={ openDialog }
onDismiss={ onModalDismiss }
/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps instead of always rendering this component, we should render it conditionally?

{ openDialog && <WooCommerceRedirectModal onDismiss={ onModalDismiss } dialogActive /> }

Comment on lines +243 to +244
id: PropTypes.string,
Notification: PropTypes.elementType,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These props should be required.


if ( isTooltipVisible ) {
return (
<Fragment>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fragment is not needed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants