Skip to content

TranscriptionEntity store refactoring

Erwan Rouchet requested to merge entity-store-refactoring into master

Preparatory work for #621 (closed): the frontend's store is currently unable to hold entities for more than one transcription. This can cause many useless API calls if you switch between the same pages multiple times, causes entities to not be displayed properly if you ever have more than one transcription in your element, and can cause race conditions if the API gets a little slow where a transcription's entities are displayed on another transcription, which itself can cause various errors in the entity display code.

This merge request changes store.state.entity.inTranscription to hold lists per transcription IDs, and updates the existing components to handle it.

This removes 8 testAction calls from test/store/entity.js; I expect #282 (closed) to be doable in just one more merge request done in an hour or two at most as there are only 6 tests to rewrite.

Edited by Erwan Rouchet

Merge request reports

Loading