-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Currently, in order to track changes in the meditor, we use the key of the "transaction number":
dandi-archive/web/src/components/Meditor/Meditor.vue
Lines 189 to 192 in 44937f9
<v-jsf | |
:key="` | |
basicModel-${editorInterface.transactionTracker.getTransactionPointer()} | |
`" |
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:
dandi-archive/web/src/components/Meditor/editor.ts
Lines 86 to 90 in 44937f9
setBasicModel(newModel: DandiModel) { | |
Object.entries(newModel).forEach(([key, value]) => { | |
this.basicModel.value[key] = value; | |
}); | |
} |
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.