Making WordPress.org

Opened 5 years ago

Closed 4 years ago

#4092 closed defect (bug) (duplicate)

Theme Directory JS should handle pagination

Reported by: dd32's profile 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)

#1 @dd32
5 years ago

  • Keywords needs-patch added

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.

#2 @jonoaldersonwp
5 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 @dd32
5 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.

#4 @dd32
5 years ago

In 8126:

Theme Directory: Add a handler for paginated requests of archives. This doesn't support paginated requests, it simply ensures they don't result in a "No themes found" page.

See #4092.

#5 @dd32
5 years ago

In 8127:

Theme Directory: Cache bump after r8126.

See #4092.

#6 @dd32
4 years ago

#4814 was marked as a duplicate.

#7 @dd32
4 years ago

#4814 was marked as a duplicate.

This ticket was mentioned in Slack in #themereview by dingo_d. View the logs.


4 years ago

#9 @dingo_d
4 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 @dufresnesteven
4 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).

#11 @jonoaldersonwp
4 years ago

Ah, I meant, "If we don't fix this, it'll have a negative impact on our SEO / UX / marketing".
I'm not too fussed about the negligible performance impact of queries with offsets.

I'd be thrilled to kill the infinite scroll, too.

#12 @dd32
4 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #4814.

Note: See TracTickets for help on using tickets.