owntone-server/web-src/MIGRATION_VUE3.md
chme 27e2274d8a [web] Refactor lists to improve performance
Reduces the number of Vue components that need to be created/managed.
Instead of a Vue component for each item, we now only have one Vue
component for the whole list of items.
2022-03-19 07:04:37 +01:00

3.3 KiB

Vue 3 + Vite Migration

  • vite does not support env vars in vite.config.js from .env files

  • Documentation update

  • Add linting (ESLint)

  • Update dialog is missing scan options

  • Performance with huge artists/albums/tracks list (no functional template supported any more)

    • Do not reload data, if using the index-nav
      • PageAlbums
      • PageArtists
      • PageGenres
      • ...
    • Albums page is slow to load (because of the number of vue components - ListItem+CoverArtwork)
      • Evaluate removing ListItem and CoverArtwork component
  • JS error on Podacst page

    • Problem caused by the Slider component
    • Replace with plain html
  • vue-router scroll-behavior

    • Index list not always hidden
    • Check transitions
    • Page display is "jumpy" - "fixed" by removing the page transition effect
  • Index navigation "scroll up/down" button does not scroll down, if index is visible

    • Use native intersection observer solves it in desktop mode
    • Mobile view still broken
  • Update to latest dependency versions (vite, vue, etc.)

  • Index navigation is broken (jump to "A")

    • Change in $router.push syntax, hash has to be passed as a separate parameter instead of as part of the path
  • vue-range-slider is not compatible with vue3

  • vue-router does not support navigation guards in mixins: https://github.com/vuejs/vue-router-next/issues/454

  • vue-router link does not support tag and active-class properties: https://next.router.vuejs.org/guide/migration/index.html#removal-of-event-and-tag-props-in-router-link

  • vue-tiny-lazyload-img does not support Vue 3

  • Top margin in pages is wrong (related to vue-router scroll behavior changes)

    • Solved by adding the correct margin to take the top navbar (and where shown the tabs) into account
  • Mobile view seems to be broken

    • Looks like the cause of this was the broken router-link in bulma tabs component
  • Changing sort option (artist albums view) does not work

  • Replace unmaintained vue-infinite-loading dependency

  • Replace bulma-switch with @vueform/toggle?

    • Update of bulma-switch (or vite) fixed the import of the sass file, no need to replace it now