New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code gardening: UiController.js #1739
Comments
@n8rzz thought I should ask beforehand to avoid having to revert or change in code review: openscope/src/assets/scripts/client/ui/UiController.js Lines 298 to 320 in 67f23ec
I could: Will then apply the same consistent ordering throughout (constructor, |
Yes please!
… On Jan 30, 2021, at 07:34, cake>pie ***@***.***> wrote:
@n8rzz thought I should ask beforehand to avoid having to revert or change in code review:
How should I re-order this block of code? (from UiController init() method)
https://github.com/openscope/openscope/blob/67f23ecfa27e73eb698ee7fe7c008ac03fdb8d3e/src/assets/scripts/client/ui/UiController.js#L298-L320
I could:
a) enforce alphabetical order of whole block of code (move noncompliant L302, L320)
b) separate sections for elements related to dialogs and footer menu buttons, both alphabetical order
c) separate sections: dialogs alphabetically, footer buttons according to visual/DOM ordering
Will then apply the same consistent ordering throughout (constructor, enable, disable)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Please choose one of:
|
...and thats what I get for replying by email. I am ashamed. I'd go for I wrote a lot of this 5 or 6 years ago now, a lot of it makes me throw up a bit. Some of it isn't bad. All of it will benefit from fresh, critical eyes. |
I think #1325 aims to do that? |
Issue Description
Doing some cleanup in
UiController.js
.Filing to get an issue number for commits, branch name and eventually PR.
trafficRateController
,$toggleAirspace
to constructor + destructoronToggleXyz
handlers instead of making unecessary jQuery objectsthis.$log
for use inui_log
No change to code logic or function.Okay that turned out to be a lie, because of the last two items in the above list.
The text was updated successfully, but these errors were encountered: