-
Notifications
You must be signed in to change notification settings - Fork 823
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
blocks.js/ES6 syntax #2629 #2999
Conversation
In general, this looks good. A couple of things need addressing: |
And please be sure to test, esp. the block scaling code, where you are making somewhat more invasive changes. Please report the results of your tests here. |
|
And If you dont mind can you elaborate this ? I am actually new to this. |
That looks correct. Regarding testing, start with a "smoke test": does the program still open? Then try invoking some of the functions through the UX: show and hide blocks; resize the blocks; etc. |
Completed the required changes and Formatted the entire file properly. |
@@ -883,7 +882,7 @@ function Blocks(activity) { | |||
// Find the dock position in the connected block. | |||
let foundMatch = false; | |||
let b; | |||
for (b = 0; b < this.blockList[cblk].connections.length; b++) { | |||
for (let b = 0; b < this.blockList[cblk].connections.length; b++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b is referenced outside of the for loop. We cannot reduce its scope here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with it please view it @walterbender
@walterbender please view the pr if its correct? |
In the future, please do not mix things up in your PRs. Your title suggests this is all about conversion to ES6 syntax and yet you incouded some variable scoping changes as well (which is where you introduced numerous errors). These should have been two separate PRs. |
merged |
Thanks @walterbender for helping me so much . Next Pr will be soon and I will Correct my mistakes. |
It is merged. But it looks odd because I made some changes to it locally
along the way, so the last commit you made was in conflict
If you check the commit logs you will see your commits.
…On Sat, Aug 28, 2021, 9:01 PM Jwala ***@***.***> wrote:
merged
Thanks @walterbender <https://github.com/walterbender> for helping me so
much . Next Pr will be soon and I will Correct my mistakes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2999 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6PXYN7NHVBCCYHVZXQRPLT7GBHBANCNFSM5CXGV2AQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
#2629
1)Converted all the function to arrow functions which now is in ES6 syntax.
Replace
...
function foo( ... ) {
...
function bar( ... ) {
...
}
...
}
...
with
...
function foo( ... ) {
...
const bar = ( ... ) => {
...
}
...
}
...
@walterbender please view this.