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

Implement <PublicationCreate> component #8836

Closed
nfmohit opened this issue Jun 8, 2024 · 6 comments
Closed

Implement <PublicationCreate> component #8836

nfmohit opened this issue Jun 8, 2024 · 6 comments
Labels
Module: RRM Reader Revenue Manager module related issues P0 High priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature

Comments

@nfmohit
Copy link
Collaborator

nfmohit commented Jun 8, 2024

Feature Description

A <PublicationCreate> component should be added to the Reader Revenue Manager module that encapsulates the publication creation flow.

Screenshots for reference

image
image


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

Acceptance criteria

  • A PublicationCreate component should be created for the Reader Revenue Manager module to facilitate the creation of a new publication matching the Figma designs.
    • Note: The component should only include account creation content, i.e. the text and the CTA. The rest of the content (e.g. module name, footer, "Cancel" button, etc.) will be a part of the container component, e.g. SetupMain/SettingsEdit. See screenshot for reference:
      image
  • The component should have two steps:
    • First step:
      • Text: "To complete your Reader Revenue Manager account setup you will need to create a publication."
      • Sub-text: "Once you have created your publication, it is submitted for review."
      • CTA: "Create publication" (with external link icon). This should open the publisher center in a new browser tab, using the getServiceURL() selector (being implemented in #8848).
    • If at any point in the component's lifecycle, it is detected that a publication is available for the user, that should be set as the connected publication and the second step should be shown:
      • Text: "You have successfully created your publication and it is now awaiting review.
        This might take up to 2 weeks.
        "
      • CTA: "Complete setup". This should pass a callback to its parent component asking it to complete module setup.

Implementation Brief

PublicationCreate component

In the assets/js/module/reader-revenue-manager/components/common directory, create a new component, PublicationCreate.js:

  • Create a function component, PublicationCreate that renders the publication creation flow.
  • It should receive a onCompleteSetup prop, a callback function to be called when the user clicks the CTA to complete the setup.
  • Retrieve the publication list from the getPublications selector.
  • Get the service URL to create a publication using the getServiceURL selector.
  • If there is no publication in the list, render the first step of the component with the following:
    • Text: "To complete your Reader Revenue Manager account setup you will need to create a publication."
    • Sub-text: "Once you have created your publication, it is submitted for review."
    • CTA button with the label "Create publication" and an external link icon.
    • Pass the service URL to the CTA button's onClick handler.
  • If a publication is available, render the second step of the component with the following:
    • Text: "You have successfully created your publication and it is now awaiting review.
      This might take up to 2 weeks.
      "
    • CTA button with the label "Complete setup".
    • Pass the onCompleteSetup prop to the CTA button's onClick handler.
  • The styles should match the Figma designs

Test Coverage

  • Add storybook stories for the PublicationCreate component in assets/js/module/reader-revenue-manager/components/common/PublicationCreate.stories.js.
  • Add test coverage for the PublicationCreate component in assets/js/module/reader-revenue-manager/components/common/PublicationCreate.test.js.

QA Brief

Changelog entry

  • Add the PublicationCreate component that encapsulates the publication creation flow for the Reader Revenue Manager module, presented in Storybook.
@nfmohit nfmohit self-assigned this Jun 8, 2024
@nfmohit nfmohit added P0 High priority Type: Enhancement Improvement of an existing feature Team M Issues for Squad 2 Module: RRM Reader Revenue Manager module related issues labels Jun 8, 2024
@nfmohit nfmohit removed their assignment Jun 8, 2024
@ivonac4 ivonac4 added Module: RRM Reader Revenue Manager module related issues and removed Module: RRM Reader Revenue Manager module related issues labels Jun 11, 2024
@nfmohit nfmohit assigned nfmohit and unassigned nfmohit Jun 14, 2024
@nfmohit nfmohit assigned nfmohit and unassigned nfmohit Jun 18, 2024
@hussain-t hussain-t self-assigned this Jun 20, 2024
@ivonac4 ivonac4 added the Next Up Issues to prioritize for definition label Jun 27, 2024
@hussain-t hussain-t assigned nfmohit and unassigned hussain-t Jul 4, 2024
@nfmohit
Copy link
Collaborator Author

nfmohit commented Jul 5, 2024

Nice work, @hussain-t ! IB LGTM 👍 ✅

@nfmohit nfmohit removed their assignment Jul 5, 2024
@eclarke1 eclarke1 removed the Next Up Issues to prioritize for definition label Jul 8, 2024
@hussain-t hussain-t self-assigned this Jul 15, 2024
@hussain-t hussain-t removed their assignment Jul 29, 2024
@techanvil techanvil self-assigned this Jul 30, 2024
@techanvil
Copy link
Collaborator

Hey @hussain-t, the Storybook links in the QAB were pointing to the wrong PR, so I've fixed them.

However - once the PR is merged, the Storybook deployment for the PR will be deleted, so the QAB won't be so useful when it actually comes to QA. I'm not sure if you meant to link to the develop Storybook, or to both the PR and develop versions. Anyhow, please can you update the QAB accordingly?

@hussain-t
Copy link
Collaborator

hussain-t commented Jul 30, 2024

Thanks for pointing it out, @techanvil. I meant to point the links to develop. I've updated the QAB.

@hussain-t hussain-t removed their assignment Jul 30, 2024
techanvil added a commit that referenced this issue Jul 31, 2024
…n-create

Enhancement/#8836 - Implement `<PublicationCreate>` component
@techanvil techanvil removed their assignment Jul 31, 2024
@kelvinballoo
Copy link
Collaborator

QA Update ⚠️

2 items to check:

  1. The links in the QAB (e.g. https://google.github.io/site-kit-wp/storybook/pull/9088/?path=/story/modules-readerrevenuemanager-setup-publicationcreate--without-publication) is not workable. I have been looking at https://google.github.io/site-kit-wp/storybook/develop/?path=/story/modules-readerrevenuemanager-setup-publicationcreate--without-publication instead. I believe that's the correct one but LMK if otherwise.

  2. Main flag is that the CTA font weight is currently at 400 when it should be 500 from Figma.

    Figma: 500 Screenshot 2024-08-01 at 17 52 30

    Implementation: 400
    Screenshot 2024-08-01 at 17 47 47

@hussain-t
Copy link
Collaborator

Hi @kelvinballoo, sorry about it. Yes, you have spotted the correct URL.

As for the CTA font size, we should keep it consistent with all the buttons. Please take a look at this comment. And the Figma discussions.

@kelvinballoo
Copy link
Collaborator

kelvinballoo commented Aug 1, 2024

QA Update ✅

Thanks @hussain-t . Looks like it will be fixed under #8856

This ticket can be moved to approval then as the following have been verified as good: ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: RRM Reader Revenue Manager module related issues P0 High priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

7 participants