[EPIC] Refactor stores and migrate to Pinia
Pinia is the recommended central state management solution for Vue3. Apart from that the current store implementations have a few problems, namely:
- some separation-of-concerns-violations, i.e.
alert
calls that interact with the user instead of setting error states - inability to react to error states (exceptions are swallowed and turned into
alert
s) - code duplication (i.e. setting authentication headers)
Basis for follow-up tasks
Once transitioned we might also
- get rid of the
axios
dependency which most certainly can be replaced with the browser-nativefetch
: Refactor: Remove Axios in favour of native fetch() (#279 - closed) - be able to reduce the overall code size through generic implementations for CRUD operations:
TODO: check where we can do generic implementations. Create tickets.
- improve DX by using TypeScript: Improve DX: Use TypeScript or JSDoc (#278 - closed)
Subtasks
-
migrate auth store -
migrate files store -
migrate playlists store -
migrate notes store -
migrate schedules store -
migration timeslots store -
migrate shows store -
migrate meta stores (including types, funding-categories, categories, topics, music-focus, languages, and hosts) - Refactor playlist store to load data on-demand ... (#135 - closed)
TODO: identify other open sub-tasks, if any.
Edited by David Trattnig