Skip to content
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

callback to arrow function #2634

Closed
wants to merge 30 commits into from
Closed

Conversation

sj00coder
Copy link
Contributor

@sj00coder sj00coder commented Nov 28, 2020

#2629 Callback to arrow functions

  • block.js
  • blockfactory.js
  • blocks.js
  • boundary.js
  • languagebox.js
  • palette.js
  • pastebox.js
  • pluginsviewer.js
  • protoblocks.js
  • saveInterface.js
  • toolbar.js
  • trash.js
  • widgets/help.js
  • widgets/meterwidget.js
  • widgets/modewidget.js
  • widgets/musickeyboard.js
  • widgets/oscilliscope.js
  • widgets/phrasemaker.js (rename class from PitchTimeMatrix to PhraseMaker)
  • widgets/pitchdrummatrix.js
  • widgets/pitchslider.js
  • widgets/pitchstaircase.js
  • widgets/rhythmruler.js
  • widgets/statistics.js
  • widgets/status.js
  • widgets/temperament.js
  • widgets/tempo.js
  • widgets/timbre.js
  • widgets/widgetWindows.js

@sj00coder sj00coder changed the title callback to arrow function Block.js callback to arrow function Nov 28, 2020
@meganindya
Copy link
Member

If not yet complete ... please mark as draft PR.

@sj00coder
Copy link
Contributor Author

If not yet complete ... please mark as draft PR.

Sir,Please check some of my changes,if that is okay,I'll continue rest of my work.Please

@meganindya meganindya marked this pull request as draft November 28, 2020 11:15
Copy link
Member

@meganindya meganindya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace all instance of that with this inside the arrow fn. If no more references remain, remove the declaration of that itself.

@sj00coder sj00coder marked this pull request as ready for review November 28, 2020 13:57
@meganindya
Copy link
Member

Fixed the merge conflict for you. Please get rid of the remaining instances of that.

@sj00coder
Copy link
Contributor Author

sj00coder commented Nov 29, 2020

Fixed the merge conflict for you. Please get rid of the remaining instances of that.

In callbacks, there is no 'that' instances are left sir @meganindya .I have did it before.or I am supposed to do it in whole js files with every instance of that.

@sj00coder
Copy link
Contributor Author

@meganindya , Sir In my first commits I have not did remove that's but in latter commits I have did it all.Please review this sir.

Comment on lines +160 to +171
<<<<<<< HEAD
<<<<<<< HEAD

var inputNum1 = this._musicRatio1.value;
=======
let that = this;
let inputNum1 = this._musicRatio1.value;
>>>>>>> upstream/master
=======
let that = this;
let inputNum1 = this._musicRatio1.value;
>>>>>>> 446b179e34ba9e0c1252d6effd06341b9c486707
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does your committed code have this stuff?

Comment on lines 172 to 184
<<<<<<< HEAD

// FIXME: Should be based on meter
for (var i = 0; i < 4; i++) {
setTimeout(() => {
this._logo.synth.trigger(
=======
let that = this;
// FIXME: Should be based on meter
for (let i = 0; i < 4; i++) {
setTimeout(function() {
that._logo.synth.trigger(
>>>>>>> upstream/master
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't fix merge conflicts properly

Copy link
Member

@meganindya meganindya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You commits contain dirty code from merge conflicts. The reviewer should not have to fix these trivial things for you. Be careful.

Copy link
Member

@meganindya meganindya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is breaking. Can't figure out what.

@meganindya meganindya marked this pull request as draft December 1, 2020 18:07
@meganindya
Copy link
Member

Can't follow so many files at once.

Please follow the following:

  1. rebase you master to current master of sugarlabs/musicblocks
  2. create a new branch
  3. cherry pick your commits on one file
  4. test extensively all features of that file
  5. create a new PR from that branch
  6. wait for review
  7. make any suggested changes if at all
  8. go back to 2 until all the files have been dealt with one at a time
  9. pop stash and practice the same thereafter

one file at a time, except for those with less than 20 line differences.

@meganindya
Copy link
Member

I'm closing this PR. Follow the steps above for new PRs.

@meganindya meganindya closed this Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants