Closed
Bug 1511270
Opened 6 years ago
Closed 6 years ago
[de-xbl] Migrate freebusy-day binding to custom element.
Categories
(Calendar :: Lightning Only, enhancement)
Calendar
Lightning Only
Tracking
(Not tracked)
RESOLVED
FIXED
68
People
(Reporter: arshad, Assigned: arshad)
References
Details
Attachments
(1 file, 14 obsolete files)
21.17 KB,
patch
|
arshad
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Attachment #9028858 -
Flags: feedback?(mkmelin+mozilla)
Comment 2•6 years ago
|
||
Comment on attachment 9028858 [details] [diff] [review]
freebusy-day.patch
Review of attachment 9028858 [details] [diff] [review]:
-----------------------------------------------------------------
Could lose the mNotation for member variables while you're touching all of this
::: calendar/base/content/dialogs/calendar-event-dialog.css
@@ -36,5 @@
> -moz-user-focus: normal;
> }
>
> freebusy-day {
> - -moz-binding: url(chrome://calendar/content/calendar-event-dialog-freebusy.xml#freebusy-day);
you didn't include the freebusy-day removal in the patch, so it's not easy to compare
Attachment #9028858 -
Flags: feedback?(mkmelin+mozilla)
Comment 3•6 years ago
|
||
I get a bunch of
JavaScript error: chrome://calendar/content/calendar-event-dialog-freebusy.xml, line 1302: TypeError: this.getListItem(...) is undefined; can't access its "getElementsByTagName" property
... that would be in the "getFreeBusyElement" method
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to undefined from comment #undefined)
>
they are not caused by this patch. if you see the logs without applying this patch, you ll even then find them there.
Assignee | ||
Comment 5•6 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #3)
> I get a bunch of
> JavaScript error:
> chrome://calendar/content/calendar-event-dialog-freebusy.xml, line 1302:
> TypeError: this.getListItem(...) is undefined; can't access its
> "getElementsByTagName" property
>
> ... that would be in the "getFreeBusyElement" method
they are not caused by this patch. if you see the logs without applying this patch, you ll even then find them there.
Assignee | ||
Comment 6•6 years ago
|
||
Attachment #9028858 -
Attachment is obsolete: true
Attachment #9029957 -
Flags: review?(makemyday)
Attachment #9029957 -
Flags: feedback?(mkmelin+mozilla)
Assignee | ||
Comment 7•6 years ago
|
||
Attachment #9029957 -
Attachment is obsolete: true
Attachment #9029957 -
Flags: review?(makemyday)
Attachment #9029957 -
Flags: feedback?(mkmelin+mozilla)
Attachment #9029960 -
Flags: review?(makemyday)
Attachment #9029960 -
Flags: feedback?(mkmelin+mozilla)
Assignee | ||
Comment 8•6 years ago
|
||
This patch will be applied on top of Bug 1509837.
Attachment #9029960 -
Attachment is obsolete: true
Attachment #9029960 -
Flags: review?(makemyday)
Attachment #9029960 -
Flags: feedback?(mkmelin+mozilla)
Attachment #9030071 -
Flags: review?(makemyday)
Attachment #9030071 -
Flags: feedback?(mkmelin+mozilla)
Assignee | ||
Comment 9•6 years ago
|
||
This patch applies on top of Bug 1509837.
Attachment #9030071 -
Attachment is obsolete: true
Attachment #9030071 -
Flags: review?(makemyday)
Attachment #9030071 -
Flags: feedback?(mkmelin+mozilla)
Attachment #9030073 -
Flags: review?(makemyday)
Attachment #9030073 -
Flags: feedback?(mkmelin+mozilla)
Assignee | ||
Comment 10•6 years ago
|
||
This patch applies on top of Bug 1509837.
Attachment #9030073 -
Attachment is obsolete: true
Attachment #9030073 -
Flags: review?(makemyday)
Attachment #9030073 -
Flags: feedback?(mkmelin+mozilla)
Attachment #9030074 -
Flags: review?(makemyday)
Attachment #9030074 -
Flags: feedback?(mkmelin+mozilla)
Comment 11•6 years ago
|
||
Comment on attachment 9030074 [details] [diff] [review]
freebusy-day.patch
Review of attachment 9030074 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
::: calendar/base/content/dialogs/calendar-event-dialog-attendees-bindings.js
@@ +177,5 @@
> + }
> +
> + // First set the formatted date string as title
> + let dateValue = this.zoomFactor > 100 ? this.dateFormatter.formatDateShort(date)
> + : this.dateFormatter.formatDateLong(date);
: goes on the previous line
Attachment #9030074 -
Flags: feedback?(mkmelin+mozilla) → feedback+
Assignee | ||
Comment 12•6 years ago
|
||
(In reply to undefined from comment #undefined)
>
https://searchfox.org/comm-central/source/calendar/.eslintrc.js#372
Assignee | ||
Comment 13•6 years ago
|
||
according to this rule it should be at after the line break..
Comment 14•6 years ago
|
||
Ok, looks like a calendar only thing. It's an non-default configuration not used elsewhere in mozilla eslint rules either.
Assignee | ||
Comment 15•6 years ago
|
||
Removed the dependence on scroll-container element.
Attachment #9030074 -
Attachment is obsolete: true
Attachment #9030074 -
Flags: review?(makemyday)
Attachment #9050608 -
Flags: review?(makemyday)
Attachment #9050608 -
Flags: feedback+
Comment 16•6 years ago
|
||
Comment on attachment 9050608 [details] [diff] [review]
freebusy-day.patch
Review of attachment 9050608 [details] [diff] [review]:
-----------------------------------------------------------------
I haven't got to tested the patch, so some comments mainly on the doc blocks and some style nits for now. Pleaese check especially the doc blocks, since the comments apply on all of them.
::: calendar/base/content/dialogs/calendar-event-dialog-attendees-custom-elements.js
@@ +264,5 @@
>
> customElements.define("calendar-event-freebusy-timebar", MozCalendarEventFreebusyTimebar);
> +
> +
> +class MozFreebusyDay extends MozXULElement {
Please add a doc block for the class itself describing its purpose.
@@ +303,5 @@
> + /**
> + * Zooms time slots and removes children.
> + *
> + * @param {Number} val new mZoomFactor value
> + * @returns {Number} new mZoomFactor value
The documentation should not expose details of the implementation like internal variable names but give a comprehensible description of the purpose of the function. So, |new zoom factor| seems suitable here for the parameter and the return value description, like |Sets the zoom factor for the free busy grid| does for the setter description.
This comment applies in general for all doc blocks in this file, so please revisit them.
@@ +348,5 @@
> + /**
> + * Sets start date of the event and make it immutable.
> + *
> + * @param {calDateTime} val mStartDate value
> + * @returns {calDateTime} mStartDate value
calIDateTime
@@ +409,5 @@
> + /**
> + * Updates the date object passed according to startHour and endHour.
> + *
> + * @param {calDateTime} val date object to be modified
> + * @returns {calDateTime} modified date object
calIDateTime
@@ +423,5 @@
> + date.isDate = false;
> +
> + if (!this.dateFormatter) {
> + this.dateFormatter = Cc["@mozilla.org/calendar/datetime-formatter;1"]
> + .getService(Ci.calIDateTimeFormatter);
Please add some indentation here, so that the leading dot is vertically aligned with the [ above
@@ +428,5 @@
> + }
> +
> + // First set the formatted date string as title
> + let dateValue = this.zoomFactor > 100 ? this.dateFormatter.formatDateShort(date)
> + : this.dateFormatter.formatDateLong(date);
Please add some indentation here, so that the : is vertically aligned with the ? above
@@ +439,5 @@
> + if (hours.childNodes.length <= 0) {
> + let template = document.createXULElement("text");
> + template.className = "freebusy-timebar-hour";
> + let count = Math.ceil(
> + (this.endHour - this.startHour) * 60 / step_in_minutes);
Doesn't this fit into a single line not exceeding 100 chracters?
Assignee | ||
Comment 17•6 years ago
|
||
Attachment #9050608 -
Attachment is obsolete: true
Attachment #9050608 -
Flags: review?(makemyday)
Attachment #9054167 -
Flags: review?(makemyday)
Attachment #9054167 -
Flags: feedback+
Assignee | ||
Comment 18•6 years ago
|
||
Attachment #9054167 -
Attachment is obsolete: true
Attachment #9054167 -
Flags: review?(makemyday)
Attachment #9056285 -
Flags: review?(philipp)
Assignee | ||
Comment 19•6 years ago
|
||
Attachment #9056285 -
Attachment is obsolete: true
Attachment #9056285 -
Flags: review?(philipp)
Attachment #9056288 -
Flags: review?(philipp)
Comment 20•6 years ago
|
||
Comment on attachment 9056288 [details] [diff] [review]
freebusy-day.patch
Review of attachment 9056288 [details] [diff] [review]:
-----------------------------------------------------------------
Please re-check documentation for the issues I've brought up before.
Attachment #9056288 -
Flags: review?(philipp) → review-
Assignee | ||
Comment 21•6 years ago
|
||
Attachment #9056288 -
Attachment is obsolete: true
Attachment #9058919 -
Flags: review?(philipp)
Assignee | ||
Comment 22•6 years ago
|
||
Attachment #9058919 -
Attachment is obsolete: true
Attachment #9058919 -
Flags: review?(philipp)
Attachment #9058920 -
Flags: review?(philipp)
Updated•6 years ago
|
Attachment #9058920 -
Flags: review?(philipp) → review+
Assignee | ||
Comment 23•6 years ago
|
||
Attachment #9058920 -
Attachment is obsolete: true
Attachment #9059158 -
Flags: review+
Assignee | ||
Comment 24•6 years ago
|
||
Attachment #9059158 -
Attachment is obsolete: true
Attachment #9059159 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 25•6 years ago
|
||
Attachment #9059159 -
Attachment is obsolete: true
Attachment #9059635 -
Flags: review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Comment 26•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/0289548dd286
Migrate freebusy-day binding to custom element. r=philipp
Updated•6 years ago
|
Target Milestone: --- → 7.0
You need to log in
before you can comment on or make changes to this bug.
Description
•