-
Notifications
You must be signed in to change notification settings - Fork 22
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
#2839: JS Refactor - [RJM] #3096
Conversation
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
[non blocking comment] The directory structure does not make sense to me. Specifically, assets/modules and assets/modules-admin. I looked for some standard practices, and suggest that instead we consider using assets/src/js for the source js files. I don't know what is the best structure under that. Maybe even getgov and getgov-admin subdirectories. Also, should the generated files be named getgov.min.js and getgov-admin.min.js? |
Lol, understandable and sick burn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial review of some files, not everything
🥳 Successfully deployed to developer sandbox rjm. |
2 similar comments
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
Rachid you were right that there was an error at the top of the screen. We should be scrolling to top & giving the error focus, but it looks like that is non on development either, seems like a separate issue we need to address in a different ticket. I see Zander has comments for additional comments in the code, feel free to just make a ticket for adding explanations since I know the longer this sits the more js issues you have to work in. Besides the one bug mentioned above, everything looks good. Happy to approve once the bug is fixed. |
I'll add some comments in gulpfile shortly. |
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
🥳 Successfully deployed to developer sandbox rjm. |
const uswds = require('@uswds/compile'); | ||
// For minimizing and optimizing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome comments here and on createBundleTask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are good to merge this. There may be something that slipped through but I think we can all just be mindful to watch for any minor glitches. All major functionality has been checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of everything looks good. I'd recommend Alysia taking a glance too, if I missed something
🥳 Successfully deployed to developer sandbox rjm. |
Ticket
Resolves #2839
Resolves #2840
Changes
npm install
on your local. <<< @therealslimhsiehdyuswds
anduswds-compiler
to exact versions. This was done for better control over USWDS updates.modules
andmodules-admin
folders intoget-gov.js
andget-gov-admin.js
get-gov.js
into helpers and modules, with amain.js
entry pointget-gov-admin.js
into helpers and page-level modules, with amain.js
entry point.gitignore
to track the new modular files, deleted the old non-dynamicget-gov.js
andget-gov-admin.js
and (hopefully) got git to forget about tracking them. <<< @therealslimhsiehdyContext for reviewers
Due to the size of the refactor, we unfortunately have to review every single JS interaction across the site to make sure it's all still functional. The code refactor did not include any re-writes but everything got moved around then glued back.
We should test changing the old get-gov and get-gov-admin files by hand on local environments other than mine and make sure they do not get tracked in git.
I think the most realistic way to get this reviewed is to go over the JS modules and just test their functionality in the app. Aside from moving files and directories around, I have done very little 'spot' refactoring on the JS. Any edits would have been linting style edits or adding a console.warn on a couple of admin helpers (you'll see it).
Setup
Code Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Validated user-facing changes as a developer
Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
References
Screenshots