Wrap all custom element code in curly bracket blocks
Categories
(Thunderbird :: General, task)
Tracking
(Not tracked)
People
(Reporter: pmorris, Assigned: pmorris)
References
Details
Attachments
(3 files, 8 obsolete files)
9.22 KB,
patch
|
Details | Diff | Splinter Review | |
25.74 KB,
patch
|
Details | Diff | Splinter Review | |
1.03 KB,
patch
|
Details | Diff | Splinter Review |
Most of our custom elements (classes etc.) are wrapped in curly bracket blocks to prevent leaking to window scope, but not all of them are. Wrap the remaining ones in blocks as well, and do this before the auto-formatting of bug 1572047 since it will affect indentation.
Assignee | ||
Comment 1•5 years ago
|
||
Part 1 of 3. Wrap all calendar CEs in curly brace blocks. Put "[skip-blame]" in the commit message to skip this change when doing hg blame since it's mostly re-indentation.
Assignee | ||
Comment 2•5 years ago
|
||
Part 2 of 3. Wrap all TB CEs in curly brace blocks. Put "[skip-blame]" in the commit message to skip this change when doing hg blame since it's mostly re-indentation.
Assignee | ||
Comment 3•5 years ago
|
||
Part 3 of 3. I found some redundant code at the bottom and the top of this file.
Try server run looks fine. Test failures seem to be unrelated:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=efa72012c8e6bbbd50308fc689ec65d662517b86
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
Updated•5 years ago
|
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
Hmm, I saw [skip-blame]
in one of the patches. We need to research what the right thing is, for the C++ formatting I used # ignore-this-changeset
. I think some of the source indexes ignore the latter under some circumstances.
Assignee | ||
Comment 8•5 years ago
|
||
mkmelin: Hm, sounds like I misunderstood. I was thinking it was an incremental step that could be done beforehand, to simplify the introduction of prettier. What are the reasons for waiting on this until the prettier run? (One benefit would be not having to do the indentation manually, but I guess I already did that...) I guess it complicates uplifting unless you apply it to the uplift targets, which creates more work.
Anyway, it sounds like you are saying I should redo these patches (using 'diff -uw') to remove the indentation changes, and then just apply them as part of the prettier run when that happens on Aug 29.
Assignee | ||
Comment 9•5 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #7)
Hmm, I saw
[skip-blame]
in one of the patches. We need to research what the right thing is, for the C++ formatting I used# ignore-this-changeset
. I think some of the source indexes ignore the latter under some circumstances.
I asked on IRC and we should indeed be using 'ignore-this-changeset', as described here (thanks Fallen):
https://lists.mozilla.org/pipermail/dev-platform/2019-January/023284.html
Comment 10•5 years ago
|
||
(In reply to Paul Morris [:pmorris] from comment #8)
Anyway, it sounds like you are saying I should redo these patches (using 'diff -uw') to remove the indentation changes, and then just apply them as part of the prettier run when that happens on Aug 29.
Yeah that would be what I suggest. Then there's no duplicate reformatting (if it's only indention).
Updated•5 years ago
|
Assignee | ||
Comment 11•5 years ago
•
|
||
Part 1/3 - Now without indentation/whitespace changes and rebased on current trunk.
Previous version of this had darktrojan and mkmelin's r+.
Assignee | ||
Comment 12•5 years ago
•
|
||
Part 2/3 - Now without indentation/whitespace changes and rebased on current trunk.
Part 3/3 - Hasn't changed from the original part3 patch.
Comment 13•5 years ago
|
||
Assignee | ||
Comment 14•5 years ago
|
||
1/3 Now with const instead of let for imports.
As you know, I'll gladly use const anywhere and anytime I can. :)
("If a variable is never reassigned, using the const declaration is better. const declaration tells readers, “this variable is never reassigned,” reducing cognitive load and improving maintainability." -- https://eslint.org/docs/rules/prefer-const )
Assignee | ||
Comment 15•5 years ago
|
||
2/3 Now with const instead of let for imports.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Updated•5 years ago
|
Comment 21•5 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/fda41b757b2e
Wrap all Thunderbird custom elements in curly bracket blocks. r=mkmelin
https://hg.mozilla.org/comm-central/rev/6727b142f50d
Remove redundant menulist creation code. r=mkmelin
Updated•5 years ago
|
Description
•