Improve state change tracking in Meditor
- Dominant language
- Python
- Stars
- 26
- Forks
- 21
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 15
Description
Currently, in order to track changes in the meditor, we use the key of the "transaction number":
https://github.com/dandi/dandi-archive/blob/44937f963fad20bb46632eb5125ca4e8cb9a73a7/web/src/components/Meditor/Meditor.vue#L189-L192
However, this usage sort of masks an underlying problem, which is that state change in `EditorInterface` and `MeditorTransactionTracker` isn't handled in a very reactive way. For example, updating the basic model is done here:
https://github.com/dandi/dandi-archive/blob/44937f963fad20bb46632eb5125ca4e8cb9a73a7/web/src/components/Meditor/editor.ts#L86-L90
Even though `basicModel` is a ref that could propagate reactive change. When attempting to simply make that change locally, other things break. I think `EditorInterface` and `TransactionTracker` need to be refactored altogether, potentially making use of pinia.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading web/src/components/Meditor/Meditor.vue at lines 189-192 and web/src/components/Meditor/editor.ts at lines 86-90. Trace how EditorInterface and MeditorTransactionTracker propagate changes, then evaluate the existing breakages from making basicModel reactive and whether Pinia fits. Done means state changes update reliably without relying on the transaction number as the key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100