ドラッグで複数のオブジェクトを運べるようにする
Maintainers usually reply within 12 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with bublys-libs/bubbles-ui/src/lib/utils/drag-types.ts and useUniverseDropZone.ts, then trace the single-object drag start and drop paths described in the issue. Check BatchConvertFeature.tsx, BubblesUI.tsx, and MappingEditorFeature.tsx for the blocked consumers. Done means agreeing on mixed-type, count, receiver, and compatibility behavior, then supporting multi-object drag and drop in those paths.
Written by the indexing model from the issue text.
Description
ドラッグが1オブジェクトしか運べない。選択まわりの工事の前提であり、それとは無関係に今も詰まっている場所がある。
現状
// bublys-libs/bubbles-ui/src/lib/utils/drag-types.ts
DragPayload = { type, url, label?, objectId?, sourceBubbleId? }
配列も、複数 objectId も、個数のフィールドも無い。parseDragPayload も最初にヒットした型ひとつを返して終わり。
さらに dragover の最中は dataTransfer の中身が読めない(HTML5 DnD の protected mode。型名しか見えないので hasDragPayload が別に用意してある)。つまり受け入れ側はドロップされるまで「何個来るか」を知る手段がない。ドロップ前に「3件受け入れます」と見せることが今の設計ではできない。
いま詰まっている場所
object-transformer の一括変換 — 複数オブジェクトを受け取る関数が空配列を返すプレースホルダのまま。
// object-transformer-bubly/object-transformer-libs/src/feature/BatchConvertFeature.tsx:20-23
// TODO: usePlaneObjects() — 複数オブジェクトの入力経路が未実装
ポケットの出口 — 溜め場は既にあって永続もするのに、出口は「1件ずつバブルとして開く」だけ(BubblesUI.tsx:240-242)。まとめて渡す先が無い。clearPocket は定義されているがどこからも呼ばれていない。
なぜ選択より先か
selection-and-scope.md で決めた格上げの仕掛けは
選択されているものを掴んだら、選択ぜんぶが荷物になる
なので、この器の上に乗ります。器が単数のままだと、設計スケッチの「2人まとめて人数充足ビューへ運ぶ」は動きません。
決めないといけないこと
1. 型が混ざったとき何を名乗るか
type/staff が2つなら type/staff でいい。Staff と Task が混ざったら? 受け入れ側は型で絞っているので、名乗り方を決めないと「一部だけ受け取れる」状況が扱えない。
2. 個数を dragover で見せるか
見せたいなら、型キーとは別に type/staff に加えて件数を含む型名(count/3 のようなキー)を setData しておく、といった逃げ道が要る。値は読めなくてもキーの存在は読めるので。
3. 受け入れ側が複数を扱えないときの振る舞い
1つだけ受ける / 全部拒否 / 順に処理。宇宙のドロップ(useUniverseDropZone)とポケットの両方が単数前提なので、両方を広げる必要がある。
4. 後方互換
単数の DragPayload を読んでいる箇所が既にある。1件でも配列で運ぶのか、単数のキーも併記するのか。
付随して直したいもの
- ポケットからドラッグで出すと
objectIdが落ちる。ObjectViewのhandleDragStartは{type, url, label, sourceBubbleId}しか載せずobjectIdを載せない。明示的に載せているのはリポジトリ全体でgakkai-shift-libs/src/ui/ShiftPlanTableView.tsx:156の1箇所だけ apps/bublys-os/app/bubble-ui/Pocket/domain/PocketItem.tsはどこからも import されていない死んだクラス(objectIdの無い旧型)- object-transformer のドロップは
parseDragPayloadを通さずapplication/jsonを直読みしていて、OS のドラッグ規約の外にある(MappingEditorFeature.tsx:54)。console.log("[OT] ...")も残ったまま
参考
bublys-libs/bubbles-ui/src/lib/utils/drag-types.tsbublys-libs/bubbles-ui/src/lib/hooks/useUniverseDropZone.ts- selection-and-scope.md
- universe-drop-zone.md
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 9d 13h
- Merged PRs (30d)
- 10
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fumicode/bublys-org
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
fumicode/bublys-org#261 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 5/5 Over a week Newbie friendliness 15/100
fumicode/bublys-org#259 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 3/5 1-2 days Newbie friendliness 42/100
fumicode/bublys-org#258 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 4/5 3-5 days Newbie friendliness 25/100
fumicode/bublys-org#257 ·
Maintainers usually reply within 12 days
-
enhancement Shiftonton
Difficulty 4/5 3-5 days Newbie friendliness 55/100
fumicode/bublys-org#256 ·
Maintainers usually reply within 12 days
All issues in fumicode/bublys-org
Similar issues
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
drydocs/meridian#1503 · 1 comment ·
Maintainers usually reply within 2 days
-
refactor review: high
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
1lck/Lithe-IDEA#2376 ·
Maintainers usually reply within 1 day
-
bug extension mcp
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
primer/primitives#1426 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
danielmiessler/LifeOS#2941 ·
Maintainers usually reply within 4 days