Add drag-and-drop reordering for note tabs, and a user-facing guide
Tabs can now be dragged to reorder within a group and to move between sections in one gesture: dropping on a tab's left/right half inserts before/after it and adopts that tab's section, while a dedicated zone past the last group ungroups and appends at the end. A blue indicator line shows the drop position while dragging. core/notes.reorder() takes the full new page-id order computed client-side (NotePanel.vue has the reactive list already) rather than recomputing positions server-side, validates it against the current page-id set, sets the moved page's section, then renumbers position. POST /api/notes/reorder exposes it. Also adds docs/notes-guide.md, an end-user walkthrough of the shared notes panel (pages, sections, drag-and-drop, AI interaction) — the existing docs were all developer-facing specs with no operating instructions for the feature itself. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+20
@@ -158,6 +158,26 @@ SSE でストリーミング応答を返す。
|
||||
|
||||
---
|
||||
|
||||
### POST /api/notes/reorder
|
||||
タブのドラッグ&ドロップによる並べ替えを反映する。`order` には**全ページID**をドラッグ後の
|
||||
新しい順序で渡す(サーバー側では計算しない。フロントが `store.pages` から算出する)。
|
||||
`page_id` のページには先に `section` を設定してから、`order` の順に `position` を振り直す。
|
||||
別セクションのタブの前後にドロップした場合は、そのセクションへの移動も兼ねる。
|
||||
|
||||
`order` が現在の全ページIDの集合と一致しない場合は `400` を返す。
|
||||
|
||||
**リクエスト**
|
||||
```json
|
||||
{ "page_id": 3, "section": "生活", "order": [1, 3, 2, 4] }
|
||||
```
|
||||
|
||||
**レスポンス**
|
||||
```json
|
||||
{ "reordered": 4 }
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### DELETE /api/notes/{page_id}
|
||||
ページを削除。`204 No Content` を返す。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user