Skip to content

Drag a note from the list onto a sidebar category to assign it #7

Closed

Description

@gnacho

Summary

The only way to change a note's category today is the <select> in the editor header. This issue proposes drag and drop: grab a note in the list column and drop it on a category in the sidebar to assign it.

Current behavior

The web extension has three columns: sidebar (categories with counts, "All notes", "Uncategorized"), note list grouped by favorites and date, and the editor. Category assignment happens only through the editor header select, which sends PUT /index.php/apps/notes/api/v1/notes/{id} with { category } and the If-Match etag. Moving several notes between categories means opening each note and using the select every time.

Proposed behavior

  • Notes in the list column are draggable.
  • Dropping a note on a category entry assigns that category, updates the category counts, and refreshes the note's etag from the response (same call the editor select already makes).
  • "Uncategorized" is also a drop target and clears the category.
  • "All notes" is not a drop target.
  • Dropping a note on the category it already has does nothing.
  • While the list is filtered by a category, a note dropped on another category disappears from the current view.

Implementation notes

  • The list column resize already uses pointer capture, so pointer events are the established pattern here; HTML5 drag and drop is unreliable on touch devices.
  • Keep the editor select as the keyboard-accessible path for the same action.
  • If the server rejects the update because the etag is stale, surface the existing error state.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions