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

CYS - Core: install font when user clicks opt-in #45580

Conversation

gigitux
Copy link
Contributor

@gigitux gigitux commented Mar 14, 2024

Warning

This PR is blocked by #45586

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes #45476 .

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Make sure you have the WooCommerce Beta Tester plugin installed and activated
  2. Under Tools > WCA Test Helper > Features, make sure customize-store is enabled
  3. Under Tools > WCA Test Helper > Tools, click on Reset Customize Your Store-
  4. Visit wp-admin/admin.php?page=wc-settings&tab=advanced&section=woocommerce_com
  5. Ensure that the Allow usage of WooCommerce to be tracked is disabled.
  6. Visit wp-admin/admin.php?page=wc-admin&path=%2Fcustomize-store.
  7. Click on start Start designing.
  8. On the sidebar, click on Change homepage.
  9. Select a new homepage.
  10. Save the change.
  11. On the sidebar, click on Choose Fonts.
  12. Check Opt in to usage tracking to get access to more fonts.
  13. Click on usage tracking.
  14. Click on Opt-in.
  15. Ensure that the pre-load screen appears
  16. Ensure that the Assembler is loaded
  17. Click on the "Choose Fonts"
  18. Ensure that multiple fonts are available.
  19. Ensure that the homepage hasn't been restored.
  20. Install https://wordpress.org/plugins/wp-data-access/
  21. Visit wp-admin
  22. On the sidebar WP Data Access > Query Builder
  23. Copy paste:
