Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#50050 new enhancement

Community Events: Sort pinned events chronologically

Reported by: iandunn's profile iandunn Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:


Events in the widget are normally sorted chronologically, but we also pin special events like regional WordCamps -- Asia, Europe, US -- and WP15. We're also currently pinning the next online WordCamp. Those pinned events aren't sorted chronologically, instead they appear at the top of the list, even if there are local events that happen sooner.

The sorting order isn't obvious to the user, and I think most people will assume that it's sorted chronologically, since that's what normally happens. That can lead to people assuming that their local events happen after the pinned events (which may be several months away).

Attachments (1)

Screen Shot 2020-05-01 at 11.58.36 AM.png (152.9 KB) - added by iandunn 4 years ago.
Example of unintuitive sorting

Download all attachments as: .zip

Change History (2)

4 years ago

Example of unintuitive sorting

#1 @iandunn
4 years ago

The API could sort all of the events, but that creates a situation where the pinned events aren't in top 3, so they wouldn't be shown in the widget.

It could just sort the top 3 results, but that'd create situations where the local event in position #1 would expire and be removed by trim_events(), and a new local event would be inserted at position #3 when it should be in position #1, leading to the same problems that we're trying to fix. The event would be moved to position #1 the next time the events were refreshed from the API, causing additional inconsistency.

It seems like the best solution is for the API to remain as-is, and for Core to do the sorting after trim_events().

Note: See TracTickets for help on using tickets.