Implement Drag&Drop functionality for the mail-address-pill Custom Element - Ability to reorder recipient addresses/pills in To, Cc and Bcc via mouse
Categories
(Thunderbird :: Message Compose Window, enhancement, P3)
Tracking
(thunderbird_esr78 fixed, thunderbird81 fixed)
People
(Reporter: aleca, Assigned: khushil324)
References
Details
Attachments
(1 file, 6 obsolete files)
(deleted),
patch
|
aleca
:
review+
wsmwk
:
approval-comm-beta+
wsmwk
:
approval-comm-esr78+
|
Details | Diff | Splinter Review |
- Allow drag&drop of single or multiple pills between recipient containers (To, Cc, etc.).
- Allow manual reordering of pills within the same recipient container.
Comment 1•5 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #0)
- Allow drag&drop of single or multiple pills between recipient containers (To, Cc, etc.).
- Allow manual reordering of pills within the same recipient container.
Reordering pills by drag and drop will require insertion points (for dropping), and there should be a keyboard equivalent for the sake of access. The UX concept of inter-pill insertion points both for drag n drop and keyboard usage is explored in bug 1603051, including interaction with navigation/selection patterns etc.
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 3•4 years ago
|
||
Khushil has worked on dnd, so assigning this to him.
Assignee | ||
Comment 4•4 years ago
|
||
Currently, "Allow manual reordering of pills within the same recipient container" part is not working exactly. They can just put the pill at the end dragging from the middle.
Assignee | ||
Comment 5•4 years ago
|
||
Just want feedback if we are moving in a right direction.
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
Reporter | ||
Comment 9•4 years ago
|
||
Assignee | ||
Comment 10•4 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #9)
- Dragging multiple pills creates the "ghost" dragged element always from
the first pill, even if I start the drag from another pill.
This is a bit weird since the drop indicator correctly follows the position
of the mouse cursor, but the ghost element is in another location.
All other issues got resolved including "the ghost element is in another location."
But I am facing issue in:
"Dragging multiple pills creates the "ghost" dragged element always from the first pill, even if I start the drag from another pill."
Now the "ghost" dragged element will be the pill which is being dragged but the problem is it will show only one pill even if we have selected multiple pills. You can add "ghost" image/element when "dragstart" is being called like event.dataTransfer.setDragImage(targetPill, xOffset, yOffset)
. We are able to add only one element which should be an element from the DOM. I tried to create a div element and insert all the selected pills deep clone but it was showing nothing as "ghost" image/element.
Assignee | ||
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
Comment on attachment 9171845 [details] [diff] [review]
Bug-1601749_DnD-mail-address-pill-2.patch
Looks good. When I drag a pill to the end of the last pill, I have no real feedback, no drop indicator is shown. It would be better to show one, if possible, to get a better feedback where the pill will land.
Comment 13•4 years ago
|
||
What I now noticed is, that dropping the address over the chevron doesn't work. It would be good when then the popup opens and the address can be placed directly on an entry in this popup to add this row like it happens with the To and Cc buttons.
Reporter | ||
Comment 14•4 years ago
|
||
Assignee | ||
Comment 15•4 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #14)
Is this condition ever true?
Since we're adding the "selected" attribute to the clicked pill, we will
always have at least 1 selected pill.
Did you encounter any case where a dragstart event started with 0 selected
items?
Yes, when the user tries to drag the input area. We have dragstart event listener on the whole MailRecipientsArea so this condition is necessary.
I have cleaned up the patch now. It's more readable and moduler now.
Assignee | ||
Comment 16•4 years ago
|
||
Assignee | ||
Comment 17•4 years ago
|
||
Reporter | ||
Comment 18•4 years ago
|
||
Comment 19•4 years ago
|
||
You may want to consider:
- when dragging selection on a non selected pill, the indicator for destination would appear befor the targeted pill and upon release would insert/move the selected pills before the targeted one. Some people may not easily point between two pills with a mouse, that might help them (loosy target)
- draging selection on any labels (To, Cc,etc) would show target indicator at the begining of the field (if displayed and if pills or no pills already present) to insert selected pills there upon release, in front of any other non selected pills (if any present in the field)
- if selected pill(s) are cut via keyboard and cursor moved via keyboard arrow, then the indicator for targeting paste shall appear in front of the non selected pills for possible paste via keyboard, the indicator to target paste moving as you press on left or right arrow to target a destination for paste... something to explore perhaps... when moving indicator with arrow if you reach and of field and continue to press right arrow target indicator would move to the next displayed field... when you reach the end of last disolayed field and continue to press it woul move at the begining of first dispayed field... and vice-versa...
Assignee | ||
Comment 20•4 years ago
|
||
Reporter | ||
Comment 21•4 years ago
|
||
(In reply to Richard Leger from comment #19)
when dragging selection on a non selected pill, the indicator for destination would appear befor the targeted pill and upon release would insert/move the selected pills before the targeted one. Some people may not easily point between two pills with a mouse, that might help them (loosy target)
Yup, this is already happening in the patch.
draging selection on any labels (To, Cc,etc) would show target indicator at the begining of the field (if displayed and if pills or no pills already present) to insert selected pills there upon release, in front of any other non selected pills (if any present in the field)
We will consider this, maybe in a follow up bug since the labels are also a drop recipient for new addresses coming from the contact sidebar,a nd those are added at the end of the field.
if selected pill(s) are cut via keyboard and cursor moved via keyboard arrow, then the indicator for targeting paste shall appear in front of the non selected pills for possible paste via keyboard, the indicator to target paste moving as you press on left or right arrow to target a destination for paste... something to explore perhaps... when moving indicator with arrow if you reach and of field and continue to press right arrow target indicator would move to the next displayed field... when you reach the end of last disolayed field and continue to press it woul move at the begining of first dispayed field... and vice-versa...
I'm not sure about this. Probably we can explore it in another bug if we will ever allow the typing cursor in between pills.
For now, we're focusing on mouse interaction with drag and drop.
Keyboard reordering will come later.
Comment 22•4 years ago
|
||
(In reply to Alessandro Castellani (:aleca) from comment #21)
I'm not sure about this. Probably we can explore it in another bug if we will ever allow the typing cursor in between pills.
For now, we're focusing on mouse interaction with drag and drop.
Keyboard reordering will come later.
That's Bug 1603051 (already linked up in "See also" here) - Recipient pills UX: Allow insertion and reordering of pills (via inter-pill insertion points)
...where I have explored keyboard reordering in detail, and how it would interact with our existing keyboard methods of handling pills.
Reporter | ||
Comment 23•4 years ago
|
||
Assignee | ||
Comment 24•4 years ago
|
||
Reporter | ||
Comment 25•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Comment 26•4 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/73e9d8f66346
Implement Drag&Drop functionality for the mail-address-pill Custom Element. r=aleca DONTBUILD
Updated•4 years ago
|
Assignee | ||
Comment 27•4 years ago
|
||
When should we add ESR uplift request for this?
Comment 28•4 years ago
|
||
You can ask beta+esr approval now. It should go through beta before esr.
Assignee | ||
Comment 29•4 years ago
|
||
Comment on attachment 9172585 [details] [diff] [review]
Bug-1601749_DnD-mail-address-pill-6.patch
[Approval Request Comment]
Regression caused by (bug #):
User impact if declined: Drag and Drop functionality for address pills is a frequently asked feature from the Thunderbird users.
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky): Low
Comment 30•4 years ago
|
||
Comment on attachment 9172585 [details] [diff] [review]
Bug-1601749_DnD-mail-address-pill-6.patch
[Triage Comment]
Approved for beta
Comment 31•4 years ago
|
||
bugherder uplift |
Thunderbird 81.0b3:
https://hg.mozilla.org/releases/comm-beta/rev/30f5bcd4698a
Comment 32•4 years ago
|
||
If this tests well, then perhaps we take this in 78.2.2
Comment 33•4 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #32)
If this tests well, then perhaps we take this in 78.2.2
Would fix at least bug 1663041 before shipping - losing pills after drop isn't nice, and having an error pill isn't very special
Comment 34•4 years ago
|
||
I've filed some nits and corners for polishing, but nevertheless:
(In reply to Alessandro Castellani (:aleca) from comment #25)
Outstanding work!
+1, indeed. Khushil, this is AWESOME, thank you! Users will love it.
Comment 35•4 years ago
|
||
Comment on attachment 9172585 [details] [diff] [review]
Bug-1601749_DnD-mail-address-pill-6.patch
[Triage Comment]
Approved for esr78.
Comment 36•4 years ago
|
||
bugherder uplift |
Thunderbird 78.2.2:
https://hg.mozilla.org/releases/comm-esr78/rev/9e3b83ab203f
Comment 37•4 years ago
|
||
(In reply to Richard Leger from Bug 1663041 comment 33)
Thank you for this new feature long awaited for and now landed.
Bravo to the devs and all teams that make this possible and happen.
Job done! Well done!
My comment above was meant to be published here!
Thank you for drag&drop feature!
Updated•4 years ago
|
Updated•4 years ago
|
Description
•