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

Convert the find bar to ES6 syntax #8297

Merged
merged 1 commit into from
Apr 16, 2017

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Apr 16, 2017

@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/6648ebfac6ca87f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/6648ebfac6ca87f/output.txt

Total script time: 3.08 mins

Published

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

r=me, with one nit.

dispatchEvent(type, findPrev) {
this.eventBus.dispatch('find', {
source: this,
type: type,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Since you're touching this line anyway, please note that it can be simplified to just type,

Please note: The object-shorthand ESLint rule would catch this, but given the vast number of failures it's not really feasible to enable it right now.
However, if we try to convert cases like these when we touch the code anyway, it might be slightly more doable later on (for reference, see also this MDN article).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in the new commit. I'm adding it to my list of things to think about when converting to ES6 👍

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a small suggestion: If you're using an editor which has support for plugins, I'd highly suggest enabling a linting/ESLint plugin.
Personally, I've found it immensely helpful to be able to get linting results directly in the editor on a file-by-file basis, and that way you can temporarily enable https://github.com/mozilla/pdf.js/blob/master/.eslintrc#L157 to help catch these cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm using Vim. I think I had it a while ago when we used JSHint, but for some reason I never added it again for ESLint. I just did and it's indeed really helpful to see any errors/warnings in the editor. Thank you for the suggestion!

@timvandermeij
Copy link
Contributor Author

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.215.176.217:8877/4a986eb4c9ae654/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/4a986eb4c9ae654/output.txt

Total script time: 22.25 mins

Published

@timvandermeij timvandermeij merged commit bd0e4dc into mozilla:master Apr 16, 2017
@timvandermeij timvandermeij deleted the es6-find-bar branch April 16, 2017 21:46
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants