BobaBoard / issues

BobaBoard issue tracking
2 stars 0 forks source link

Migrating to boba-editor-next #97

Open essential-randomness opened 2 years ago

essential-randomness commented 2 years ago

Currently blocked on getting BEN to feature parity with boba-editor

Goal

Swapping boba-editor with boba-editor-next (BEN), for reasons to be documented at some other juncture.

How

We'll do the migration in 2 phases:

  1. cool-phase-name#1: new posts are created (and displayed) through BEN, but boba-editor remains in charge of old posts
  2. cool-phase-name#2: old posts are converted to the new BEN format, and boba-editor is taken out back and shot in a dark alley somewhere given the proper send off and a honorable discharge

cool-phase-name#1

a.k.a. "new posts are created (and displayed) through BEN, but boba-editor remains in charge of old posts"

Notes

Backend changes

This phase doesn't need to touch boba-backend or the DB in any way. boba-components can conditionally display content using either boba-editor OR BEN according to which format the passed JSON is in. This doesn't mean that we can't choose to e.g. tell the db to save old and new content in different columns if we so wish, but just that we're not forced to do backend changes.

Frontend changes

In the ideal case, boba-frontend wouldn't need to be touched either. Any change done there should be reviewed with suspicion and questioned.

Subphases (bugs to be filed)

cool-phase-name#2

a.k.a. old posts are converted to the new BENformat, and boba-editor is taken out back and shot in a dark alley somewhere given the proper send off and a honorable discharge

### Steps
- [ ] Download entire `boba-backend` DB
- [ ] Write a zod query to ensure we know the schema of every post
- [ ] Write a convert function
- [ ] Create a new DB column for the update text
- [ ] Have `boba-backend` server send down both new and old text. Changes to `boba-components` from cool-phase-name#1 should have allowed for displaying either new text if it exists or old text if it does not
- [ ] Slowly convert old posts, monitoring for errors
- [ ] Once all old posts have been converted, delete old text column from the DB
- [ ] Put `boba-editor` out of its misery, and remove no longer needed logic for deciding whether to display new or old text from `boba-components`