Closed Bug 1557624 Opened 1 year ago Closed 1 year ago

correct usage of the global cal import

Categories

(Calendar :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mkmelin, Assigned: mkmelin)

References

Details

Attachments

(1 file, 1 obsolete file)

We have a few places where "cal" is used, but not properly imported. Just happens to work (in a limited context) since the define comes in from other included scripts.

Attached patch bug1557624_cal_def.patch (obsolete) — Splinter Review

These are the ones I could find. It's possible there is more if they are on the second line of the /* global(s) */

Attachment #9070500 - Flags: review?(paul)
Comment on attachment 9070500 [details] [diff] [review]
bug1557624_cal_def.patch

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

Changes look good.  I did some searching and found a few more cases: 
- calendar-views.js
- calendar-alarm-widget.js
- gdata-list-tree.js
r+ with those included.  (Also, I see some of these files use commas in the globals list.  Would be good to remove those for consistency.  Up to you if you want to do some of that here while we're at it.)
Attachment #9070500 - Flags: review?(paul) → review+

Seems "global" and commas are the preferred way: https://eslint.org/docs/user-guide/configuring#specifying-globals

Attachment #9070500 - Attachment is obsolete: true
Attachment #9070676 - Flags: review+
Keywords: checkin-needed

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/e5ed77a2a024
correct usage of the global cal import. r=pmorris

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Keywords: checkin-needed
Resolution: --- → FIXED
Comment on attachment 9070676 [details] [diff] [review]
bug1557624_cal_def.patch

I guess this is needed to make the date/time pickers available to add-ons.
Attachment #9070676 - Flags: approval-calendar-beta+
Target Milestone: --- → 7.1
You need to log in before you can comment on or make changes to this bug.