Update Petitions Widget in Dashboard

This seems all handled within https://github.com/ClassicPress/ClassicPress-APIs, but I am not sure how to achieve the following:

Update the list to reflect the latest petitions and not those that are several months old, without losing the older petitions either.

While it surely would be easy to just swap URLs here https://github.com/ClassicPress/ClassicPress-APIs/blob/14c1bb28081de8abeffb39bc15cdda05788049c3/v1/features/1.0/index.php, that wont do, because the discourse petitions are under different structure
Some of the links are clear how to be replaced, but the whole query in the API is based on Fider, see
https://github.com/ClassicPress/ClassicPress-APIs/blob/master/v1/features/1.0/index.php

Is there an easy way to update that widget, without losing old petitions and including new ones?

I’m for removing the petitions widget.
And also:

  1. In about.php change “Suggestions for improvements” to point to the forum
  2. In the “Welcome” widget add some words that point to the forum and to the petitions category

…my 2 cents…

1 Like

I think the #1 of your list can be easily done by @James in form of a redirect (and yes I agree, that leads to a dead/old link, so it needs to change).

Since we talk remove things… I am A) in favour of this because pings to a remote always just cost even if minimal, resources, but B) not in favour because it removes any “backlink” we have inside the admin to our forums and petitions.

What about a code snippet instead that lets users disable this widget(s) easily? We could add it to the snippet repot, something like shown here How to Disable Unwanted Widgets in WordPress

That would allow us to keep the widget by default but users would easily know how to remove it.

I asked about this a little while ago.

We are trying to build up some recent activity here before doing the changeover.

4 Likes

See also:

3 Likes

I sort of missed this reply and whatever followed.

I am however wondering now, how do we/did we try to build up activity and with what tools are we/did we trying to build up activity precisely?
IPoAC?
:rofl:

Because the thing is:
no fresh data in a dashboard === no fresh nor existing users to build up activity === no refreshing the dashboard widget because waiting for activity build up… … :loop: :loop:

And I also know, we have averagely 10 votes on each petition, and all of them 10 votes I can name by name without going to look who voted, because its the users who daily interact here.

We aren’t going to get any more votes than that, no matter what we do, and actually I doubt it is a problem not having many votes, the problem rather is that we show “proof of death” in our Dashboard by showing several years old content as the “latest hot stuff”.

What is required to make this happen?
I can see on https://github.com/ClassicPress/ClassicPress/issues/716#issuecomment-917692610 Wade had a question that seems to block the entire process.

I am not sure anyone of us who can help on this.

If we can, please let us know. Perhaps add this to the project list if help is needed.

If not, we still need to get something done about.
If we cannot get it updated, then really I prefer to remove this widget like @Simone suggested.
Possibly as a BUG Fix in the next release (because it de-facto could be considered broken and thus a bug)

What is the opinion of folks who can make this happen on this one?
@wadestriebel, @MattyRob, @James I guess you are the ones with the abilities required? Sorry if there are more, we should if possible resolve this.
Hope it makes sense.

2 Likes

This blog post, and a few other ways of letting everyone know that petitions are ready again: Petitions Update - Let Your Voice Be Heard

That is after we’ve already built up some more activity. We added the forum plugin to allow voting on petitions fairly recently, and most of the petitions had zero votes at that point. Now we should be in better shape.

Update https://github.com/ClassicPress/ClassicPress-APIs/blob/a75a72fc7cf3caed8d93e6d1da22c83fabb15f6b/v1/features/1.0/index.php to pull from the forums API endpoints instead of static files, keeping the results in the same format as they are today (https://api-v1.classicpress.net/features/1.0/). This shouldn’t even require a new release of ClassicPress.

This question isn’t blocking the process, it’s something that will be solved in the course of making the needed changes to that API endpoint. It also doesn’t have to be perfect at first.

1 Like

Here is a PR to switch the data source over to the forums with before/after screenshots:

5 Likes

That’s great. Just been testing it out.

2 Likes

I agree @james
Preferably of course the widget would stay
What I basically means is “if it doesn’t get updated we should remove it”

I’ll test the pr today as well so we can move
It forwards

Thanks for the push!

1 Like

Thanks to @Code_Potent and @ozfiddler for testing out these changes. This is updated to point to the petitions on the forums now. See https://github.com/ClassicPress/ClassicPress-APIs/pull/33 for screenshots and more information.

3 Likes

This works really well and looks good. It’s super handy being able to jump over to the forum from the CP dashboard to check out a petition. Huge improvement. Thanks James!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.