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

Phrasemaker to ES6 #2677

Closed
wants to merge 1 commit into from
Closed

Conversation

ricknjacky
Copy link
Member

In continuation of #2656

@walterbender
Copy link
Member

js/widgets/phrasemaker.js:4019 Uncaught TypeError: this.getAttribute is not a function
at HTMLTableCellElement.cell.onmouseover (js/widgets/phrasemaker.js:4019)

Did you test this? This error happens when I try to click on a cell.

@ricknjacky
Copy link
Member Author

I have rectified the error.

@walterbender
Copy link
Member

js/widgets/phrasemaker.js:4848 Uncaught (in promise) ReferenceError: delta is not defined
at PitchTimeMatrix._save (js/widgets/phrasemaker.js:4848)
at HTMLDivElement.widgetWindow.addButton.onclick (js/widgets/phrasemaker.js:261)

when trying to save...

Please check all of the widget functionality.

@ricknjacky ricknjacky force-pushed the pmakervarlet branch 2 times, most recently from 4cbb09a to 70a613a Compare December 1, 2020 18:07
@ricknjacky
Copy link
Member Author

Please check all of the widget functionality.

Sorry, didn't test all of them last time, now all the buttons and their respective functionalities were tested. They worked correctly.

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.

This file is actually very convoluted. Semantics look good, but I am still not sure we know enough ways to extensively test this widget and figure out if any crash occurs, that is due to this or it previously existed.

@meganindya
Copy link
Member

This change isn't helping very much anyway. Lot's of remaining var occurrences that'll be tricky to remove. I've a better advice.

@meganindya
Copy link
Member

How about you convert this to a class definition first. Move the constants outside. Only the variables at the top go inside the constructor, the rest functions declared like this.SOMETHING = function(...) { ... } become SOMETHING(...) { ... }

@meganindya
Copy link
Member

This itself will expose a lot of bugs, e.g. variables declared without var/let/const

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

FYI, I am about 50% of the way through doing the var --> let conversion. A few tricky bits. I'll let you know when I am done.

@walterbender
Copy link
Member

The var --> let conversion is complete and I gave the code a pretty thorough going over. I don't think there are any regressions. Should be ready for the arrow function updates now.

@meganindya
Copy link
Member

So we can close this right?

@ricknjacky
Copy link
Member Author

ig, we should and I'll start with porting to arrow functions asap.

@ricknjacky ricknjacky closed this Dec 6, 2020
@ricknjacky ricknjacky deleted the pmakervarlet branch December 12, 2020 08:17
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.

3 participants