SELECT * FROM `wp_posts` WHERE `post_type` LIKE 'wp_font_family' ```

25. Click Execute
26. Ensure that a table with some results is visible
27. Copy paste:

SELECT * FROM wp_posts WHERE post_type LIKE 'wp_font_face'

28. Ensure that a table with some results is visible
29. Remove them via:

DELETE FROM wp_posts WHERE post_type = 'wp_font_face';
DELETE FROM wp_posts WHERE post_type = 'wp_font_family';

30. Ensure that the `woocommerce_allow_tracking` option (`wp_option` table) is set to `yes`.
31. Update the option to `no`.
32. Refresh the assembler page.
33. Repeat 9-20.


<!-- End testing instructions -->

### Changelog entry

<!-- You can optionally choose to enter a changelog entry by checking the box and supplying data. -->

-   [x] Automatically create a changelog entry from the details below.

<details>

#### Significance

<!-- Choose only one -->

-   [ ] Patch
-   [x] Minor
-   [ ] Major

#### Type

<!-- Choose only one -->

-   [x] Fix - Fixes an existing bug
-   [ ] Add - Adds functionality
-   [ ] Update - Update existing functionality
-   [ ] Dev - Development related task
-   [ ] Tweak - A minor adjustment to the codebase
-   [ ] Performance - Address performance issues
-   [ ] Enhancement - Improvement to existing functionality

#### Message <!-- Add a changelog message here -->
CYS - Core: install font when user clicks opt-in

#### Comment <!-- If the changes in this pull request don't warrant a changelog entry, you can alternatively supply a comment here. Note that comments are only accepted with a significance of "Patch" -->


</details>

Copy link
Contributor

github-actions bot commented Mar 14, 2024

Test Results Summary

Commit SHA: cdb7799

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests25900202610m 38s
E2E Tests335001803537m 57s

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.

@gigitux gigitux force-pushed the 45476-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal branch from 71d8240 to 4439716 Compare March 14, 2024 11:10
gigitux and others added 5 commits March 14, 2024 12:12
…er-clicking-start-designing-1' of github.com:woocommerce/woocommerce into 45476-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal
@gigitux gigitux marked this pull request as ready for review March 14, 2024 13:58
@woocommercebot woocommercebot requested a review from a team March 14, 2024 14:02
Copy link
Contributor

github-actions bot commented Mar 14, 2024

Hi @albarin, @nefeline, @woocommerce/woo-fse

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

github-actions and others added 5 commits March 14, 2024 14:04
…er-clicking-start-designing-1' of github.com:woocommerce/woocommerce into 45476-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal
…-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Mar 15, 2024
…-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal
…-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal
@gigitux gigitux force-pushed the 45476-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal branch from e7cdfba to 06c19fa Compare March 15, 2024 16:14
@gigitux gigitux self-assigned this Mar 15, 2024
@gigitux gigitux added focus: customize-your-store Issues related to the Customize Your Store onboarding flow. type: bug The issue is a confirmed bug. labels Mar 15, 2024
@gigitux
Copy link
Contributor Author

gigitux commented Mar 15, 2024

@albarin, @nefeline and @verofasulo. This PR introduces this UX:
https://github.com/woocommerce/woocommerce/assets/4463174/21d85b46-8d54-4e04-8106-e6d08c54fb89

Please note that after installation, clicking on "Choose Fonts" will not select any font pair. This is because the theme continues to use the previously chosen font by default:
image

Should we consider updating the theme to utilize the newly installed font (Inter -Inter) during the installation process?

@@ -201,18 +202,16 @@ export const SidebarNavigationScreenTypography = () => {
</Button>
<Button
onClick={ async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the async still needed here or can this be a regular arrow fn now that we removed the await portion below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch! Fixed!

@danielwrobert
Copy link
Contributor

Nit: I'm not sure if it's appropriate to address in this PR but it seems like the Opt in to portion of the Opt in to usage tracking to get access to more fonts. should also be included in the link so it's a more clear CTA.

CleanShot 2024-03-15 at 17 10 00

Having usage tracking be the linked text alone makes me think I will be directed to information about the usage tracking.

Copy link
Contributor

@danielwrobert danielwrobert left a comment

Choose a reason for hiding this comment

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

Ensure that the pre-load screen appears

I've tried to run the testing steps 4 times and each time it freezes at the Turning on the lights step.

I can move forward in the process by refreshing the page but if I don't refresh, it will just hang.

CleanShot.2024-03-15.at.21.59.45.mp4

@nefeline
Copy link
Member

Nit: I'm not sure if it's appropriate to address in this PR but it seems like the Opt in to portion of the Opt in to usage tracking to get access to more fonts. should also be included in the link so it's a more clear CTA. Having usage tracking be the linked text alone makes me think I will be directed to information about the usage tracking.

@danielwrobert could you please direct any questions related to design and/or copy to @verofasulo and @lauroraa ? Thanks!

Copy link
Member

@nefeline nefeline 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 your work here, @gigitux! I've requested a change in the code: let's keep both async and sync fonts installation in place in case one of them happen to fail 👍

Regarding:

and each time it freezes at the Turning on the lights step.

I can reproduce this as well: unfortunately, the console has no particular errors that could help with debugging.

@albarin
Copy link
Contributor

albarin commented Mar 16, 2024

I've tried to run the testing steps 4 times and each time it freezes at the Turning on the lights step.

I can reproduce this as well.

@gigitux
Copy link
Contributor Author

gigitux commented Mar 18, 2024

Sorry for the confusion, I introduced the issue with 00eb4a3.

I fixed it! Also, I noticed that the font installation wasn't triggered when the assembler wasn't loaded in the iframe. I fixed that issue as well! 🤞

Copy link
Contributor

@albarin albarin left a comment

Choose a reason for hiding this comment

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

Great effort 🙇
Tests as expected now!

Copy link
Member

@nefeline nefeline 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 amazing work! Confirmed things are working as expected now 🚀

@gigitux gigitux merged commit f9c0d40 into trunk Mar 18, 2024
31 checks passed
@gigitux gigitux deleted the 45476-cys-on-core-make-sure-the-pre-loader-is-triggered-right-after-the-user-clicks-on-the-opt-in-modal branch March 18, 2024 15:49
@github-actions github-actions bot added this to the 8.8.0 milestone Mar 18, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Mar 18, 2024
@alvarothomas alvarothomas added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: customize-your-store Issues related to the Customize Your Store onboarding flow. needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CYS on Core] Make sure the pre-loader is triggered right after the user clicks on the opt in modal.
5 participants