-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(editor): kanban mobile drag and drop. #9411
base: canary
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## canary #9411 +/- ##
==========================================
- Coverage 51.54% 51.46% -0.08%
==========================================
Files 2146 2147 +1
Lines 97097 97216 +119
Branches 16266 16283 +17
==========================================
- Hits 50046 50037 -9
- Misses 45668 45795 +127
- Partials 1383 1384 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thank you for your pull request! To enhance the development experience and code maintainability, we should consider generalizing the current drag-and-drop functionality to support long-press dragging on mobile devices. At present, the key difference between mobile and PC drag-and-drop is the initiation: long-press on mobile versus click on PC. We can make the code adaptable for both platforms. Previously, the mobile version was set to readonly due to some database issues. Now that these issues have been resolved, we can safely remove this restriction. Moreover, to ensure consistency and maintainability, please avoid adding new test code to Thank you for your efforts and understanding! |
I haven't explicitly implemented the long press thing. I just make all touch events on cards route through the same logic as the desktop version. We are just using pointer events, rather than the web platform's native drag and drop. If we want to emulate the web platform's native long-press drag and drop behaviour, we would need to add extra logic for that. I have chosen not to do this because:
I'm not using the web drag and drop functionality because of 3 and because it's not implemented on mobile Firefox (Which is the browser I use)
That's fantastic news. I will clean that up.
Okay. I'll have another go at that. I noticed in passing that the affine playwright tests take a lot longer per test than the blocksuite ones (I may have picked an unlucky set of tests though, or imagined it). Should I try to write these as vitest tests instead, or is that going to be too much pain? [Sorry for the edit. I pressed the send button by accident] |
… don't do anything with it
If you switch to desktop mode, add a kanban board, then switch to touch emulation mode, the pc kanban board now correctly responds to touch-based drag events. Now I just need to wire up the mobile component so that it looks like the pc one.
this was just from looking at 'code --diff */kanban-view.ts'. It might be pointless cargo-culting
979df78
to
89048db
Compare
this is based on toeverything/blocksuite#9048
This PR includes:
This is based on top of toeverything/blocksuite#9044 so it included a basic playwright test. I'm happy to merge this as two separate PRs or close the other one if you prefer.