Making WordPress.org

Opened 7 weeks ago

Last modified 6 weeks ago

#4637 new enhancement

WP Events Dashboard widget could be improved for multi-days events

Reported by: imath Owned by:
Milestone: Priority: normal
Component: API Keywords: has-patch



Following up with this conversation on Slack #meta-wordcamp about the Events Dashboard Widget. So far it only displayed the starting date of an event. It's great for meetups, it's a bit annoying for some WordCamps.

When a WordCamp is a multi-days event, only using a starting date is problematic :

  • It doesn't inform about the WordCamp's length
  • The first day of a WordCamp might be a Contributor Day (It's actually the case that generated this ticket)
  • There is some inconsistency with the schedule on central.wordcamp.org (which displays a range of days).

I've dived a bit into the Meta Repository and it looks like the end_date is an existing field into the wporg_events table, so I guess a first step would be to include this fiels into the JSON response. That's what I've tried to do in the first attached patch.

Then, the second step could be to update the WP_Community_Events from WordPress Core repository so that if the event is not a meetup and contains this end_date property, then display a range of day instead of the first day.

here's a screenshot of a test I've made with the wp-community-events.patch attached to this ticket:

Thanks in advance for your help.

Attachments (3)

4637.patch (1.5 KB) - added by imath 7 weeks ago.
wp-community-events.patch (1.4 KB) - added by imath 7 weeks ago.
Proposal2.PNG (23.1 KB) - added by casiepa 7 weeks ago.
Adding number of days instead of enddate

Download all attachments as: .zip

Change History (10)

7 weeks ago

#1 @casiepa
7 weeks ago

Some comments/ideas:

  1. I confirm that the standard Central API is already exposing the end-date, so it should be easy to get/add it: https://central.wordcamp.org/wp-json/wp/v2/wordcamps (I have been using it for years on some pages)
  2. I don't really see why having the first day a Contrib Day can start confusion. Contributor Day is part of the event, so that is your start date according to me.
  3. In your example, setting it as 'Sep 13-14, 2019' seems to break with the format of the other dates that start with the weekday. How about keeping the standard format and use the 2nd line?
  4. How about just adding the number of days on the next line (see attached image).

7 weeks ago

Adding number of days instead of enddate

#2 @iandunn
7 weeks ago

Related #4319

#3 @dd32
7 weeks ago

Just to confirm, we do store a end_date field for the wporg_events table and fill it correctly according to the WordCamp data-source, for example for WordCamp Brisbane (A 2 day event) the Database table looks like this: {... "date_utc": "2019-08-24 00:00:00", "date_utc_offset": null, "end_date": "2019-08-25 00:00:00", ...}

Adding the end_date field to the response (as done in 4637.patch), ~or perhaps a dates field instead~ is possible, but you'll then need to raise a core ticket to actually use that data and work out a UI.
(edit: Removed second suggestion, end_date works best IMHO, plus it's set for Meetup events as it provides and endtime, ie. 2019-07-30 9:00:00 -> 2019-07-30 12:00:00)

For others, the API responsible is here:

Last edited 7 weeks ago by dd32 (previous) (diff)

#4 @imath
7 weeks ago


Thanks for your feedbacks. About the format, I thought it was best to use the one Central uses.


And actually I wasn't! So I will raise a core ticket with an updated version of wp-community-events.patch. Thanks for your advices @iandunn & @dd32.

#5 @imath
7 weeks ago

FYI here is the link to the WordPress Core ticket (47798).

This ticket was mentioned in Slack in #meta-wordcamp by imath. View the logs.

7 weeks ago

#7 @_DorsVenabili
6 weeks ago

+1 to this request :)

Note: See TracTickets for help on using tickets.