Skip to content

enhance(frontend): MkDraggable をタッチ操作 (ドラッグ) に対応 (PointerEvents版)#17535

Open
fruitriin wants to merge 3 commits into
misskey-dev:developfrom
fruitriin:mkdraggable-pointerevents
Open

enhance(frontend): MkDraggable をタッチ操作 (ドラッグ) に対応 (PointerEvents版)#17535
fruitriin wants to merge 3 commits into
misskey-dev:developfrom
fruitriin:mkdraggable-pointerevents

Conversation

@fruitriin
Copy link
Copy Markdown
Contributor

What

スマートフォン等のタッチデバイスで MkDraggable による並び替えができるようにする。
PointerEventsに統一する

また、MkPagesで挙動不審になるので、この画面のコンテキストメニューのあしらいを変更する

Why

Fix #17515
Fix #17487

Additional info (optional)

  • リグレッションテストは網羅しきれてない

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 1.48515% with 199 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.04%. Comparing base (e50603e) to head (6c6834a).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/components/MkDraggable.vue 1.48% 146 Missing and 53 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #17535      +/-   ##
===========================================
- Coverage    24.93%   15.04%   -9.90%     
===========================================
  Files         1158      247     -911     
  Lines        39539    12512   -27027     
  Branches     11011     4244    -6767     
===========================================
- Hits          9858     1882    -7976     
+ Misses       23780     8308   -15472     
+ Partials      5901     2322    -3579     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

fruitriin and others added 2 commits June 3, 2026 15:34
ドロップハンドラが group 不一致で no-op になった際にも source 側で
削除が走っていたため、別 group の MkDraggable に誤ってドロップすると
item が消失していた。handler の戻り値を boolean 化し、target 側で
処理が成立した場合のみ source から削除するよう修正。

合わせて onPointerDown 内の重複コメントを 1 行に短縮し、
page-editor.el.note.vue 内の不要な空行 (削除済み eslint-disable の跡)
を整理した。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MkDraggable の Pointer Events 化に合わせて、ドラッグハンドルを持つ呼び出し
側 (RolesEditorFormula / server-rules / channel-editor / navbar / profile /
page-editor 各種) を dragStart/dragStartCallback から pointerStart/
pointerStartCallback に切り替え、ハンドル要素に touch-action: none を付与。
不要となった drag-and-drop.ts の MkDraggable DragDataMap エントリも削除。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fruitriin fruitriin force-pushed the mkdraggable-pointerevents branch from 46bb45c to 7413bc9 Compare June 3, 2026 06:36
@fruitriin fruitriin marked this pull request as ready for review June 3, 2026 06:48
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/frontend Client side specific issue/PR size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

1 participant