Closed Bug 1509076 Opened 6 years ago Closed 6 years ago

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

Categories

(Calendar :: Lightning Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: arshad, Assigned: arshad)

References

Details

Attachments

(1 file, 9 obsolete files)

Component: General → Lightning Only
Product: Thunderbird → Calendar
Summary: [de-xbl] Convert daypicker-weekday into a custom element. → [de-xbl] Inline and Scriptify daypicker-weekday binding.
Attached patch datepicker-weekday.patch (obsolete) β€” β€” Splinter Review
Assignee: nobody → arshdkhn1
Attachment #9026818 - Flags: review?(mkmelin+mozilla)
Attachment #9026818 - Flags: review?(makemyday)
Status: NEW → ASSIGNED
Attached patch datepicker-weekday.patch (obsolete) β€” β€” Splinter Review
This binding is only used in calendar-event-recurrence dialog that's why I am inlining the content and scriptifying the method into a JS object.
Attachment #9026818 - Attachment is obsolete: true
Attachment #9026818 - Flags: review?(mkmelin+mozilla)
Attachment #9026818 - Flags: review?(makemyday)
Attachment #9026823 - Flags: review?(makemyday)
Attachment #9026823 - Flags: feedback?(mkmelin+mozilla)
https://searchfox.org/comm-central/source/calendar/test/mozmill/shared-modules/test-item-editing-helpers.js#75 is something that is not yet fixed by bug, I am looking for ways to fix tests.
Attached patch datepicker-weekday.patch (obsolete) β€” β€” Splinter Review
Attachment #9026823 - Attachment is obsolete: true
Attachment #9026823 - Flags: review?(makemyday)
Attachment #9026823 - Flags: feedback?(mkmelin+mozilla)
Attachment #9026827 - Flags: review?(makemyday)
Attachment #9026827 - Flags: feedback?(mkmelin+mozilla)
Comment on attachment 9026827 [details] [diff] [review] datepicker-weekday.patch Review of attachment 9026827 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.xul @@ +132,5 @@ > disable-on-occurrence="true" > control="daypicker-weekday"/> > + <hbox id="daypicker-weekday" > + flex="1" > + disable-on-readonly="true" I guess I missed this. Is it used?
Attached patch daypicker-weekday.patch (obsolete) β€” β€” Splinter Review
Attachment #9026827 - Attachment is obsolete: true
Attachment #9026827 - Flags: review?(makemyday)
Attachment #9026827 - Flags: feedback?(mkmelin+mozilla)
Attachment #9026844 - Flags: review?(makemyday)
Attachment #9026844 - Flags: feedback?(mkmelin+mozilla)
Attached patch daypicker-weekday.patch (obsolete) β€” β€” Splinter Review
Attachment #9026844 - Attachment is obsolete: true
Attachment #9026844 - Flags: review?(makemyday)
Attachment #9026844 - Flags: feedback?(mkmelin+mozilla)
test-junk-command.js::test_delete_junk_messages is failing. Not sure why this happening. Maybe this is because of the ruleactiontargetbindings issue and not because of this patch.
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 9027066 [details] [diff] [review] daypicker-weekday.patch Review of attachment 9027066 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/themes/common/dialogs/calendar-event-dialog.css @@ +291,5 @@ > listbox[disabled="true"] { > color: -moz-FieldText; > } > > +.daypicker-weekday { #daypicker-weekday or? I don't see a daypicker-weekday class or maybe this is not needed then?
Attachment #9027066 - Flags: feedback+
Attached patch daypicker-weekday.patch (obsolete) β€” β€” Splinter Review
Attachment #9027066 - Attachment is obsolete: true
Attachment #9028080 - Flags: review?(makemyday)
Attachment #9028080 - Flags: feedback+
Comment on attachment 9028080 [details] [diff] [review] daypicker-weekday.patch Review of attachment 9028080 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/calendar-daypicker.xml @@ +37,5 @@ > <constructor><![CDATA[ > this.setAttribute("autoCheck", "true"); > this.setAttribute("type", "checkbox"); > + this.setAttribute("disable-on-readonly", "true"); > + this.setAttribute("disable-on-occurrence", "true"); This change seems to be in this patch as well in that of bug 1509180 - can you please check this so that the patches apply on top of each other?
Attached patch daypicker-weekday.patch (obsolete) β€” β€” Splinter Review
I ll rebase daypickr-monthday on top of this patch.
Attachment #9028080 - Attachment is obsolete: true
Attachment #9028080 - Flags: review?(makemyday)
Attachment #9029907 - Flags: review?(makemyday)
Attachment #9029907 - Flags: feedback+
Blocks: 1509180
Attached patch daypicker-weekday.patch (obsolete) β€” β€” Splinter Review
Attachment #9029907 - Attachment is obsolete: true
Attachment #9029907 - Flags: review?(makemyday)
Attachment #9029912 - Flags: review?(makemyday)
Attachment #9029912 - Flags: feedback+
Attached patch daypicker-weekday.patch (obsolete) β€” β€” Splinter Review
Attachment #9029912 - Attachment is obsolete: true
Attachment #9029912 - Flags: review?(makemyday)
Attachment #9042958 - Flags: review?(makemyday)
Attachment #9042958 - Flags: feedback+

I know the comments are not the best but let me know I ll update them.

Comment on attachment 9042958 [details] [diff] [review] daypicker-weekday.patch Review of attachment 9042958 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.js @@ +21,5 @@ > + /** > + * Method intitializing daypickerWeekday. > + */ > + init() { > + this.weekStartOffset = Preferences.get("calendar.week.start", 0); Let's use Services.prefs instead. @@ +24,5 @@ > + init() { > + this.weekStartOffset = Preferences.get("calendar.week.start", 0); > + > + let props = > + Services.strings.createBundle("chrome://calendar/locale/dateFormat.properties"); There is surely a helper in calL10nUtils for this? @@ +33,5 @@ > + let dow = i + this.weekStartOffset; > + if (dow >= 7) { > + dow -= 7; > + } > + let day = props.GetStringFromName("day." + (dow + 1) + ".Mmm"); `day.${dow + 1}.Mmm` @@ +69,5 @@ > + let numChilds = mainbox.childNodes.length; > + for (let i = 0; i < numChilds; i++) { > + let child = mainbox.childNodes[i]; > + child.removeAttribute("checked"); > + } We can convert this to for (let child of mainbox.childNodes). @@ +71,5 @@ > + let child = mainbox.childNodes[i]; > + child.removeAttribute("checked"); > + } > + for (let i = 0; i < val.length; i++) { > + let index = val[i] - 1 - this.weekStartOffset; I think this one can be for..of as well
Attachment #9042958 - Flags: review?(makemyday) → review+
Attached patch daypicker-weekday.patch β€” β€” Splinter Review
Attachment #9042958 - Attachment is obsolete: true
Attachment #9047885 - Flags: review+
Comment on attachment 9047885 [details] [diff] [review] daypicker-weekday.patch Review of attachment 9047885 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/base/content/dialogs/calendar-event-dialog-recurrence.js @@ +240,5 @@ > + let dow = i + this.weekStartOffset; > + if (dow >= 7) { > + dow -= 7; > + } > + let day = cal.l10n.getString("dateFormat", `day.${dow + 1}.Mmm`); Fallen, I hope this is ok?
Keywords: checkin-needed

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/cae3bf889a15
Inline and Scriptify daypicker-weekday 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: