codefordenver / codefordenver/ideaLab

(V2 post-mvp) Drag and Drop: Add 'position' column

Open
#264 1 comment 0 reactions 0 assignees View on GitHub
Backend
Dominant language
Java
Stars
13
Forks
15
PR merge metrics
No merged PRs in 30d

Description

4 parts, this issue will need to be split later:
1. Add an INT column to PrintJobs table: 'position'. Only printjobs with a queueing status can be rearranged, otherwise 'position' will be null & drag/drop not enabled on frontend. INTs will be 10 #s off from the last created (see #4).
2. GET request, /api/print-jobs/{printId}/position - When a queued item is moved up or down, it will get the position number of its new ceiling and floor neighbors, and its new position will split the difference between those INTs.
3. Update the PUT /api/print-jobs/{printId} request to include 'position' as another valid attribute change.
4. When a new card is created, its position should be +10 of the highest current position.

UNSURE:
- What happens 6 months down the road, should we reset positions to restart at 0 at a certain point?
- Would changing from INT to DECIMAL be overkill, or necessary?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.