Skip to content
Snippets Groups Projects
  • Konrad Mohrfeldt's avatar
    7adb359c
    refactor: unify state update routines and remove selectedShow-dependent code · 7adb359c
    Konrad Mohrfeldt authored
    This refactors the existing state helpers (useCopy and
    useUpdatableState) and unifies them to useUpdateBehaviour, useCopy,
    useAPIObjectFieldCopy, useRelation and useRelationList. This eliminates
    a lot of custom code in the show settings page and unifies the behaviour
    of all input fields and save operations making the experience more
    consistent and understandable.
    
    It also enables us to show the save-in-progress state and errors that
    occurred during updates for all fields along with customizable debounce
    and proper v-model support.
    
    We also got rid of the remaining uses of useSelectedShow. The show
    settings page still made use of it despite using a route that
    provides the relevant show that should be edited.
    7adb359c
    History
    refactor: unify state update routines and remove selectedShow-dependent code
    Konrad Mohrfeldt authored
    This refactors the existing state helpers (useCopy and
    useUpdatableState) and unifies them to useUpdateBehaviour, useCopy,
    useAPIObjectFieldCopy, useRelation and useRelationList. This eliminates
    a lot of custom code in the show settings page and unifies the behaviour
    of all input fields and save operations making the experience more
    consistent and understandable.
    
    It also enables us to show the save-in-progress state and errors that
    occurred during updates for all fields along with customizable debounce
    and proper v-model support.
    
    We also got rid of the remaining uses of useSelectedShow. The show
    settings page still made use of it despite using a route that
    provides the relevant show that should be edited.