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 Course List block to My Courses on page creation #6343
Conversation
Codecov Report
@@ Coverage Diff @@
## trunk #6343 +/- ##
============================================
+ Coverage 45.97% 46.10% +0.12%
- Complexity 9551 9564 +13
============================================
Files 459 460 +1
Lines 33837 33886 +49
Branches 275 275
============================================
+ Hits 15558 15623 +65
+ Misses 18074 18058 -16
Partials 205 205
Continue to review full report at Codecov.
|
Hey Imran, happy new year! 🎆 🥂 🤝 🙂 I'm not sure if this is related to your PR, but I've noticed some issues with the Storefront theme. I haven't tested on many other themes, but it might be a good idea. Another thing I've noticed is that the login form is no longer accessible. If you are not logged in and go to My Courses, you see a list of all courses. If you try to enroll, you get redirected back to My Courses but you don't see the login form. Do you think it makes sense to show the login form on the My Courses page as before? |
Thanks a lot for checking @m1r0 ❤️ I've updated several parts of the PR, can you kindly give it a check again? Thanks! |
I left some comments on the P2 post re: the login form. |
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.
Hey, I've tested the login form and it works as described. Nice! 🎉 Left one really minor suggestion.
But my main concern here is that I feel this block still doesn't look that good on most themes:
Maybe we should polish it a bit before making it the default?
cc @donnapep
Are the E2E tests failing related to this PR? |
Yes, I think so. I wouldn't worry about Hello Elementor, but it should definitely look good on Course, Divi and Astra. |
WordPress Dependencies ReportThe
This comment was automatically generated by the |
I did some testing on the Course theme and here's what I found:
|
Thanks for taking a look @donnapep !
My Courses page probably doesn't consider this setting, I tried with Student Courses block as it had before and it didn't consider the number of posts set in the reader. That setting works with Archive pages global query is used there. I've just checked that the
Very good idea, sounds like a nice improvement for the Course List Filter block. I'll create a ticket for it and implement it under that. Thanks you! |
Thanks a lot for reviewing @donnapep !
I've updated the code here and here, now the frontend will filter considering the default value.
This issue was due to the Course Purchase button removing all query params from URL, it was the user to the first page every time and as the added course wasn't there, the notice wasn't shown. I've fixed it here in sensei-pro.
I've updated the page pattern here to show the same number of courses as the legacy block. As for post per page, Query Loop block by default does not allow showing all courses, even if we provide no value for The limit with Grid comes from the default grid pattern we created. We can increase it if we want. The catch will be users adding the pattern anywhere will now have that increased number. We can do it too if that's okay.
Updated it here, now when filtering, we'll be taken to the first page. I'll make it work for Archive too in the Archive PR. |
Showing 10 for the list view and 12 for the grid view as it works now looks good, so we can leave it as is. 👍🏻 |
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.
Looks good! Left a few minor comments.
tests/unit-tests/blocks/test-class-sensei-course-list-filter-block.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Donna Peplinskie <donnapep@gmail.com>
Updated the hook name as per the conversation here |
I get the same fatal error as on the course archive page when I don't select a pattern, but I assume this fix will resolve it? |
This reverts commit ac791b7.
Yeah it'll fix this one too |
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.
🥳
Implements #6341
Changes proposed in this Pull Request