WordPress.org

Making WordPress.org

Opened 10 months ago

Last modified 8 weeks ago

#3739 new enhancement

Field for P2 post deadline and list of deadlines coming up

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

Description

At least Community Team is using it's P2 to make decisions. We are pushing to have one P2 post per each thing to decide and adding a deadline for every post, so that discussion does not end up hanging without some kind of closure. Alongside with this kind of posts, we have also informal posts on things that the whole community team should know. Because of this, there can be many posts after something with a deadline and the posts with deadline gets buried into pagination.

To help keeping track on posts with a deadline (posts that need attention/comments/discussion from community team), I'd like to see the custom field for setting the deadline and page or sidebar widget that lists every post with the deadline coming up.

Hugh said that easiest way to achieve this would probably be making a custom plugin and adding it into the make.w.org. Writing the plugin is also fairly simple, I'm thinking about one post_meta field per post with a deadline and a shortcode running a simple WP_Query against that information (with proper caching in place). How does that sound and if I end up writing a plugin for this, any pieces of advice on how to add datepicker after content field in P2?

Attachments (3)

Screenshot 2018-09-13 22.21.45.png (420.0 KB) - added by sippis 8 months ago.
Screenshot of frontend functionality
Screenshot 2018-09-13 22.22.12.png (128.2 KB) - added by sippis 8 months ago.
Screenshot of field in Gutenberg
Screenshot 2018-09-13 22.23.08.png (87.7 KB) - added by sippis 8 months ago.
Screenshot of field in classic editor

Download all attachments as: .zip

Change History (18)

This ticket was mentioned in Slack in #community-team by sippis. View the logs.


10 months ago

#2 @sippis
10 months ago

I started on working with the plugin. Currently, it adds a datepicker on P2 post form, saves the selected deadline and has a shortcode (with 12 hours cache) to list upcoming deadlines.

There are few additions/fixes at least which are in my TODO:

  • support translations fully
  • show datepicker field on classic editor, gutenberg and when editing post in P2 front
  • add some filters (cache time, shortcode output file, posts array)

Development is being made at https://github.com/timiwahalahti/p2-post-deadlines

This ticket was mentioned in Slack in #community-team by sippis. View the logs.


9 months ago

@sippis
8 months ago

Screenshot of frontend functionality

@sippis
8 months ago

Screenshot of field in Gutenberg

@sippis
8 months ago

Screenshot of field in classic editor

#4 @sippis
8 months ago

This moved forward, the plugin now has support for setting a deadline in classic and Gutenberg editors.

Above are a few screenshots on the functionality. I didn't have meta environment in my computer, so frontend is just basic P2 theme - I think some style customization can be made directly to make.w.org custom P2 theme if needed(?).

In frontend screenshot you see:

  1. datepicker for setting the deadline when adding a new post
  2. deadline appended to post content
  3. listing of posts with upcoming deadlines in sidebar

Translation support and better filters are still in TODO, but can be easily added if we decide to move forward with this.

This ticket was mentioned in Slack in #community-team by sippis. View the logs.


8 months ago

#6 follow-up: @hlashbrooke
8 months ago

  • Keywords has-patch has-screenshots added
  • Type changed from defect to enhancement

This looks great @sippis! I love it :)

It seems to me like we'll definitely be able to go ahead with this, but in order to make that happen you'll need to do the following:

  1. Finish up the plugin (including localisation functions, etc.)
  2. Add it to the WordPress Plugin Directory
  3. Post on the Meta P2 with a proposal for adding it to the Make network - example: https://make.wordpress.org/meta/2017/08/24/o2-plugin-request-the-final-word/

From there, the Meta team will review it and can add it to the network is it passes approval (which it looks like it should). After that they just need to activate on the Community P2 and for any other team that wants it.

This is going to be a great addition - thanks for putting it together!

This ticket was mentioned in Slack in #meta by sippis. View the logs.


7 months ago

#8 in reply to: ↑ 6 @netweb
7 months ago

Replying to hlashbrooke:

  1. Post on the Meta P2 with a proposal for adding it to the Make network - example: https://make.wordpress.org/meta/2017/08/24/o2-plugin-request-the-final-word/

This shouldn't be required, evaluating the code and plugin can happen here in the Trac ticket @sippis, no need to post to the P2 IMHO

#9 @sippis
7 months ago

  • Keywords needs-testing added

I have finalized the plugin now, so I would like to ask it to be reviewed.

For background why I made this plugin and ask it to be added to meta.w.org, please read my first description on the ticket :)

The plugin is now in (plugin directory)https://wordpress.org/plugins/post-deadlines/ and (Github)https://github.com/timiwahalahti/p2-post-deadlines) as well. It works with O2, P2 and also without those.

The features of this plugin include:

  • Set post deadline from front-end editor (O2/P2)
  • Set and modify deadline from Gutenberg and classic editor
  • Adds deadline at the end of the_content
  • Shortcode for listing posts with upcoming deadlines
  • Transient cache for posts with upcoming deadlines when the shortcode is used
  • An extensive amount of filters to alter functionality

I think there should not be anything that would conflict with any existing features on Make as the plugin only adds functionality and does not override anything.

Assuming this is accepted and can be added to the Make blogs, the only additional code that we might need to add would be some additional CSS for the front-end datepicker field.

This ticket was mentioned in Slack in #meta by sippis. View the logs.


7 months ago

This ticket was mentioned in Slack in #meta by sippis. View the logs.


7 months ago

This ticket was mentioned in Slack in #meta by sippis. View the logs.


6 months ago

This ticket was mentioned in Slack in #meta by sippis. View the logs.


5 months ago

This ticket was mentioned in Slack in #meta by sippis. View the logs.


4 months ago

#15 @sippis
8 weeks ago

Any updates on this? I'll bump the plugin supported WP version soon...

Note: See TracTickets for help on using tickets.