Skip to content

Convert examples/text-only/pdf2svg.js to await/async #14141

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

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

adenicole
Copy link
Contributor

This is my first pull request.

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

You're adding the function pageLoaded but it isn't called anywhere so it's useless.

@Snuffleupagus
Copy link
Collaborator

You're adding the function pageLoaded but it isn't called anywhere so it's useless.

Isn't the problem actually that the patch adds a new function, rather than simply replacing the old one (as intended)?

Furthermore, was this successfully tested locally?
There's also a number of linting failures, please remember to run gulp lint and fix all the reported problems.
Finally, please squash the commits; see https://github.com/mozilla/pdf.js/wiki/Squashing-Commits

@calixteman
Copy link
Contributor

You're adding the function pageLoaded but it isn't called anywhere so it's useless.

Isn't the problem actually that the patch adds a new function, rather than simply replacing the old one (as intended)?

Oh! I've been confused because of the github UI.

Furthermore, was this successfully tested locally? There's also a number of linting failures, please remember to run gulp lint and fix all the reported problems. Finally, please squash the commits; see https://github.com/mozilla/pdf.js/wiki/Squashing-Commits

@adenicole adenicole closed this Oct 14, 2021
@adenicole adenicole reopened this Oct 14, 2021
@adenicole adenicole closed this Oct 14, 2021
@adenicole adenicole reopened this Oct 14, 2021
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.

As mentioned in #14141 (comment):

@adenicole adenicole force-pushed the master branch 2 times, most recently from 311897c to b99cb82 Compare October 15, 2021 08:25
@adenicole
Copy link
Contributor Author

Hi @Snuffleupagus @calixteman,

I am really sorry for all the trouble. 🙏 This happens to be my first pull request and it being an open-source project got me all nervous and excited. 😅

I have now locally tested and fixed lint errors and squashed all commits into one. Thank you for your patience. 😊 I look forward to learning more! 💪 💃

@Snuffleupagus
Copy link
Collaborator

The second sentence of the commit message, or at least the "and corrected lint errors"-part, doesn't seem appropriate here since it suggests that there were lint errors in the old code which isn't actually the case.

Updated promise call back with await/async method
@adenicole
Copy link
Contributor Author

The second sentence of the commit message, or at least the "and corrected lint errors"-part, doesn't seem appropriate here since it suggests that there were lint errors in the old code which isn't actually the case.

Oh, my bad! Fixed the commit message. 🙂

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.

For future reference: As outlined in https://github.com/mozilla/pdf.js/wiki/Contributing, you want to use feature branches rather than working directly against the "master" branch (since that makes working on more than thing at a time really difficult and causes e.g. rebasing to become more difficult).

r=me, thank you.

@Snuffleupagus Snuffleupagus merged commit fc56a78 into mozilla:master Oct 15, 2021
@Snuffleupagus Snuffleupagus removed the request for review from calixteman October 15, 2021 09:35
@marco-c marco-c linked an issue Oct 18, 2021 that may be closed by this pull request
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.

Convert examples/text-only/pdf2svg.js to await/async
4 participants