Opened 6 years ago
Closed 4 years ago
#4092 closed defect (bug) (duplicate)
Theme Directory JS should handle pagination
Reported by: | dd32 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Theme Directory | Keywords: | seo needs-patch |
Cc: |
Description
The Theme Directory currently doesn't handle pagination requests, but should. This is a spin-off of #4063.
A request for https://wordpress.org/themes/browse/popular/page/7/ should display the results of page 7 and the river of themes thereafter and probably a warning at the top of the page that there's other results that are not displayed.
Change History (12)
#2
@
6 years ago
Not to be a pain, but are we conflating complexity with importance? This is liable to have a significant impact on performance, so I'd be keen for it to have a higher priority, despite the challenge...
#3
@
6 years ago
- Priority changed from lowest to normal
Just being realistic. The problems that this causes doesn't outweigh the technical complexity of actually implementing it IMHO.
A temporary solution that I'll add today is that any paginated requests will just be dropped and redirected back to page 1 for JS users. Not ideal I'm sure, but better than the status-quo.
This ticket was mentioned in Slack in #themereview by dingo_d. View the logs.
5 years ago
#9
@
5 years ago
I think that the best course of action is to rewrite the entire themes theme, like plugins theme is, and solve any outstanding issues that way.
Nobody is working with backbone.js anymore, finding anybody in the community who wants to work with it is nearly impossible.
#10
@
5 years ago
I've taken a look at the code and I am fairly confident that I could get pagination working without an incredible time dump, definitely faster than a rebuild.
Are we interested in removing the infinite scroll feature and introduce pagination buttons? Or as @dd32 has mentioned, start on page X with a warning?
Secondly, @jonoaldersonwp:
This is liable to have a significant impact on performance
Can you qualify that statement? What performance improvements are you expecting? If we simply drop into page 7 of the result set, we will still be loading 24 themes (and their accompanying assets).
Unfortunately the JS version of the Theme Directory is written with Backbone and in such a way that it always starts at Page 0, I've attempted a few times to make it handle it correctly, but my Backbone skillset is so rusty that I can't make it work in such a way that works well.
I've marked this as
lowest
as it's a long-time problem and IMHO is unlikely to be a simple fix. If someone has backbone skills, we'll happily bump up the priority.Once the Pagination is working,
<link rel="next|prev"
should also be added per #4063, https://meta.trac.wordpress.org/attachment/ticket/4063/themes.4063.diff should work for that.