-
Notifications
You must be signed in to change notification settings - Fork 215
Add descriptions for all WC templates and refactor Search template hierarchy loading logic #6345
Conversation
|
Size Change: 0 B Total Size: 866 kB ℹ️ View Unchanged
|
gigitux
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.
Good job! It isn't easy work with this part of the project :)
I added some comments and it would be cool if @tjcafferkey takes a look too.
I reiterate this statement, this is definitely not the easiest code to work with so well done for navigating this @danieldudzic !
I have left some comments, I am AFK on Monday but will test again on Tuesday 😄 |
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.
As I said in the first review, great work! 🥳
I added one comment about the use of the constants. What do you think?
There are some conflicts with trunk branch to fix.
gigitux
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.
I guess that we could use ProductSearchResults::SLUG in other places too.
Not sure about ProductSearchResults::TITLE and ``ProductSearchResults::DESCRIPTION` because they could not work with translations.
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.
LGTM 🚢
…ocks into update/6233-template-details-loading-logic
This PR updates the way template titles and descriptions are being loaded, by mirroring how WP core is doing it, moving the relevant code to the
BlockTemplateUtils.phpfile. In addition, it moves Search template hierarchy loading logic toBlockTemplatesController.php.Fixes #6233
Screenshots
Manual Testing
How to test the changes in this Pull Request:
Testing template descriptions
Testing the search template
?s={keyword}&post_type=productand make sure the products are being displayed correctly in a grid (using the search template, instead of the default one).User Facing Testing
These are steps for user testing (where "user" is someone interacting with this change that is not editing any code).
Changelog