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

Shorten the code in the web/text_layer_builder.js file #18152

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

  • Use this rather than explicitly spelling out the class-name in the static #enableGlobalSelectionListener method, since that leads to shorter code. Given that all the relevant static fields are private ESLint will catch any scope errors in the code.

  • Reduce a little bit of duplication when using the #selectionChangeAbortController signal.

  • Utilize early returns in the "selectionchange" event handler, since that reduces overall indentation which helps readability a tiny bit.

 - Use `this` rather than explicitly spelling out the class-name in the static `#enableGlobalSelectionListener` method, since that leads to shorter code. Given that all the relevant static fields are *private* ESLint will catch any scope errors in the code.

 - Reduce a little bit of duplication when using the `#selectionChangeAbortController` signal.

 - Utilize early returns in the "selectionchange" event handler, since that reduces overall indentation which helps readability a tiny bit.
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/3a191dc982f3085/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/105c40f1452217f/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/3a191dc982f3085/output.txt

Total script time: 7.47 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/105c40f1452217f/output.txt

Total script time: 18.45 mins

  • Integration Tests: FAILED

@timvandermeij
Copy link
Contributor

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/629ea1f855ca782/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/629ea1f855ca782/output.txt

Total script time: 1.17 mins

Published

@timvandermeij
Copy link
Contributor

Thanks!

@timvandermeij timvandermeij merged commit 1c3195b into mozilla:master May 23, 2024
7 checks passed
@Snuffleupagus Snuffleupagus deleted the TextLayerBuilder-shorter branch May 24, 2024 06:45
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.

4 participants