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: Override header and footer template parts #45196

Conversation

gigitux
Copy link
Contributor

@gigitux gigitux commented Feb 28, 2024

Submission Review Guidelines:

Changes proposed in this Pull Request:

As described in #44889, the Assembler previously focused on updating only the homepage template, where the header and footer patterns were incorporated as blocks within the homepage.

This pull request transforms the header and footer sections into template parts. This adjustment ensures that any changes applied via the assembler to the header and footer will propagate to other pages, ensuring consistent updates across the entire site.

Closes #44889.

How to test the changes in this Pull Request:

Caution

This PR impacts CYS on Woo Express.

Warning

This PR changes the current logic about how the assembler works. It is crucial to conduct a careful review, taking into account possible edge cases or unconventional scenarios.

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

  1. Enable the WooCommerce Beta Tester plugin if you don't have it enabled yet
  2. On your Dashboard, head over to Tools > WCA Test Helper > Features and enable the customize-store
  3. Ensure you have the Gutenberg plugin installed from the latest trunk (or install it from this zip file: gutenberg.zip
  4. Visit the /wp-admin/admin.php?page=wc-admin&path=/customize-store.
  5. Follow the process.
  6. On the sidebar, click on "Choose your footer".
  7. Ensure that the footer is highlighted.
  8. Select another pattern.
  9. Click Save.
  10. On the sidebar, click on "Choose your header".
  11. Ensure that the header is highlighted.
  12. Select another pattern.
  13. Click Save.
  14. On the sidebar, click on "Design your homepage".
  15. Select another pattern.
  16. Click Save.
  17. Click Done.
  18. Visit the homepage of your store.
  19. Ensure that the page is equal to the Assembler preview.
  20. Visit a product page.
  21. Ensure that the header and footer are equal to the Assembler preview and the homepage.
  22. Visit the Site Editor.
  23. Edit the Homepage template.
  24. Open the list view.
  25. Ensure that you see the Header and Footer template parts:

image

JN Installation

  1. Create a new WooCommerce installation with this version.
  2. Ensure Jetpack is installed and your site is connected with JP.
  3. Ensure the WooCommerce Beta Tester plugin is installed and activated (available on this monorepo).
  4. Ensure the Woo AI plugin is installed and activated (available on this monorepo).
  5. Head over to /wp-admin/tools.php?page=woocommerce-admin-test-helper and enable customize-store feature flag.
  6. Head over to WooCommerce -> Home and click on "Start Customizing".
  7. Follow the steps 6-25 of the above testing instructions.

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • 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

CYS: Override header and footer template parts.

Comment

@gigitux gigitux linked an issue Feb 28, 2024 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Feb 28, 2024

Test Results Summary

Commit SHA: e4d6a43

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

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 changed the title [WIP] CYS: Override the header and footer [WIP] CYS: Override header and footer template parts Feb 28, 2024
@gigitux gigitux self-assigned this Feb 28, 2024
@gigitux gigitux added team: Kirigami & Origami focus: customize-your-store Issues related to the Customize Your Store onboarding flow. labels Feb 28, 2024
…-cys-override-the-header-template-part-when-saving-in-the-assembler
…-in-the-assembler' of github.com:woocommerce/woocommerce into 44889-cys-override-the-header-template-part-when-saving-in-the-assembler
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Feb 28, 2024
@gigitux gigitux marked this pull request as ready for review February 28, 2024 20:15
@gigitux gigitux requested a review from albarin February 28, 2024 20:15
@woocommercebot woocommercebot requested a review from a team February 28, 2024 20:15
@gigitux gigitux requested review from nefeline and a team and removed request for a team February 28, 2024 20:15
Copy link
Contributor

github-actions bot commented Feb 28, 2024

Hi @albarin, @dinhtungdu, @nefeline,

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

@gigitux gigitux removed request for albarin, nefeline and a team February 28, 2024 20:20
@woocommercebot woocommercebot requested review from a team and dinhtungdu and removed request for a team February 28, 2024 20:21
@gigitux gigitux changed the title [WIP] CYS: Override header and footer template parts CYS: Override header and footer template parts Feb 28, 2024
@albarin
Copy link
Contributor

albarin commented Feb 29, 2024

@gigitux I've noticed a couple of things when selecting a footer and not clicking Save:

  1. The footer is "saved", when you go back, you see it applied to the homepage, is this expected?
  2. When you go again to Choose your footer, it is not the selected one.

Check this video: https://github.com/woocommerce/woocommerce/assets/186112/ae617fc3-a38d-4f18-a98c-4596d4fb7021

@gigitux
Copy link
Contributor Author

gigitux commented Feb 29, 2024

@gigitux I've noticed a couple of things when selecting a footer and not clicking Save:

  1. The footer is "saved", when you go back, you see it applied to the homepage, is this expected?
  2. When you go again to Choose your footer, it is not the selected one.

Check this video: https://github.com/woocommerce/woocommerce/assets/186112/ae617fc3-a38d-4f18-a98c-4596d4fb7021

Good catch! I didn't notice this. I don't think that it is a regression of this PR. I tried on trunk, and I'm able to reproduce it:

Screen.Capture.Feb.29.at.10-39-10.mov

@gigitux
Copy link
Contributor Author

gigitux commented Feb 29, 2024

Regarding the issue above, I'm wondering what the point of the Save button is because even if the user didn't save, the selected pattern is still visible on the site when returning back.

cc @verofasulo @nefeline

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.

Awesome job! 👌

@gigitux
Copy link
Contributor Author

gigitux commented Feb 29, 2024

Thanks for the review, @albarin! I'm going to merge this PR!

@gigitux I've noticed a couple of things when selecting a footer and not clicking Save:

  1. The footer is "saved", when you go back, you see it applied to the homepage, is this expected?
  2. When you go again to Choose your footer, it is not the selected one.

As I wrote earlier, both issues are not caused by this PR. Regarding point 2, I created a dedicated issue: #45215

About point 1, I agree that it is a little bit weired this behavior. @verofasulo, what do you think? Should we revisit the beavhior?

@gigitux gigitux merged commit a15f75c into trunk Feb 29, 2024
49 checks passed
@gigitux gigitux deleted the 44889-cys-override-the-header-template-part-when-saving-in-the-assembler branch February 29, 2024 14:32
@github-actions github-actions bot added this to the 8.8.0 milestone Feb 29, 2024
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Feb 29, 2024
@alopezari alopezari added impact: high Indicates if the PR has been determined as high impact. needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. needs: internal testing Indicates if the PR requires further testing conducted by Solaris 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 1, 2024
@verofasulo
Copy link

Regarding the issue above, I'm wondering what the point of the Save button is because even if the user didn't save, the selected pattern is still visible on the site when returning back.

@gigitux, I agree. I believe it's because we're still dragging a pending decision on Woo Express, where we thought of removing the "Save" button completely. Thanks for flagging it 🙏 Let's revisit the behavior and update the pattern/layout/colors/fonts only if the user clicks on "Save" as per your suggestion. Thank you 🙇‍♀️

Konamiman pushed a commit that referenced this pull request Mar 13, 2024
* CYS: Override the header and footer

* fix unit test

* fix lint error

* Add changefile(s) from automation for the following project(s): woocommerce

* fix opacity

---------

Co-authored-by: github-actions <github-actions@github.com>
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. impact: high Indicates if the PR has been determined as high impact. needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris team: Kirigami & Origami
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CYS] Override the header template part when saving in the assembler
4 participants