dandi / dandi-archive

DANDI API server and Web app
https://dandiarchive.org
13 stars 10 forks source link

Move `Meditor`/`VJsfWrapper` shared state into a `state.ts` file #894

Open mvandenburgh opened 2 years ago

mvandenburgh commented 2 years ago

Since transaction-tracker and editor-interface never change (they are singleton instances), we could factor them out into a shared state. Vuex wouldn't be totally necessary, as the state does just apply to the meditor, but we could move Meditor.vue and VjsfWrapper.vue into their own Meditor folder, and place any shared state in a state.ts file. This would allow us to take advantage of composition API without needing to clutter the store. What do you think?

_Originally posted by @AlmightyYakob in https://github.com/dandi/dandi-archive/pull/862#discussion_r802010555_

waxlamp commented 1 year ago

@mvandenburgh, @AlmightyYakob: is this still valid?

jjnesbitt commented 1 year ago

I think so, as EditorInterface and TransactionTracker both exist in their respective files as classes, but IMO this is exceedingly low priority.

mvandenburgh commented 1 year ago

Yes, Jake is correct, this is still valid.