Files
Xu_BrowserBookmark/openspec/changes/add-dnd-sorting/proposal.md
Xujiacheng 1a3bbac9ff 提交0.1.0版本
- 完成了书签的基本功能和插件
2026-01-21 23:09:33 +08:00

914 B

Change: Add persistent drag-and-drop sorting (folders + bookmarks)

Why

Users need to reorder folders and bookmarks via drag-and-drop (including mobile/touch) and have that order persist across reloads. Current HTML5 drag/drop is unreliable on mobile and ordering is not stored for bookmarks.

What Changes

  • Add persistent ordering for bookmarks (new DB column and API endpoint to reorder within a folder).
  • Use a touch-friendly drag-and-drop implementation in the web UI for:
    • Reordering folders within the same parent.
    • Reordering bookmarks within the same folder.
  • Keep the root group (no folder) as a first-class group in the UI.

Impact

  • Affected specs: API (OpenAPI-backed)
  • Affected code:
    • Server: migrations, bookmarks routes, admin routes, row DTO mapping
    • Web: MyPage and AdminPage UI ordering and drag/drop
    • OpenAPI: Bookmark schema and reorder endpoint