freedomofpress / pressfreedomtracker.us

Code for the U.S. Press Freedom Tracker project website
https://pressfreedomtracker.us
GNU Affero General Public License v3.0
16 stars 7 forks source link

Spec out architecture for user friendly statistics entry #957

Open harrislapiroff opened 3 years ago

harrislapiroff commented 3 years ago

As a subtask of #791, please spec out a proposed implementation of this feature. I'm guessing this will likely take the form of a draftail plugin and potentially a widget or field for things like stat boxes (or maybe just converting those to limited feature rich text fields for minimal maintenance surface?)

harrislapiroff commented 3 years ago

@chigby I'd like for you to take this on whenever you get around to it. Seem like something you're comfortable doing?

chigby commented 3 years ago

Animation detailing the "paste a search URL" workflow:

stats

chigby commented 3 years ago

I couldn't quite fit this into the previous gif, but here's the result of the edits on the page itself:

image

chigby commented 3 years ago

While working on hooking up a modified count API so that the number inserted into the rich text field (the "2" in the GIF above) is a live query to the current database, I discovered something that might be a bug in the "summary" view on the sidebar of the search page. Namely that "Institutions Affected" doesn't take into account institutions that are targeted via targeted journalists. Those are, from what I can tell, not included in that count.

I'm wondering if they should be?

chigby commented 3 years ago

I actually think I've figured out how to make a better data-entry pop-up window without getting bogged down in trying to replicate how wagtail does it

chigby commented 3 years ago

Here's what I have so far. I think this modal is much more what we had in mind. stats4

The key here, was for me not to try to use the same workflow that wagtail uses, which is quite a bit complicated, and instead write my own simple one in react.

harrislapiroff commented 3 years ago

Oooh that's looking super slick!