Skip to content

Draft: Migrate the elements and annotation stores

Erwan Rouchet requested to merge pinia-elements into master

Closes #1137, #1142

  • Both stores have been fully migrated but nothing has been tested.
  • useElementsStore is renamed to useElementStore to conform to Pinia's store naming style, which encourages singular nouns.
  • TypeScript has been upgraded, as the newer versions understood some new typing edge cases that I was hitting while migrating, and could detect more errors.
  • Some API helpers have been simplified.
  • I started migrating some views and components, but could not test anything.

Components

Element

  • Corpus/Datasets/Populate.vue: ...mapVuexState('elements', ['elements']),
  • Element/DetailsPanel.vue: ...mapVuexState('elements', ['elements']),
  • Element/ElementHeader.vue: ...mapVuexState('elements', {
  • Element/Metadata/Metadata.vue: ...mapVuexState('elements', ['elements']),
  • Element/OrientationPanel.vue: ...mapState('elements', ['elements']),
  • HeaderActions.vue: ...mapVuexState('elements', [
  • Navigation/ChildrenTree/TreeItem.vue: ...mapState('elements', ['childrenPagination', 'parents']),
  • Navigation/CorpusSelection.vue: ...mapVuexState('elements', { storeElements: 'elements' }),
  • Navigation/ElementNavigation.vue: ...mapVuexState('elements', { elementObjects: 'elements' }),
  • Navigation/ElementNavigation.vue: ...mapVuexState('elements', ['elementsUpdate']),
  • Navigation/PreviewDropdown.vue: ...mapState('elements', ['elements']),
  • Process/Workers/DeleteResultsModal.vue: ...mapVuexState('elements', ['elements']),
  • Element/EditionFrom.vue

Annotations

  • Image/ElementZone.vue: ...mapState('annotation', ['enabled', 'hoveredId', 'selectedElement', 'batchDeletion']),
  • Navigation/ChildrenTree/TreeItem.vue: ...mapState('annotation', {
  • Navigation/ChildrenTree/TreeItem.vue: ...mapState('annotation', ['visible', 'hoveredId', 'selectedElement']),

Views

  • Element.vue: ...mapVuexState('elements', ['elements', 'links', 'parents', 'neighbors']),
Edited by Theo Lesage

Merge request reports

Loading