#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 )
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)
Change History (22)
#4
@
6 years 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.
#5
@
6 years 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.
#7
@
6 years 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
@
6 years 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?
#9
@
6 years 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.
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
@
6 years 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 inarchive-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
@
6 years 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.
#12
@
6 years ago
Thank you for catching those bugs and my mistakes, @tellyworth!
- 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
inmeeting_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.
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. Thewporg-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.