Skip to content

feat:Add Edit & Delete Functionality for Subjects #1000

@aishwary-vansh

Description

@aishwary-vansh

Problem

Users can create subjects (e.g., Biology, Math) but cannot edit or delete them afterward. This can lead to misspelled, duplicate, or unused subjects remaining permanently in the sidebar.

Proposed Improvement

Backend (server.js)

  • Add PUT /api/subjects/:id to update a subject's name and color.
  • Add DELETE /api/subjects/:id to remove a subject from the database.

Frontend (js/store.js & js/app.js)

  • Add updateSubject(id, data) and deleteSubject(id) methods.
  • Add Edit and Delete actions next to each subject in the sidebar.
  • Refresh the UI automatically after successful updates.

Why This Is Needed

Users should have full control over their subjects. Without edit and delete functionality, the sidebar can become cluttered with outdated or incorrect entries.

Expected Result

  • Users can edit subject names and colors.
  • Users can delete subjects they no longer need.
  • The sidebar updates instantly without requiring a page refresh.

Alternative Considered

Archiving subjects instead of deleting them was considered, but deletion provides a simpler and more intuitive user experience. Tasks associated with a deleted subject can fall back to a default "General" category.

Additional Context

I would like to work on this issue and implement both the backend API endpoints and the corresponding frontend UI functionality.I would like to contribute to this project through GSSoc 2026

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions