Pocket / curation-tools-frontend

DEPRECATED
Mozilla Public License 2.0
10 stars 52 forks source link

Get UI updates working #125

Closed nina-py closed 3 years ago

nina-py commented 3 years ago

Goal

Get at least some of the mutations working, and the frontend responding to changes in prospect state.

Implementation Decisions

Note that:

1) I am currently refetching queries from the API when prospects are snoozed or rejected. This is the nuclear option and I will replace it with what is recommended in Apollo docs (but what I couldn't get running just yet) - an update function that manually updates the local Apollo cache.

2) Changes to prospects sent to the local API are not saved to disk for some reason (I have already made the file writable - it's not enough). They persist on the frontend as long as you keep the local GraphQL server running.

3) This PR only gets two mutations working out of ~6-7 that we need. I'm happy to keep working on this PR until the Edit and Edit & Approve mutations also work correctly (I think these would mean everything on the Prospects page is functional), or you could merge it as is and I'll continue on another branch.

nina-py commented 3 years ago

Back to WIP as I have done a bit more on this but have run out of time to finish today. Today's commit:

Outstanding tasks:

nina-py commented 3 years ago

Today's commit details are:

Tests are lagging behind (sorry!), will fix existing ones and write more for new functionality in the next commit.

nina-py commented 3 years ago

Ready for review. A few tests could be added for the Edit & Approve page - will do these in a follow-up PR alongside with tests for the Prospects page (there's one skipped test there now) that I have finally figured how to fix.