WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 6 months ago

Last modified 5 months ago

#3078 closed enhancement (fixed)

Meetings: Use a single place to store meeting times info

Reported by: SergeyBiryukov Owned by: tellyworth
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 7 months ago.
3078.png (149.0 KB) - added by ck3lee 7 months ago.
3078.1.diff (2.1 KB) - added by ck3lee 7 months ago.
Modified make_sites_cpt.php
3078.2.diff (11.3 KB) - added by ck3lee 6 months ago.
3078.2.png (375.9 KB) - added by ck3lee 6 months ago.
3078.3.diff (14.9 KB) - added by ck3lee 6 months ago.

Download all attachments as: .zip

Change History (22)

#1 @SergeyBiryukov
2 years ago

  • Description modified (diff)

#2 @obenland
18 months ago

  • Type changed from defect to enhancement

#3 @tellyworth
7 months 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
7 months 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
7 months ago

@ck3lee
7 months ago

#5 @ck3lee
7 months 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
7 months ago

#4422 was marked as a duplicate.

@ck3lee
7 months ago

Modified make_sites_cpt.php

#7 @ck3lee
7 months 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
7 months 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
6 months ago

@ck3lee
6 months ago

#9 @ck3lee
6 months 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
6 months 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
6 months 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
6 months ago

#12 @ck3lee
6 months 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.

#13 @tellyworth
6 months ago

In 8922:

Make/Meetings: add a shortcode for displaying the next meeting time for a team.

This uses the meetings from the CPT on the Meetings tab, and will enable us to deprecate the redundant Weekly Meeting meta in the Sites CPT.

Props ck3lee.
See #3078.

#14 @tellyworth
6 months ago

  • Owner set to tellyworth
  • Resolution set to fixed
  • Status changed from new to closed

In 8923:

Make home theme: show next meeting time in user's TZ.

This uses the shortcode from [8922] to display the next meeting for each team, with a link to find additional meetings, rather than a single "Weekly" meeting per team. JS is used to convert the time into the user's local time zone. It also links to a filtered list of meetings per team.

Props ck3lee.
Fixes #3078.

#15 @tellyworth
5 months ago

In 8952:

Make/meetings: adapt the meeting_time shortcode so it can be used on all Make sites.

Adds several parameters so it can be used in a sidebar. For example, to list all meetings for the Meta team:

[meeting_time team="meta" before="" more=0 limit=-1 /]

See #3078

#16 @tellyworth
5 months ago

In 8953:

Make/meetings: fix post count for 'more' param in [8952]

See #3078

Note: See TracTickets for help on using tickets.