Closed
Bug 1509076
Opened 6 years ago
Closed 6 years ago
[de-xbl] Inline and Scriptify daypicker-weekday binding.
Categories
(Calendar :: Lightning Only, defect)
Calendar
Lightning Only
Tracking
(Not tracked)
RESOLVED
FIXED
6.9
People
(Reporter: arshad, Assigned: arshad)
References
Details
Attachments
(1 file, 9 obsolete files)
14.29 KB,
patch
|
arshad
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Summary: [de-xbl] Convert daypicker-weekday into a custom element. → [de-xbl] Inline and Scriptify daypicker-weekday binding.
Assignee | ||
Comment 1•6 years ago
|
||
Assignee: nobody → arshdkhn1
Attachment #9026818 -
Flags: review?(mkmelin+mozilla)
Attachment #9026818 -
Flags: review?(makemyday)
Assignee | ||
Updated•6 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•6 years ago
|
||
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)
Assignee | ||
Comment 3•6 years ago
|
||
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.
Assignee | ||
Comment 4•6 years ago
|
||
Tests fixed - https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=35d2cc637d666a31923936aceeb3f0aafcd18765
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)
Assignee | ||
Comment 5•6 years ago
|
||
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?
Assignee | ||
Comment 6•6 years ago
|
||
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)
Assignee | ||
Comment 7•6 years ago
|
||
Attachment #9026844 -
Attachment is obsolete: true
Attachment #9026844 -
Flags: review?(makemyday)
Attachment #9026844 -
Flags: feedback?(mkmelin+mozilla)
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Comment 9•6 years ago
|
||
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.
Assignee | ||
Comment 10•6 years ago
|
||
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 11•6 years ago
|
||
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+
Assignee | ||
Comment 12•6 years ago
|
||
Attachment #9027066 -
Attachment is obsolete: true
Attachment #9028080 -
Flags: review?(makemyday)
Attachment #9028080 -
Flags: feedback+
Comment 13•6 years ago
|
||
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?
Assignee | ||
Comment 14•6 years ago
|
||
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+
Assignee | ||
Comment 15•6 years ago
|
||
Attachment #9029907 -
Attachment is obsolete: true
Attachment #9029907 -
Flags: review?(makemyday)
Assignee | ||
Updated•6 years ago
|
Attachment #9029912 -
Flags: review?(makemyday)
Attachment #9029912 -
Flags: feedback+
Assignee | ||
Comment 16•6 years ago
|
||
Attachment #9029912 -
Attachment is obsolete: true
Attachment #9029912 -
Flags: review?(makemyday)
Attachment #9042958 -
Flags: review?(makemyday)
Attachment #9042958 -
Flags: feedback+
Assignee | ||
Comment 17•6 years ago
|
||
I know the comments are not the best but let me know I ll update them.
Assignee | ||
Comment 18•6 years ago
|
||
Comment 19•6 years ago
|
||
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+
Assignee | ||
Comment 20•6 years ago
|
||
Attachment #9042958 -
Attachment is obsolete: true
Attachment #9047885 -
Flags: review+
Assignee | ||
Comment 21•6 years ago
|
||
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?
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Comment 22•6 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/cae3bf889a15
Inline and Scriptify daypicker-weekday binding. r=philipp
Updated•6 years ago
|
Target Milestone: --- → 6.9
You need to log in
before you can comment on or make changes to this bug.
Description
•