Closed Bug 1440980 Opened 6 years ago Closed 6 years ago

Move modules as a sub-module to calUtils.jsm

Categories

(Calendar :: Internal Components, enhancement)

Lightning 6.2
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

Attachments

(5 files, 6 obsolete files)

15.24 KB, patch
MakeMyDay
: review+
Details | Diff | Splinter Review
11.27 KB, patch
MakeMyDay
: review+
Details | Diff | Splinter Review
4.95 KB, patch
MakeMyDay
: review+
Details | Diff | Splinter Review
23.74 KB, patch
MakeMyDay
: review+
Details | Diff | Splinter Review
25.76 KB, patch
Fallen
: review+
Details | Diff | Splinter Review
We have a few modules that already provide a cal.foo namespace. To streamline this with the current flow, I'd say we move them to be loaded via lazy module getter.
Attached patch [part 1] calAlarmUtils - v1 (obsolete) β€” β€” Splinter Review
Attachment #8953810 - Flags: review?(makemyday)
Attached patch [part 2] calAsyncUtils - v1 (obsolete) β€” β€” Splinter Review
Attachment #8953811 - Flags: review?(makemyday)
Attached patch [part 3] calAuthUtils - v1 (obsolete) β€” β€” Splinter Review
Attachment #8953812 - Flags: review?(makemyday)
Attached patch [part 4] calPrintUtils - v1 (obsolete) β€” β€” Splinter Review
Attachment #8953813 - Flags: review?(makemyday)
Attached patch [part 5] calXMLUtils - v1 (obsolete) β€” β€” Splinter Review
Attachment #8953814 - Flags: review?(makemyday)
Attachment #8953810 - Attachment description: calAlarmUtils - v1 → [part 1] calAlarmUtils - v1
Sorry about the extra bugmail, I made some fixes to the patches but I don't remember to which ones. I'm just going to go ahead and replace them all.

We really need to find a way to make phab usable without mfa, this would have been so much easier. I spent an hour diffing patches and trying to automate it :D
Attachment #8953810 - Attachment is obsolete: true
Attachment #8953810 - Flags: review?(makemyday)
Attachment #8953867 - Flags: review?(makemyday)
Attachment #8953811 - Attachment is obsolete: true
Attachment #8953811 - Flags: review?(makemyday)
Attachment #8953868 - Flags: review?(makemyday)
Attached patch [part 3] calAuthUtils - v2 (obsolete) β€” β€” Splinter Review
Attachment #8953812 - Attachment is obsolete: true
Attachment #8953812 - Flags: review?(makemyday)
Attachment #8953869 - Flags: review?(makemyday)
Attachment #8953813 - Attachment is obsolete: true
Attachment #8953813 - Flags: review?(makemyday)
Attachment #8953870 - Flags: review?(makemyday)
Attached patch [part 5] calXMLUtils - v2 β€” β€” Splinter Review
Attachment #8953814 - Attachment is obsolete: true
Attachment #8953814 - Flags: review?(makemyday)
Attachment #8953871 - Flags: review?(makemyday)
Attachment #8953867 - Flags: review?(makemyday) → review+
Attachment #8953868 - Flags: review?(makemyday) → review+
Comment on attachment 8953869 [details] [diff] [review]
[part 3] calAuthUtils - v2

Review of attachment 8953869 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the below nits fixed.

