Closed
Bug 1382992
Opened 7 years ago
Closed 2 years ago
Figure out what do to with canDrop() with respect to sync vs async
Categories
(Firefox :: Bookmarks & History, enhancement, P3)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
110 Branch
Tracking | Status | |
---|---|---|
firefox110 | --- | fixed |
People
(Reporter: mak, Assigned: mak)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxsearch])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
canDrop is synchronous. It currently checks that we don't drop a container inside itself or a descendant container and to do that it has to walk the container hierarchy by doing main-thread I/O.
Collecting the information on drag start is also not possible, because dragstart is a synchronous operation where we must synchronously fill the dataTransfer (there's some ongoing work to make this async but no ETA).
Assignee | ||
Comment 1•7 years ago
|
||
we could keep an up-to-date bookmarks hierarchy in a memory cache. The main issue would be a synchronous request before the cache has been populated, for which we could retain a synchronous fallback, or throw and let the consumer take the more pessimistic fallback.
Updated•7 years ago
|
Updated•7 years ago
|
Summary: Figure out what do to with canDrop() → Figure out what do to with canDrop() with respect to sync vs async
Updated•2 years ago
|
Severity: normal → S3
Assignee | ||
Comment 2•2 years ago
|
||
Another alternative may be to use the view (trees and menus should allow to walk up/down the chain), then do a final async check onDrop, where we can use async APIs.
Assignee | ||
Comment 3•2 years ago
|
||
Unfortunately the dragover behavior is not trivial to test, thus this relies on
manual testing. The data safety is covered by the undelrying bookmarking API
anyway, so this is just about the UI visual drag indicator.
Updated•2 years ago
|
Assignee: nobody → mak
Status: NEW → ASSIGNED
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/487ae9d43aac
Remove the synchronous getFolderIdForItem() bookmarks API. r=Standard8
Comment 5•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox110:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•