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

Add introduction banner card into multichannel marketing page #37110

Merged
merged 38 commits into from Mar 20, 2023

Conversation

ecgan
Copy link
Member

@ecgan ecgan commented Mar 7, 2023

All Submissions:

Changes proposed in this Pull Request:

Closes #34904. Previous draft PR is PR #36220.

In this PR, we add the introduction banner card at the top of the multichannel marketing page.

There are two "types" of introduction banner card: one with the "Create a campaign" and "Add channels" buttons, and one without.

Screenshot of introduction banner card without the "Create a campaign" and "Add channels" buttons:

image

Screenshot of introduction banner card with the "Create a campaign" and "Add channels" buttons:

image

Users can dismiss the card by clicking at the top right "X" button. We store the dismissed state by using a WP Option woocommerce_marketing_overview_multichannel_banner_dismissed. This approach is similar to the existing woocommerce_marketing_overview_welcome_hidden WP Option for the WelcomeCard in the existing Marketing page.

The "Creata a campaign" button is displayed when there is at least one registered channel. Clicking it will display the "Create a campaign" modal.

The "Add channels" button is displayed when there is at least one registered channel and one recommended channel. When users click on the "Add channels" button, the page will scroll down to the "Add channels" button in the Channels card, allowing users to install a new channel.

How to test the changes in this Pull Request:

Pre-conditions:

  • Enable WooCommerce Multichannel Marketing experience in WooCommerce Settings > Advanced > Features page: /wp-admin/admin.php?page=wc-settings&tab=advanced&section=features
  • If you have dismissed the banner card, you can make it show up again by deleting the WP Option woocommerce_marketing_overview_multichannel_banner_dismissed in the database.
  1. Go to WooCommerce Marketing page: /wp-admin/admin.php?page=wc-admin&path=%2Fmarketing.
  2. You should see the introduction banner card at the top of the page.
  3. Proceed to setup a channel, and then come back to this marketing page.
  4. Click on the "Create campaign" button. You should see the "Create a campaign" modal.
  5. Click on the "Add channels" button. The page should scroll down to the "Add channels" button in the Channels card.
  6. Dismiss the card, and reload the page. The card should not be displayed.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you created a changelog file for each project being changed, ie pnpm --filter=<project> changelog add?
  • Have you included testing instructions?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@ecgan ecgan added the focus: marketing Marketing page in WooCommerce Admin, i.e. `/wp-admin/admin.php?page=wc-admin&path=%2Fmarketing`. label Mar 7, 2023
@ecgan ecgan requested review from a team March 7, 2023 18:26
@ecgan ecgan self-assigned this Mar 7, 2023
@ecgan
Copy link
Member Author

ecgan commented Mar 7, 2023

@puntope , this PR is build on top of PR #37044, could you also help to review this PR please? 🙏

@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Merging #37110 (a2b02fc) into trunk (b13e56e) will decrease coverage by 0.0%.
The diff coverage is 8.7%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             trunk   #37110     +/-   ##
==========================================
- Coverage     45.8%    45.8%   -0.0%     
  Complexity   17196    17196             
==========================================
  Files          429      429             
  Lines        64900    64909      +9     
==========================================
- Hits         29703    29701      -2     
- Misses       35197    35208     +11     
Impacted Files Coverage Δ
...ocommerce/includes/admin/class-wc-admin-assets.php 0.0% <0.0%> (ø)
...ugins/woocommerce/includes/class-wc-post-types.php 2.6% <0.0%> (-0.1%) ⬇️
plugins/woocommerce/includes/class-wc-install.php 69.0% <66.7%> (ø)

... and 1 file with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

Test Results Summary

Commit SHA: a2b02fc

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 48s
E2E Tests1910010020114m 23s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 7, 2023
@ecgan ecgan requested a review from eason9487 March 19, 2023 17:34
@ecgan
Copy link
Member Author

ecgan commented Mar 19, 2023

@eason9487 , thanks so much for the review! I have addressed the code review comments. This is now ready for another round of review. 🙂 🙏

eason9487
eason9487 previously approved these changes Mar 20, 2023
Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

Thanks for the update. The test results are correct and as expected.

However, I would still suggest addressing the almost duplicate images that can be eliminated in this PR. because it doesn't need much time to fix. Otherwise, it might take more effort to merge a known problem, open a follow-up, and then re-arrange improvement later. But it should be fine to proceed with the current implementation if there is not much time left for this project.

The remaining comments are minor suggestions and won't block this PR.

@ecgan
Copy link
Member Author

ecgan commented Mar 20, 2023

@eason9487 , thanks, I took your suggestions and made the changes, and your review approval has been dismissed. Could you do a review and approve again please? 🙏

@ecgan ecgan requested a review from eason9487 March 20, 2023 10:36
Copy link
Member

@eason9487 eason9487 left a comment

Choose a reason for hiding this comment

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

Thanks for the all work. Testing well, and LGTM.

@ecgan ecgan merged commit bebad07 into trunk Mar 20, 2023
18 of 20 checks passed
@ecgan ecgan deleted the feature/34904-marketing-introduction-banner branch March 20, 2023 11:25
@github-actions github-actions bot added this to the 7.6.0 milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: marketing Marketing page in WooCommerce Admin, i.e. `/wp-admin/admin.php?page=wc-admin&path=%2Fmarketing`. plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the introduction banner card into Marketing page
3 participants