GoodDollar / GoodCeramicDashboard

0 stars 0 forks source link

(Feature) Ceramic feed dashboard: Implement new publish flow, merge with backend in a single app #3

Closed johnsmith-gooddollar closed 2 years ago

johnsmith-gooddollar commented 2 years ago

Description

About #3666

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

johnsmith-gooddollar commented 2 years ago
  1. Had to do it asap, so the default template was used. Will add task for TS migration and assign it to @alt-a1r I do not prefer use TS when I'm limited in time because it have a huge overhead due to the types matching. Sometimes it's more strict than Java and I have feeling I'm trying to code in C++ ;)
  2. If post is published and updates - we're updating it in ceramic.
  3. If post is draft and updated in Strapi - we're ignoring this
  4. If publishedAt is present in the data event prop that means publish or unpublish button was pressed. No other options possible. If publishedAt is null it's means we have to unpublish definitely. There no way to unpublish something twice (there's no unpublish button for draft - only publish / update and vice versa).
  5. Also there're additional checks on ceramic side. We won't try to republish or unpublish post twice. Also the same document will be used if unpublish post then re-publish it again (because the unique once-generated cid is kept in the Strapi db)
  6. Tomorrow I'll append this with the comments
  7. You reviewed the old code without the latest commit where all the logic we discussed was implemented
johnsmith-gooddollar commented 2 years ago

@sirpy i've created task for TS migration: https://app.zenhub.com/workspaces/gooddollar-5d50833888a83c6880d3e345/issues/gooddollar/gooddapp/3682 We need to discuss it and clarify which TS template to use because there's no official typescript bolierplate yet