-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Introduce missing button element classes for the account orders and downloads #37933
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
Conversation
Test Results SummaryCommit SHA: f1b1df9
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. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## trunk #37933 +/- ##
========================================
Coverage 51.2% 51.2%
+ Complexity 17439 17417 -22
========================================
Files 440 440
Lines 80722 80636 -86
========================================
- Hits 41346 41312 -34
+ Misses 39376 39324 -52
|
|
Hi @coreymckrill, 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: |
1 similar comment
|
Hi @coreymckrill, 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: |
|
Hey @coreymckrill! fyi I left the template bumps so we can decide on which version these will land. I can then push another commit containing the proper version number. |
coreymckrill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xristos3490 👍 looks good, other than the needed fix on the order again template 😅
This PR also needs a rebase since it was originally submitted before the monorepo upgraded pnpm to v8.
| 'order/order-again.php', | ||
| array( | ||
| 'order' => $order, | ||
| 'wp_button_class' => wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'wp_button_class' => wc_wp_theme_get_element_class_name( 'button' ) ? ' ' . wc_wp_theme_get_element_class_name( 'button' ) : '', | |
| 'wp_button_class' => wc_wp_theme_get_element_class_name( 'button' ), |
Optional, non-blocking suggestion, but I would argue for having this template parameter only contain the classname, and worry about the whitespace in the template itself. And also, probably not worry about extra whitespace at the end of the class attribute in the case that wp_button_class is empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was inspired by other instances of the same fix throughout the codebase (like here)
To be honest, I also believe that the templates should be responsible for managing the classes. Ideally, I'd expect to echo them using arrays and the implode function. We could move forward with this as is, progress with other changes in regards to the block-ification of the templates, and then return to create a more organized solution.
I'd be happy to change it, though. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, I'd expect to echo them using arrays and the implode function. We could move forward with this as is, progress with other changes in regards to the block-ification of the templates, and then return to create a more organized solution.
👍 Yeah, doing this separately sounds like the right approach. No need to make this PR more complicated.
Co-authored-by: Corey McKrill <[email protected]>
…woocommerce into add/tt3-comp-button-classes
|
Thanks for the review, @coreymckrill! I've updated the base of this fix. |
coreymckrill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bah, I approved this and then realized that the code sniff test is failing. Should be good to go after that's fixed.
|
Nice catch, @coreymckrill! 🙇 I have made some adjustments to ensure PHPCS is satisfied. However, we still need to determine the appropriate version number for the template modifications. What do you think? Would 7.7.0 be a suitable choice, or perhaps 7.6.2? |
coreymckrill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still need to determine the appropriate version number for the template modifications. What do you think? Would 7.7.0 be a suitable choice, or perhaps 7.6.2?
This doesn't seem like an urgent bug fix that would qualify for a point release (let me know if you disagree). Given that 7.7.0 is now out (sorry, was at a conference), I think 7.8.0 would be the right target here.
Totally agree! Changing templates is always a good idea to do it, at least, on a minor release! Will update the headers shortly! |
|
Updated the template version and rebased the branch. Two templates have already been upgraded to 7.8.0. So, the |
|
Thanks @xristos3490 ! |
Submission Review Guidelines:
Changes proposed in this Pull Request:
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Before starting ensure that you are using a block theme like TT2, or TT3.
Testing in order-again context:
Testing in the pagination buttons on the account page:
woocommerce_my_account_my_orders_queryfilter to wire a small number (e.g., 2) in thelimitkey for the query)Testing in the no-downloads cta button on the account page: