[de-xbl] Remove attachment-list-base and its consumers' binding.
Categories
(Thunderbird :: Mail Window Front End, task)
Tracking
(Not tracked)
People
(Reporter: arshad, Assigned: arshad)
References
Details
Attachments
(1 file, 18 obsolete files)
41.25 KB,
patch
|
arshad
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Magnus, I went with the approach of using is
attr that we discussed in last meeting. I am getting a NotSupportedError: Operation is not supported
from the line customElements.define("attachmentlist", MozAttachmentlist, { extends: "richlistbox" });
. This is strange and I am not sure why it is happening. I am attaching the patch which combines the attachmentlist-vertical && attachmentlist-horizontal into single ce and depends upon orient attr to determine the case.
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Can you try putting a dash in the name? I know we loosened the restriction
for dashes for xul elements in general, but maybe that's not extending to
customized built-ins?
Yes, it was the dash.
Assignee | ||
Comment 8•6 years ago
|
||
The only issue with this patch is the removal of selected attribute(https://searchfox.org/comm-central/source/mozilla/toolkit/content/widgets/richlistbox.xml#83) by this line(https://searchfox.org/comm-central/source/mozilla/toolkit/content/widgets/richlistbox.js#485). click(https://searchfox.org/comm-central/source/mozilla/toolkit/content/widgets/richlistbox.js#878) handler is called after mousedown event. Ideally it should not remove the current selected item but something is going wrong here. Other than that, the patch seems to be working fine for vertical and horizontal attachmentList.
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Sorry, I know too less about the CE. What I can say is, that the richlistitems don't stay selected="true" and that now in the message pane's attachmentlist the attachmentlist-wrapper is now a for the DOM visible children of the richlistbox. This makes selectors like richlistbox > richlistitem no more working, they'd need now to be richlistbox > attachmentlist-wrapper > richlistitem. But this can not be the solution because we'd need to double all rules of richlistbox.css and other files for this list.
Assignee | ||
Comment 14•6 years ago
|
||
Paenglab, mkmelin, some of the keyboard shortcuts are broken on the trunk as well.
Comment 15•6 years ago
|
||
Assignee | ||
Comment 16•6 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #15)
Comment on attachment 9044982 [details] [diff] [review]
attachmentlist-elems.patchWhen you click on a attachmentitem and then use the cursor keys, the
attachmentitems keep the selected state.ui-r- because the attachmentitems in the message pane's don't have a focus
selected state. This is because the toolkit richlist.css still has the
sibling selector ( > ): richlistbox:focus > richlistitem...Isn't it possible to make the richlistbox orient=horizontal without the
attachmentlist-wrapper? Then we don't need this box.
hmm why was scrollbox their in the first place?
Comment 17•6 years ago
|
||
Comment 18•6 years ago
|
||
Oh, and hg cp the binding to preserve some blame
Comment 19•6 years ago
|
||
I notice I was wrong about getModifierState, must have thought about something else.
Comment 20•6 years ago
|
||
for the "any", at least as used in this code the intention probably never was that this would require no other keys pressed, so I think we can just simplify and handle the key straight off
Assignee | ||
Comment 21•6 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #20)
for the "any", at least as used in this code the intention probably never was that this would require no other keys pressed, so I think we can just simplify and handle the key straight off
Did you mean that I should not test the noModifierKeyPressed state?
Comment 22•6 years ago
|
||
Yes
Assignee | ||
Comment 23•6 years ago
|
||
Assignee | ||
Comment 24•6 years ago
|
||
Hopefully this will add hightlight background for linux.
Assignee | ||
Comment 25•6 years ago
|
||
Magnus, does this look ok?
Comment 26•6 years ago
|
||
Assignee | ||
Comment 27•6 years ago
|
||
Magnus, we can work on the selected attr issue later because that's something where we need fx guys help. Once this lands I ll open a new bug for the selected attr issue.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 28•6 years ago
|
||
Comment 29•6 years ago
|
||
Assignee | ||
Comment 30•6 years ago
|
||
Assignee | ||
Comment 31•6 years ago
|
||
Assignee | ||
Comment 32•6 years ago
|
||
Comment 33•6 years ago
|
||
Assignee | ||
Comment 34•6 years ago
|
||
The selection is also a mess. Once I click one of the attachments, the selection doesn't stick.
This is the issue that I want to tackle in next bug.
Assignee | ||
Comment 35•6 years ago
|
||
Write a new message, add two attachments, hit DOWN. I get JavaScript error: chrome://messenger/content/mailWidgets.js, line 864: TypeError: box is null
(which is in the added code).
If you se the console without this patch, you will find the same error their with xbl implementation. The reason is vertical orient attachmentList dont have scrollbox.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 36•6 years ago
|
||
Assignee | ||
Comment 37•6 years ago
|
||
Assignee | ||
Comment 38•6 years ago
|
||
fixed the box is null
error.
Assignee | ||
Updated•6 years ago
|
Comment 39•6 years ago
|
||
Assignee | ||
Comment 40•6 years ago
|
||
Comment 41•6 years ago
|
||
Assignee | ||
Comment 42•6 years ago
|
||
Assignee | ||
Comment 43•6 years ago
|
||
Comment 44•6 years ago
|
||
You need to wait for bug 1533085 because 14 attachment-related (sub)tests are currently switched off. The problem should be fixed with an upcoming M-C merge.
Comment 45•6 years ago
|
||
All relevant tests are back, so please do another try run.
Assignee | ||
Comment 46•6 years ago
|
||
Comment 47•6 years ago
|
||
the mozmill attachment/test-attachment.js failures look very much related to this bug
Comment 48•6 years ago
|
||
Wow, yes, they don't fail on trunk.
Comment 49•6 years ago
|
||
Please also adjust for bug 1535725 (don't use boxObject)
Updated•6 years ago
|
Assignee | ||
Comment 50•6 years ago
|
||
Assignee | ||
Comment 51•6 years ago
|
||
Assignee | ||
Comment 52•6 years ago
|
||
Comment 53•6 years ago
|
||
Updated•6 years ago
|
Comment 54•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/4192b7f68d58
Migrate attachmentlist-* bindings to custom element. r=mkmelin
Updated•6 years ago
|
Comment 55•6 years ago
|
||
Backout:
https://hg.mozilla.org/comm-central/rev/0880f94b2f3155c2500c1eabaca0e246a4ddd66a
Backed out changeset 4192b7f68d58 (bug 1523607) for test failures. a=backout DONTBUILD
This breaks mozmill/composition/test-attachment.js | test-attachment.js::test_attachment_reordering. This test doesn't run on Linux, therefore you didn't see the failure in the try run. Always run at least Linux and Mac on try, at least during the final stages.
Comment 56•6 years ago
|
||
this patch, as is, will regress this change:
https://hg.mozilla.org/comm-central/diff/d167921e42eba41654952c307cec2f0fcaa022d2/mail/base/content/mailWidgets.xml
Assignee | ||
Comment 57•6 years ago
|
||
Assignee | ||
Comment 58•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 59•6 years ago
|
||
Maybe we give this another quick review:
https://bugzilla.mozilla.org/attachment.cgi?oldid=9061223&action=interdiff&newid=9065978&headers=1
Looks OK to me, mostly removal on .scrollbox
and .attachmentListWrapper
. Interdiff confused on messengercompose.xul.
Assignee | ||
Comment 60•6 years ago
|
||
https://bugzilla.mozilla.org/attachment.cgi?oldid=9061223&action=interdiff&newid=9065978&headers=1 Magnus, could you please give it a quick look?
Comment 61•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/38204c5426e0
Migrate attachmentlist-* bindings to custom element. r=mkmelin
Comment 62•6 years ago
|
||
Assignee | ||
Comment 63•6 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #62)
Comment on attachment 9065978 [details] [diff] [review]
attachmentlist-elems.patchReview of attachment 9065978 [details] [diff] [review]:
Looks pretty good, tough I find dragging around attachments in compose
result inJavaScript error:
chrome://messenger/content/messengercompose/MsgComposeCommands.js, line
5909: TypeError: target.matches is not a function
this is not related to this patch. it was already there and it has to do with some richlistbox stuff.
::: mail/base/content/mailWidgets.js
@@ +1134,5 @@
- constructor() {
- super();
- this.messenger = Cc["@mozilla.org/messenger;1"].createInstance(Ci.nsIMessenger);
- this._setupEventListeners();
_setupEventListeners() is only called once, so I'd inline it
all right, I ll do that in Bug 1547699.
::: mail/base/content/msgHdrView.js
@@ +2560,5 @@if (updateFocus) attachmentList.focus();
- attachmentList.selectItem(attachmentList.firstChild);
not sure the first item is supposed to get selected. did the old code do
this?
I guess I added it because when you open the attachmentlist with horzontal orient then the first attachmentlist need to be selected. I ll check it again in Bug 1547699.
Comment 64•6 years ago
|
||
(In reply to Arshad Khan [:arshad] from comment #63)
JavaScript error:
chrome://messenger/content/messengercompose/MsgComposeCommands.js, line
5909: TypeError: target.matches is not a function
this is not related to this patch. it was already there and it has to do with some richlistbox stuff.
Confirmed. We should fix it though. Also, you can't drag an attachment to the end to be the last item in the list.
Updated•6 years ago
|
Comment 65•6 years ago
|
||
You forgot to remove https://searchfox.org/comm-central/source/common/bindings/richlistbox.xml, right?
Assignee | ||
Comment 66•6 years ago
|
||
yes i ll remove it in Bug 1547699.
Description
•