Closed Bug 1509180 Opened 6 years ago Closed 6 years ago

[de-xbl] Inline and Scriptify daypicker-monthday binding.

Categories

(Calendar :: Lightning Only, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: arshad, Assigned: arshad)

References

Details

Attachments

(1 file, 10 obsolete files)

Assignee: nobody → arshdkhn1
Status: NEW → ASSIGNED
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9026836 - Flags: review?(mkmelin+mozilla)
Attachment #9026836 - Flags: feedback?(mkmelin+mozilla)
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9026836 - Attachment is obsolete: true
Attachment #9026836 - Flags: review?(mkmelin+mozilla)
Attachment #9026836 - Flags: feedback?(mkmelin+mozilla)
Attachment #9026840 - Flags: review?(makemyday)
Attachment #9026840 - Flags: feedback?(mkmelin+mozilla)
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9026840 - Attachment is obsolete: true
Attachment #9026840 - Flags: review?(makemyday)
Attachment #9026840 - Flags: feedback?(mkmelin+mozilla)
Attachment #9026841 - Flags: review?(makemyday)
Attachment #9026841 - Flags: feedback?(mkmelin+mozilla)
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9026841 - Attachment is obsolete: true
Attachment #9026841 - Flags: review?(makemyday)
Attachment #9026841 - Flags: feedback?(mkmelin+mozilla)
Attachment #9026848 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9026848 [details] [diff] [review] daypicker-monthday.patch Review of attachment 9026848 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.js @@ +53,5 @@ > + } > + } > + return days; > + }, > + init: () => { Using anonymous function here instead of normal function as we dont need `this` binding as in case of daypicker-weekday.
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9026848 - Attachment is obsolete: true
Attachment #9026848 - Flags: review?(mkmelin+mozilla)
Attachment #9027061 - Flags: review?(makemyday)
Attachment #9027061 - Flags: feedback?(mkmelin+mozilla)
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=4d0c5fb8a8b60d6cd8aeed4507213fd60ddaf701&selectedJob=213822067 Indeed the test fail was because of ruleaction target binding bug. Now green lights for this patch from test.
Comment on attachment 9027061 [details] [diff] [review] daypicker-monthday.patch Review of attachment 9027061 [details] [diff] [review]: ----------------------------------------------------------------- LGTM ::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.js @@ +32,5 @@ > + } > + for (let i = 0; i < val.length; i++) { > + let lastDayOffset = val[i] == -1 ? 0 : -1; > + let index = (val[i] < 0 ? val[i] + days.length + lastDayOffset > + : val[i] - 1); copied but very strange use of parenthesis. (I'd put the close after the 0)
Attachment #9027061 - Flags: feedback?(mkmelin+mozilla) → feedback+
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9027061 - Attachment is obsolete: true
Attachment #9027061 - Flags: review?(makemyday)
Attachment #9028071 - Flags: review?(makemyday)
Attachment #9028071 - Flags: feedback+
Comment on attachment 9028071 [details] [diff] [review] daypicker-monthday.patch Review of attachment 9028071 [details] [diff] [review]: ----------------------------------------------------------------- This patch contains serveral unrelated (and not wanted) style changes to other parts of the code. Can you please revert them and limit the changes to what is required for the patch?
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9028071 - Attachment is obsolete: true
Attachment #9028071 - Flags: review?(makemyday)
Attachment #9029909 - Flags: review?(makemyday)
Attachment #9029909 - Flags: feedback+
Rebased this patch on top daypicker-weekday and removed the unwanted style changes.
Depends on: 1509076
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9029909 - Attachment is obsolete: true
Attachment #9029909 - Flags: review?(makemyday)
Attachment #9029910 - Flags: review?(makemyday)
Attachment #9029910 - Flags: feedback+
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9029910 - Attachment is obsolete: true
Attachment #9029910 - Flags: review?(makemyday)
Attachment #9029911 - Flags: review?(makemyday)
Attachment #9029911 - Flags: feedback+
Attached patch daypicker-monthday.patch (obsolete) (deleted) — Splinter Review
Attachment #9029911 - Attachment is obsolete: true
Attachment #9029911 - Flags: review?(makemyday)
Attachment #9042960 - Flags: review?(makemyday)
Comment on attachment 9042960 [details] [diff] [review] daypicker-monthday.patch Review of attachment 9042960 [details] [diff] [review]: ----------------------------------------------------------------- try is green.
Attachment #9042960 - Flags: review?(makemyday) → review?(geoff)
Comment on attachment 9042960 [details] [diff] [review] daypicker-monthday.patch Review of attachment 9042960 [details] [diff] [review]: ----------------------------------------------------------------- r+ with these changes: ::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.js @@ +92,5 @@ > + init() { > + let mainbox = document.querySelector(".daypicker-monthday-mainbox"); > + let numRows = mainbox.childNodes.length; > + let child = null; > + for (let i = 0; i < numRows; i++) { Can you go through this patch and convert all relevant for(;;) to for..of since childNodes can now be interated? @@ +123,5 @@ > + } > + } > + for (let i = 0; i < val.length; i++) { > + let lastDayOffset = val[i] == -1 ? 0 : -1; > + let index = (val[i] < 0) ? (val[i] + days.length + lastDayOffset) Please check eslint on this if you haven't, I don't think you need the extra parens. ::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.xul @@ +245,5 @@ > + class="daypicker-monthday" > + onselect="updateRecurrenceControls();"> > + <vbox class="daypicker-monthday-mainbox" flex="1"> > + <hbox class="daypicker-row" flex="1"> > + <daypicker label="1" mode="monthly-days"/> This reads a bit strange. Also, I believe custom elements need a - in the name. Can we make this daypicker-day, or something that makes clear that this is a single day instead of a binding that allows selecting a day of many.
Attachment #9042960 - Flags: review?(geoff) → review+

::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.xul
@@ +245,5 @@

  •                    class="daypicker-monthday"
    
  •                    onselect="updateRecurrenceControls();">
    
  •                <vbox class="daypicker-monthday-mainbox" flex="1">
    
  •                  <hbox class="daypicker-row" flex="1">
    
  •                    <daypicker label="1" mode="monthly-days"/>
    

This reads a bit strange. Also, I believe custom elements need a - in the
name. Can we make this daypicker-day, or something that makes clear that
this is a single day instead of a binding that allows selecting a day of
many.

I am not making any custom element here. I have just scriptfied the js part and inlined the content. daypicker is an xbl element.

Attached patch daypicker-monthday.patch (deleted) — Splinter Review
Attachment #9042960 - Attachment is obsolete: true
Attachment #9047898 - Flags: review+
Keywords: checkin-needed

please check in after Bug 1509076.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/da0380b3b4b0
Inline and Scriptify daypicker-monthday binding. r=philipp

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: