[customizable-menu] Let the draggable list decide where dragged menu sections are dropped
Categories
(Firefox for Android :: Menu, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: petru, Assigned: petru)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][android-core])
Attachments
(1 external file)
The customize menu screen measures where the "Hidden sections" title, the area to drag sections into to hide them, the reset button and the last hidden section are placed, to change where the draggable list would drop a dragged section. This is a second way of finding drop targets, next to the list's own, as pointed out by Julie here.
Add interceptInteractionMode to createListInteractionState in compose-draggable. It is called with what the list finds for a dragged item and returns the interaction to use instead, which the list shows and acts upon when the item is let go of.
Use it in the customize menu screen for its rules: sections are hidden only when dragged over the hidden sections, mandatory sections cannot be hidden, and a section let go of below the hidden sections is put back. Show the area to drag sections into as its own list item, so that where the hidden sections are is read from the layout of the list instead of being measured.
No change for the user is expected.
Updated•14 days ago
|
| Assignee | ||
Comment 1•14 days ago
|
||
The customize menu screen measured where the hidden sections title, the
area to drag sections into, the reset button and the last hidden section
were placed, to change where the list would drop a dragged section. That
was a second way of finding drop targets, next to the list's own.
Add interceptInteractionMode to createListInteractionState. It is called
with what the list finds for a dragged item whenever the item is dragged,
and returns the interaction to use instead, which the list shows and acts
upon when the item is let go of.
The screen uses it for its rules: sections are hidden only when dragged
over the hidden sections, mandatory sections cannot be hidden, and a
section let go of below the hidden sections is put back. The area to drag
sections into is its own list item, so where the hidden sections are is
read from the layout of the list instead of being measured. The list now
tells the screen where the section is moved to when it is let go of.
As for the list's own targets, the drop target is found again only when
the dragged section moves, and from where the items are laid out rather
than from where they are drawn while animated.
Comment 3•12 days ago
|
||
| bugherder | ||
Description
•