::: calendar/base/modules/calAuthUtils.jsm
@@ +31,5 @@
> +            this.mReturnedLogins = {};
> +            this.mProvider = null;
> +        }
> +
> +        getPasswordInfo(aPasswordRealm) {

Can you add a doc block here?

@@ +132,5 @@
> +         * @throw NS_ERROR_NOT_IMPLEMENTED
> +         *        Asynchronous authentication prompts are not supported;
> +         *        the caller should fall back to promptUsernameAndPassword().
> +         */
> +        asyncPromptAuth(aChannel, aCallback, aContext, aLevel, aAuthInfo) {

Can you please add the param description to the doc block?

@@ +165,5 @@
> +
> +            let hostKey = aChannel.URI.prePath + ":" + aAuthInfo.realm;
> +            gAuthCache.planForAuthInfo(hostKey);
> +
> +            function queuePrompt() {

Can you make this:

let queuePrompt = function() {

since the definition is not at the top of the parent function.
Attachment #8953869 - Flags: review?(makemyday) → review+
Attachment #8953870 - Flags: review?(makemyday) → review+
Attachment #8953871 - Flags: review?(makemyday) → review+
(In reply to [:MakeMyDay] from comment #11)
> @@ +132,5 @@
> > +         * @throw NS_ERROR_NOT_IMPLEMENTED
> > +         *        Asynchronous authentication prompts are not supported;
> > +         *        the caller should fall back to promptUsernameAndPassword().
> > +         */
> > +        asyncPromptAuth(aChannel, aCallback, aContext, aLevel, aAuthInfo) {
> 
> Can you please add the param description to the doc block?
This was copy/paste from the idl file. I opted for removing this doc block for that reason.

I also added calAuthUtils to the jsdoc eslint and made sure all types are set.
Attachment #8953869 - Attachment is obsolete: true
Attachment #8967851 - Flags: review+
Attachment #8953867 - Flags: approval-calendar-beta+
Attachment #8953868 - Flags: approval-calendar-beta+
Attachment #8953870 - Flags: approval-calendar-beta+
Attachment #8953871 - Flags: approval-calendar-beta+
Attachment #8967851 - Flags: approval-calendar-beta+
Pushed by mozilla@kewis.ch:
https://hg.mozilla.org/comm-central/rev/8465c91e98ae
Load sub-modules via calUtils.jsm - calAlarmUtils. r=MakeMyDay
https://hg.mozilla.org/comm-central/rev/bb34e24218cd
Load sub-modules via calUtils.jsm - calAsyncUtils. r=MakeMyDay
https://hg.mozilla.org/comm-central/rev/affb168e0997
Load sub-modules via calUtils.jsm - calAuthUtils. r=MakeMyDay
https://hg.mozilla.org/comm-central/rev/38580db43336
Load sub-modules via calUtils.jsm - calPrintUtils. r=MakeMyDay
https://hg.mozilla.org/comm-central/rev/46d63f72f75a
Load sub-modules via calUtils.jsm - calXMLUtils. r=MakeMyDay
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
https://hg.mozilla.org/releases/comm-beta/a6929adf17c7
Bug 1440980 - Load sub-modules via calUtils.jsm - calXMLUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/8115b369502e
Bug 1440980 - Load sub-modules via calUtils.jsm - calPrintUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/663b00b2e719
Bug 1440980 - Load sub-modules via calUtils.jsm - calAuthUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/331dec9e691a
Bug 1440980 - Load sub-modules via calUtils.jsm - calAsyncUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/495cc6dd8eae
Bug 1440980 - Load sub-modules via calUtils.jsm - calAlarmUtils. r=MakeMyDay
Target Milestone: --- → 6.2
https://hg.mozilla.org/releases/comm-beta/rev/a6929adf17c7
Bug 1440980 - Load sub-modules via calUtils.jsm - calXMLUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/rev/8115b369502e
Bug 1440980 - Load sub-modules via calUtils.jsm - calPrintUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/rev/663b00b2e719
Bug 1440980 - Load sub-modules via calUtils.jsm - calAuthUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/rev/331dec9e691a
Bug 1440980 - Load sub-modules via calUtils.jsm - calAsyncUtils. r=MakeMyDay
https://hg.mozilla.org/releases/comm-beta/rev/495cc6dd8eae
Bug 1440980 - Load sub-modules via calUtils.jsm - calAlarmUtils. r=MakeMyDay
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: