Skip to content

UI: Add drag-and-drop reordering for routine lists#1403

Open
knoxiboy wants to merge 4 commits into
aryandas2911:mainfrom
knoxiboy:feature/issue-1301-drag-drop
Open

UI: Add drag-and-drop reordering for routine lists#1403
knoxiboy wants to merge 4 commits into
aryandas2911:mainfrom
knoxiboy:feature/issue-1301-drag-drop

Conversation

@knoxiboy
Copy link
Copy Markdown
Contributor

@knoxiboy knoxiboy commented Jun 1, 2026

🐞 Description

Resolves #1301.
Introduces a centralized \RoutineList\ component to support drag-and-drop reordering of routines, improving the overall UX of the Dashboard and Routine Builder.

💻 Expected Behavior

  • Added @hello-pangea/dnd\ to handle smooth drag-and-drop interactions.
  • A new \orderIndex\ field and /reorder\ API endpoint let the backend persist the new order.
  • Added descriptive \�ria-label\ to drag handles for improved screen reader support.

🖼️ Screenshots / Logs (if applicable)

N/A

✅ Checklist

  • Added backend /reorder\ endpoint and \orderIndex\ support
  • Implemented drag-and-drop on the frontend
  • Improved accessibility with ARIA attributes on drag handles
  • Handled potential reorder API failures
  • Tested locally

Copilot AI review requested due to automatic review settings June 1, 2026 08:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Introduces reusable UI/components and backend support to centralize routine list rendering and enable drag-and-drop reordering of routines.

Changes:

  • Added RoutineList component and refactored Dashboard/RoutineBuilder to use it.
  • Added backend orderIndex support and a reorder API endpoint, and sorted routines by orderIndex.
  • Added @hello-pangea/dnd dependency for drag-and-drop.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
pr_body_daily.txt Adds PR summary for form error styling work (metadata/documentation).
pr_body_1300.txt Adds PR summary for dashboard loading spinner work (metadata/documentation).
pr_body.txt Adds PR summary for form error styling work (metadata/documentation).
frontend/src/pages/RoutineBuilder.jsx Switches routines rendering to RoutineList.
frontend/src/pages/Dashboard.jsx Switches saved routines rendering to RoutineList.
frontend/src/components/Routine/RoutineList.jsx New reusable routine list with drag-and-drop + reorder API call.
frontend/package.json Adds @hello-pangea/dnd dependency.
backend/src/models/Routine.js Adds orderIndex field to routines.
backend/routes/routineRoutes.js Adds /reorder endpoint.
backend/controllers/routineController.js Sorts by orderIndex and implements reorder controller.
Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/routes/routineRoutes.js Outdated
Comment thread backend/controllers/routineController.js Outdated
Comment thread frontend/src/components/Routine/RoutineList.jsx Outdated
Comment thread frontend/src/components/Routine/RoutineList.jsx Outdated
Comment thread frontend/src/components/Routine/RoutineList.jsx Outdated
Comment thread frontend/src/components/Routine/RoutineList.jsx Outdated
Comment thread pr_body.txt Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Implement drag-and-drop reordering for daily routines

2 participants