Skip to content

[USWDS]: Optimize initializer script#4243

Merged
thisisdano merged 8 commits into
developfrom
gsq-uswds-init
Jul 6, 2021
Merged

[USWDS]: Optimize initializer script#4243
thisisdano merged 8 commits into
developfrom
gsq-uswds-init

Conversation

@scottqueen-bixal

@scottqueen-bixal scottqueen-bixal commented Jun 23, 2021

Copy link
Copy Markdown
Contributor

This builds off and closes #4233

[USWDS] Optimize initializer script

We are trying to stay away from gulp dependencies, and the recommended wrapper approach worked well. However, it does make the code a bit more complex and harder to read.

This PR works to take advantage of the recommended es5 refactor approach from #4233 (comment), while keeping the added value proposed by @aduth

Another option: We could write the uswds-init.js in ES5-safe JavaScript, then skip Babel for that file altogether, then revert back to babelify for the remaining entrypoint.

  • Follow the 18F Front End Coding Style Guide and Accessibility Guide.
  • Run npm test and make sure the tests for the files you have changed have passed.
  • Run your code through HTML_CodeSniffer and make sure it’s error free.
  • Title your pull request using this format: [Website] - [UI component]: Brief statement describing what this pull request solves.

@scottqueen-bixal scottqueen-bixal requested a review from mejiaj June 23, 2021 21:06
@scottqueen-bixal

Copy link
Copy Markdown
Contributor Author

@mejiaj can you please pull this locally and test it in IE for us?

@mejiaj

mejiaj commented Jun 25, 2021

Copy link
Copy Markdown
Contributor

@gscottqueen class is correctly added and removed on IE11.

@scottqueen-bixal scottqueen-bixal changed the title DRAFT: Optimize initializer script [USWDS]: Optimize initializer script Jun 29, 2021
@scottqueen-bixal scottqueen-bixal marked this pull request as ready for review June 29, 2021 16:48
Comment thread src/js/uswds-init.js Outdated
Comment thread src/js/uswds-init.js
scottqueen-bixal and others added 2 commits July 6, 2021 14:10
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
Co-authored-by: Andrew Duthie <andrew.duthie@gsa.gov>
@scottqueen-bixal

Copy link
Copy Markdown
Contributor Author

@thisisdano ready for your review

@thisisdano thisisdano merged commit 6fb5d1d into develop Jul 6, 2021
@thisisdano thisisdano deleted the gsq-uswds-init branch July 6, 2021 20:00
@thisisdano thisisdano mentioned this pull request Aug 18, 2021
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.

4 participants