[de-xbl] Migrate selection-bar to custom element.
Categories
(Calendar :: Lightning Only, enhancement)
Tracking
(Not tracked)
People
(Reporter: arshad, Assigned: arshad)
References
Details
Attachments
(1 file, 14 obsolete files)
37.99 KB,
patch
|
arshad
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Comment on attachment 9040732 [details] [diff] [review] selection-bar.patch Review of attachment 9040732 [details] [diff] [review]: ----------------------------------------------------------------- Hey, I am not sure why the time doens't change and the cyan colored box doesn't change position on mousemove.. could you please take a look/?
Assignee | ||
Comment 5•6 years ago
|
||
The reason why I didn't try extending richlistbox here, is that MozElements.RichListBox is not available in scope and there are other parts of code which are trying to call selection-bar methods so delaying the decalaration or selection-bar custom element untill the Richlistbox isn't loaded in scope, will throw error from those other parts.
Comment 6•6 years ago
|
||
You could probably make RichListBox available by creating one. Same thing as https://searchfox.org/comm-central/source/chat/content/conversation-browser.js#13
Dunno if it's wanted though.
Comment 7•6 years ago
|
||
Comment on attachment 9040732 [details] [diff] [review] selection-bar.patch Review of attachment 9040732 [details] [diff] [review]: ----------------------------------------------------------------- To preserve some blame: hg cp --after calendar/base/content/dialogs/calendar-event-dialog-attendees.xml calendar/base/content/dialogs/calendar-event-dialog-custom-elements.js ::: calendar/base/content/dialogs/calendar-event-dialog-custom-elements.js @@ +2,5 @@ > + * License, v. 2.0. If a copy of the MPL was not distributed with this > + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ > + > +ChromeUtils.import("resource://gre/modules/Preferences.jsm"); > + these now need to be var {Preferences} = ChromeUtils.import("resource://gre/modules/Preferences.jsm"); @@ +397,5 @@ > + return newTime; > + } > +} > + > +customElements.define("selection-bar", MozSelectionBar); calendar-event-timeselection-bar perhaps?
Assignee | ||
Comment 8•6 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #6)
You could probably make RichListBox available by creating one. Same thing as https://searchfox.org/comm-central/source/chat/content/conversation-browser.js#13
Dunno if it's wanted though.
Tried that. But overall result is not different. :(
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Comment on attachment 9040967 [details] [diff] [review] selection-bar.patch Review of attachment 9040967 [details] [diff] [review]: ----------------------------------------------------------------- Richard, could you please check why after the first time I am not able to move the selection-bar? I think it might be focus issue but I also feel very less possibility of that.
Comment 11•6 years ago
|
||
Comment on attachment 9040967 [details] [diff] [review] selection-bar.patch Sorry, I don't know why. For me it's never movable.
Comment 12•6 years ago
|
||
Comment on attachment 9040967 [details] [diff] [review] selection-bar.patch Review of attachment 9040967 [details] [diff] [review]: ----------------------------------------------------------------- I just get this: JavaScript error: chrome://calendar/content/calendar-event-dialog-attendees.js, line 1237: TypeError: selectionbar.boxObject is undefined ::: calendar/base/content/dialogs/calendar-event-dialog-attendees.js @@ +26,5 @@ > var gForce24Hours = false; > var gZoomFactor = 100; > > +/* > + * the 'selection-bar' custom element implements the vertical bar that provides The There are also other comments in the patch. If it's a full sentence, make sure it's Capitalized and ends with a period. @@ +157,5 @@ > + this.mZoomFactor = 100; > + > + /** > + * constant that defines at which ratio an event is clipped, when moved or resized > + */ Just // comments inside please ::: calendar/base/content/dialogs/calendar-event-dialog-attendees.xul @@ +141,5 @@ > + <scrollbox anonid="scrollbox" width="0" orient="horizontal" flex="1"> > + <box class="selection-bar" anonid="selection-bar"> > + <box class="selection-bar-left" anonid="leftbox"/> > + <spacer class="selection-bar-spacer" flex="1"/> > + <box class="selection-bar-right" anonid="rightbox"/> can we remove the anonid's?
Assignee | ||
Comment 13•6 years ago
|
||
Assignee | ||
Comment 14•6 years ago
|
||
Assignee | ||
Comment 15•6 years ago
|
||
Try failures don't look like related to this bug.
Assignee | ||
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
Comment on attachment 9058056 [details] [diff] [review] selection-bar.patch Review of attachment 9058056 [details] [diff] [review]: ----------------------------------------------------------------- Similar documentation issues as flagged in other previous reviews, please fix.
Assignee | ||
Comment 18•6 years ago
|
||
I have tried to remove all the issues mentioned in other patches, I think the comments in the patch are quite explanatory.
Assignee | ||
Comment 19•6 years ago
|
||
Comment 20•6 years ago
|
||
Comment on attachment 9058916 [details] [diff] [review] selection-bar.patch Review of attachment 9058916 [details] [diff] [review]: ----------------------------------------------------------------- I'm not going to look at these patches if you aren't fixing the issues we've talked about. There are still issues in this patch.
Assignee | ||
Comment 21•6 years ago
|
||
Assignee | ||
Comment 22•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 23•6 years ago
|
||
Assignee | ||
Comment 24•6 years ago
|
||
Comment on attachment 9059164 [details] [diff] [review] selection-bar.patch Review of attachment 9059164 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js @@ +2001,5 @@ > + * > + * @param {Number} val Decimal number between 0 and 1 > + * @returns {Number} Decimal number between 0 and 1 > + */ > + set ratio(val) { I tried checking the use this property but I dont see any differnece in ui or anything else. Please suggest something else if you dont like the comment. Sorry.
Comment 25•6 years ago
|
||
Comment on attachment 9059164 [details] [diff] [review] selection-bar.patch Review of attachment 9059164 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js @@ +1932,5 @@ > + window.setCursor("auto"); > + }); > + } > + > + connectedCallback() { this needs protection from running more than once. also add the delayConnectedCallback @@ +1996,5 @@ > + return val; > + } > + > + /** > + * Sets ratio and updates selection bar properties. Sets the ratio. The ratio is the factor which says by how big part of the total width is the scroll width is offset. @@ +1998,5 @@ > + > + /** > + * Sets ratio and updates selection bar properties. > + * > + * @param {Number} val Decimal number between 0 and 1 @param ..... The ratio: a number between 0 and 1. @@ +1999,5 @@ > + /** > + * Sets ratio and updates selection bar properties. > + * > + * @param {Number} val Decimal number between 0 and 1 > + * @returns {Number} Decimal number between 0 and 1 @returns .... The ratio. @@ +2025,5 @@ > + > + /** > + * Gets start date of the selection bar. > + * > + * @returns {calIDateTime} startDate value for these instead of @returns {calIDateTime} startDate value use something like @returns {calIDateTime} - the start date
Assignee | ||
Comment 26•6 years ago
|
||
Assignee | ||
Comment 27•6 years ago
|
||
Assignee | ||
Comment 28•6 years ago
|
||
Comment 29•6 years ago
|
||
Comment on attachment 9059636 [details] [diff] [review] selection-bar.patch Review of attachment 9059636 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js @@ +1975,5 @@ > + return val; > + } > + > + /** > + * Gets force24Hours property of selection bar. Getter description is not in line with setter.
Assignee | ||
Comment 30•6 years ago
|
||
If this patch is pushed first then scroll-container and freebusy-day patch needs rebase.
Assignee | ||
Comment 31•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 32•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/6212f5166af1
Migrate selection-bar binding to custom element. r=philipp
Updated•6 years ago
|
Description
•