TheIOFoundation / ProjectLockdown

Project Lockdown (an initiative from The IO Foundation) is a civic tech, interactive platform providing an overview of the state of Human and Digital Rights around the globe. It evaluates policies obtained from official sources that may impact their observance. It provides, among other tools, a layered map interface that allows for a visual representation of the policies adopted, assisting a broad range of stakeholders in understanding the global state of their Rights. This empowers them to become active agents of global change.
https://ProjectLockdown.world
GNU General Public License v3.0
36 stars 14 forks source link

[PROD] Create a WP plugin to publish selected GH Issues. #216

Open JFQueralt opened 3 years ago

JFQueralt commented 3 years ago

logo

Problem

Posting Needs in GitHub helps provide better context to what Project Lockdown needs to be developed. It is however not the most user-friendly interface and requires a degree of knowledge that not all users willing to help may have. Additionally, websites are still the traditional entry point to obtain information.

Objectives

To create (or reuse) a plugin for Wordpress that will allow posting on PLD's website relevant Issues from specific Needs.

Proposed solution

We have identified some existing solutions:

WP Github https://wordpress.org/plugins/wp-github/ https://github.com/seinoxygen/wp-github Seeking support: @moabi - @seinoxygen - @naulacambra - @tripflex

Pros: Seems to be ready for CSS cutomizations, which would help with the layouts. They use shortcodes, which is really handy.

Cons: Limited parameters to select Issues.

Github Embed https://wordpress.org/plugins/github-embed/ https://github.com/leewillis77/wp-github-oembed Seeking support: @leewillis77

Pros: Allows for extraction via Query (theoretically would allow us to filter properly according to Needs).

Cons: On a first conversation, author estimates that it's not a good fit for our objectives.

Extra information

Resources

Usage documentation

Technical documentation

Please refer to the above links.

UXUI resources

Designs to come on this Figma board: https://www.figma.com/file/EUxTYXJmQBeciSflVhKe4g/PROD-GH-WP-Plugin

Other documentation resources

Tests

Related Issues

tripflex commented 3 years ago

So you're looking for ways to POST to GitHub from a WordPress plugin?

merchantweb commented 3 years ago

@tripflex We're looking to post Github Issues from this repo to our project website with ability to filter issues by label. Possibly convert Github Issues to an Issue custom post type that is uploaded daily to the wp database. Github labels could be converted to WP tags. Originally we looked to WP-Github bc it is the only plugin that allows for listing the issues; but the label info doesn't come through as well to allow filtering.

JFQueralt commented 3 years ago

@tripflex Flow would be GH >> WP

Examples of this would be

We'd need a way to extract the Issues, load them on WP and format them.

jlvanhulst commented 3 years ago

I will implemnt this tomorrw. Its really very straight forward with the Webhook that is already available in WP and the Google script that is listening to github issue updates.

jlvanhulst commented 3 years ago

p.s. I noticed that the WP-Webhooks plugin in Wordpress was disabled. That is the one we'll need. It's also the one that was picking up all new users that are being added in google and adds then as a subscriber to the user database. I have re-enabled that pluging and I will add a webhook incoming there for receiving the github updates from the google script solution that is already live.

JFQueralt commented 3 years ago

Strange that the plugin was disabled. Do we have a log of plugin activities to check what could have happened?

jlvanhulst commented 3 years ago

We could add a plugin to keep track of that :)

On Mon, Feb 8, 2021 at 12:52 PM Jean F. Queralt notifications@github.com wrote:

Strange that the plugin was disabled. Do we have a log of plugin activities to check what could have happened?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/TheIOFoundation/ProjectLockdown/issues/216#issuecomment-775327057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPPQ6X7SWIKKNJLE3NTMF3S6AQFTANCNFSM4XFJ5CXQ .

-- 347-453-7686

merchantweb commented 3 years ago

@JFQueralt and @jlvanhulst I disabled it when installing elementor on the live site bc the elementor editor was not loading due to a confilct with one of the plugins. It's just easiest to disable all the plugins and work back up to deduce what is interfering. I doubt it is the webhooks plugin. I actually think it has something to do with elements kit. The plan is to re-enable plugins in groups while testing the editor as I go to narrow it down. There are alot of plugins installed. Creating a bit of bloat. With wordpress the less plugins needed the better. In this case it appears that the order of plugins activation has an effect on the elementor editor but not 100% on that yet.

JFQueralt commented 3 years ago

Hear hear. Happy to clean up the pile of plugins.

merchantweb commented 3 years ago

I propose to use a custom post type vs integrating with the blog post type for administration purposes. Issues will then be organizaed in the WP backend separate from normal posts.

JFQueralt commented 3 years ago

Type of Issues to be posted on WP (that we can think of at the moment) are:

It does make sense to use a Custom Post Type for these as they would be treated separately from regular Blog posts.