enhance(frontend): MkDraggable をタッチ操作 (長押し → ドラッグ) に対応(タッチイベント追加版)#17534
Open
fruitriin wants to merge 2 commits into
Open
enhance(frontend): MkDraggable をタッチ操作 (長押し → ドラッグ) に対応(タッチイベント追加版)#17534fruitriin wants to merge 2 commits into
fruitriin wants to merge 2 commits into
Conversation
スマートフォン等のタッチデバイスで MkDraggable による並び替えができる
ようにする。ghost element を追従させながら elementFromPoint でドロップ先
を判定する。
ドラッグ開始モードを 3 種類から選べる:
- manualDragStart: ハンドル要素を触った瞬間に即ドラッグ開始 (待ち時間 0ms)
→ profile / server-rules / RolesEditorFormula / channel-editor /
settings/navbar / page-editor のセクション
- longPress=true: 行全体を 400ms 長押しでドラッグ開始 (待ち時間中に動かす
と通常スクロールに譲る) → MkWidgets (行が大きいケース)
- longPress=false (default): 行全体を一定量 (8px) 動かしたらドラッグ開始。
tap (動かさず touchend) はそのまま click として通過するので、行内に tap
メニュー等を持つアイテムでも両立する → MkPostFormAttaches / emoji-palette
iOS の long-press callout / 標準コンテキストメニューは touch session 中
だけ抑止し、PC の右クリックには干渉しない。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #17534 +/- ##
===========================================
- Coverage 24.93% 15.00% -9.93%
===========================================
Files 1158 247 -911
Lines 39539 12545 -26994
Branches 11011 4242 -6769
===========================================
- Hits 9858 1883 -7975
+ Misses 23780 8339 -15441
+ Partials 5901 2323 -3578 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
別案として、 PointerEvents で実装しなおすとマウスイベント, タッチイベント, ペンイベントを別々に実装しなくていいらしい |
Contributor
多分そっちに寄せる方向だったと思うのでそれでも良さそう |
Contributor
Author
めちゃくちゃ差分大きくなるけどそれでもよければPointerEvents版PRも出します |
Contributor
|
すでに差分デカいのであれ |
Contributor
Author
|
PointerEvents統一版、調整中...(MkPagesでのみ挙動不審) |
Contributor
Author
|
@kakkokari-gtyih なんかもうめっちゃ変えた版できました #17535 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
スマートフォン等のタッチデバイスで MkDraggable による並び替えができるようにする。
ghost element を追従させながら elementFromPoint でドロップ先を判定する。
Why
スマホでドラッグアンドドロップできない
Fix #17515
Fix #17487
Additional info (optional)
Checklist