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

Free Listings + Paid Ads: Add the product feed status section UI #1638

Conversation

eason9487
Copy link
Member

@eason9487 eason9487 commented Aug 17, 2022

Changes proposed in this Pull Request:

This PR implements the UI part of 📌 Product feed status section in #1610.

  • Extract a code fragment from the sync-status.js as getNumberOfSyncProducts function.
  • Implement ProductFeedStatusSection component and add it to the paid ads setup step of onboarding flow.

Screenshots:

📷 Normal view

image

📷 Hover on the "# products" text

image

Detailed test instructions:

  1. Check if the visual result of the "Product feed status" section is close to the design in Figma.
  2. Hover on the "# products" text to view the tooltip.

Changelog entry

@eason9487 eason9487 added the changelog: none Skip changelog entry for this PR label Aug 17, 2022
@eason9487 eason9487 requested a review from a team August 17, 2022 10:08
@eason9487 eason9487 self-assigned this Aug 17, 2022
@github-actions github-actions bot added changelog: add A new feature, function, or functionality was added. type: enhancement The issue is a request for an enhancement. labels Aug 17, 2022
@eason9487 eason9487 removed type: enhancement The issue is a request for an enhancement. changelog: add A new feature, function, or functionality was added. labels Aug 17, 2022
@eason9487 eason9487 changed the title Add/1610 product feed status section UI Free Listings + Paid Ads: Add the product feed status section UI Aug 17, 2022
Copy link
Member

@ianlin ianlin left a comment

Choose a reason for hiding this comment

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

LGTM.

✅ The UI looks close to the design.
✅ The tooltip was displayed when hovering on the # products.

/**
* Product status statistics on Google Merchant Center
*
* @typedef {Object} ProductStatistics
Copy link
Member

Choose a reason for hiding this comment

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

💅 Since the type of ProductStatistics is defined, it would be nice to add some doc comments in the below function that is using this type.

export function* receiveMCProductStatistics( mcProductStatistics ) {

Copy link
Member Author

Choose a reason for hiding this comment

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

Added in 4566683.

Comment on lines +55 to +60
/*
const { data, hasFinishedResolution } = useAppSelectDispatch(
'getMCProductStatistics'
);
*/
// TODO: Replace the dummy data with the above code later to use the adjusted API.
Copy link
Member

Choose a reason for hiding this comment

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

❔ Just wanted to make sure my understanding is right. The API mc/product-statistics would only be returning data after we call mc/settings/sync, so the comment Replace the dummy data with the above code later to use the adjusted API. means we would make a POST request to mc/settings/sync later, right?

Copy link
Member Author

@eason9487 eason9487 Aug 18, 2022

Choose a reason for hiding this comment

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

Yes, as per my test from the frontend side, it has to call mc/settings/sync before getting statistics from mc/product-statistics, so the frontend side will call mc/settings/sync when entering step 4. And the mc/product-statistics seems to check whether the MC_SETUP_COMPLETED_AT flag is set before returning, thus, we will need the related adjustment in this project as well.

@eason9487 eason9487 merged commit eddef3c into feature/1610-streamlined-onboarding Aug 18, 2022
@eason9487 eason9487 deleted the add/1610-product-feed-status-section-ui branch August 18, 2022 10:05
@eason9487 eason9487 added changelog: add A new feature, function, or functionality was added. and removed changelog: none Skip changelog entry for this PR labels Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: add A new feature, function, or functionality was added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants