Skip to content

Mariusz071/sortable-list

Repository files navigation

sortable-list

Tech stack

  • Vue 3
  • TypeScript
  • Vuetify
  • Pinia
  • Vitest

What I did extra

  • not allowing duplicate actions to appear
  • handling API call failure in the UI
  • mobile friendly UI

What could be done further

  • drag'n'drop implemented with Vue Draggable
  • I was actually thinking about adding some way of preserving actions, even after refreshing but - it actually made no sense. For example if I would preserve actions in local storage, then let's say some posts would be deleted from the server and after getting those preserved action the Time travel would cause problems as some posts from saved snapshot could not exist anymore but as I write it I'm thinking that I could filter out not existent post related actions before displaying those actions from local storage :)

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Running unit tests

npm run test:unit

Type-Check, Compile and Minify for Production

npm run build

About

Vue3 + TypeScript sortable list with actions snapshot history

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published