Skip to content

Refactor Drag and Drop logic #71

@mirmirmirr

Description

@mirmirmirr

Throughout the codebase, the drag and drop and course moving logic is scattered and duplicated. It would be nice to centralize this for future-proofing.

For example, the following things might be addressed:

  • There is a lot of prop drilling with the following elements from usePlannerCourse:
    • setPlannerCourses, setToolboxCourses, semesterIndex, courseIndex, course, id, name, count
    • this goes from the top-level Planner.tsx down to each individual PlannerCourse component
  • The useDragAndDrop.ts context includes a lot of repeating logic and continuously re-renders setPlannerCourse. It might be better to convert this into a reducer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions