Opened 5 years ago
Last modified 5 years ago
#50050 new enhancement
Community Events: Sort pinned events chronologically
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
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)
Change History (2)
#1
@
5 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()
.
Example of unintuitive sorting