WordPress.org

Making WordPress.org

Opened 21 months ago

Last modified 7 days ago

#3078 new enhancement

Meetings: Use a single place to store meeting times info

Reported by: SergeyBiryukov Owned by:
Milestone: Priority: normal
Component: Make (Get Involved) / P2 Keywords: has-patch
Cc:

Description (last modified by SergeyBiryukov)

Meeting times on https://make.wordpress.org/ are currently set in two separate places:

  • In Site Properties meta box of Sites CPT for make.wordpress.org home page.
  • In Meeting Info meta box of Meetings CPT for make.wordpress.org/meetings.

This leads to a few issues:

  • Meeting times are often updated in one place, but not in another, resulting in a discrepancy.
  • Sites CPT only allows for "Weekly" recurrence option, which is not flexible enough, see #2218 and #3075.
  • The Meetings page has some JS to display the time in user's local timezone. Home page doesn't have that JS.

(Additionally, some people told me they didn't know about the Meetings page, apparently it's not discoverable enough. But that's out of scope for this ticket.)

Proposed changes:

  • Home page should get the meeting times from the Meetings CPT meta.
  • Home page should have the JS for displaying the time in user's local timezone.

Attachments (6)

3078.diff (16.1 KB) - added by ck3lee 3 weeks ago.
3078.png (149.0 KB) - added by ck3lee 3 weeks ago.
3078.1.diff (2.1 KB) - added by ck3lee 3 weeks ago.
Modified make_sites_cpt.php
3078.2.diff (11.3 KB) - added by ck3lee 10 days ago.
3078.2.png (375.9 KB) - added by ck3lee 10 days ago.
3078.3.diff (14.9 KB) - added by ck3lee 7 days ago.

Download all attachments as: .zip

Change History (18)

#1 @SergeyBiryukov
21 months ago

  • Description modified (diff)

#2 @obenland
12 months ago

  • Type changed from defect to enhancement

#3 @tellyworth
5 weeks ago

There's even a third place that some teams store meeting times, which is a [time] shortcode in a sidebar widget. This is a particular problem for Meta, since that shortcode has no way to declare a fortnightly interval.

One obstacle in fixing all of this is that the meta environment omits some key parts. make_sites_cpt.php is missing. The wporg-meeting-posttype plugin is present but inactive by default. The CPTs are not populated, and make.wordpressorg.test/meetings/ is 404 event when a test CPT is added.

#4 @tellyworth
5 weeks ago

For reference, the shortcode in the Meta sidebar looks like this: [time relative]Wednesday 21:00 UTC[/time]. A stopgap solution to the fortnightly issue might be to support a syntax something like [time weeknum="even"]Wednesday 21:00 UTC[/time]. But better still would be to create a new shortcode/widget/block for displaying meeting times directly from the CPT meta.

@ck3lee
3 weeks ago

@ck3lee
3 weeks ago

#5 @ck3lee
3 weeks ago

  • Keywords has-patch added

@SergeyBiryukov, I have attached attachment:3078.diff. Can you have a look?

In this patch:

  • Each section in Make homepage displays the next meeting time of Meeting CPT based on local timezone.
  • Minor styling: Update section title as a "Link" and remove the link "Learn more about ..." to reduce clutter.
  • Minor styling: Increase opacity for meeting text to increase contrast for a11y.

Other notes:

  • @tellyworth noted that it requires make_sites_cpt.php to be open sourced. See #4422 (ticket). I will create a separate diff once the file is checked in.
  • Also requires config to set up the post ID of Meeting CPT to display the meeting time for each Site CPT.

Let me know if this works. Or not? I'm happy to make changes.

#6 @Otto42
3 weeks ago

#4422 was marked as a duplicate.

@ck3lee
3 weeks ago

Modified make_sites_cpt.php

#7 @ck3lee
3 weeks ago

Thank you. @tellyworth for adding make_sites_cpt.php to the repo.

attachment:3078.1.diff has the necessary changes for adding a new field for make_sites_cpt.php.

#8 @tellyworth
2 weeks ago

Rather than specifying the post ID, what about using switch_to_blog() and then fetching the available meeting posts to display in a list?

@ck3lee
10 days ago

@ck3lee
10 days ago

#9 @ck3lee
10 days ago

Thank you for your feedback, @tellyworth. I have removed the need to specify post_id. I'm using wp_query to get a list for meetings for each team.

In attachment:3078.2.diff:

Each section in Make homepage displays the next meeting time of Meeting CPT based on local timezone.
When there is more than 1 meeting per team, (+X more) link is visible. It links to a filtered list of meetings for the team.
Minor styling: Update section title as a "Link" and remove the link "Learn more about ..." to reduce clutter.
Minor styling: Increase opacity for meeting text to increase contrast for a11y.

Other notes:
The meeting related meta keys in sites CPT is no longer required. We can hide these fields on a separate patch once this is live.

#10 @tellyworth
8 days ago

Thanks CK! Some notes on 2078.2.diff:

  • When the meetings page is filtered with a hash fragment like /meetings/#Core there's no clear way to navigate to all meetings from there. It also says "Upcoming WordPress Meetings" in the header, which could mislead someone into not realising there are other team meetings also.
  • There's a console.log() left in archive-meeting.php
  • I've run into an issue with one of the meetings where I think it's calculating the next meeting time incorrectly, still investigating that one.
  • I think it needs to be explicit about the time zone when it displays the next meeting time in the local TZ. Showing the "4 hours from now" relative bit certainly helps, but whenever I read a time like that I'm never certain of what TZ it's shown in.

#11 @tellyworth
8 days ago

I figured out the next meeting issue: the front page query isn't respecting the end date for meetings that have them. I think it needs a more complex query like the one in meeting_archive_page_query(). It's a shame that function doesn't seem very reusable.

@ck3lee
7 days ago

#12 @ck3lee
7 days ago

Thank you for catching those bugs and my mistakes, @tellyworth!

In attachment:3078.3.diff,

  • When a page is filtered, it will display a page header Upcoming Team Meetings with a link to Show meetings for other teams.
  • Removed console.log()
  • Reuse meta_query in meeting_archive_page_query for shortcode

I'm not sure how I feel about re-using archive-meeting.php with client-side filtering now. I have considered displaying team specific name for the page header, but feels wrong to concatenate strings with team name this way. So, I discounted that idea. I'm happy to make changes/ create a separate page for filter if you think that is necessary.

Note: See TracTickets for help on using tickets.