-
Notifications
You must be signed in to change notification settings - Fork 109
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
Refactor component JavaScript and add tests #538
Conversation
Hey @tomdoughty this looks really good. Do you think we could include it in the release 3.0.0? Would be good to have the breaking changes all go out together rather than do another one in a month or so. We are putting 3.0.0 changes on the We're going to be removing the feedback banner, so any JavaScript relating to that could be deleted. |
These are mainly reminders for myself so I don’t forget, but stuff we could look at:
Can be done at a later date:
|
42d183e
to
5cf1f10
Compare
5002a99
to
47180f9
Compare
Just need to do some final testing with the JS (in a package and compiled versions) and add a change log entry then this will be good to go in release 3.0.0 🍾 |
The compiled JavaScript seems to be working fine. |
9f7ae9f
to
817d908
Compare
…hsuk-frontend into fix/details-polyfill-replacement
Will work on the changelog on |
Thanks @tomdoughty 🍾 🔥 |
Description
Refactor the component JavaScript to use modern ES6 syntax with new JavaScript coding standards for NHS.UK frontend.
Draft of a custom written details polyfill including toggle class and attribute utils I have separated into their own files.
The exisiting polyfill was overkill for our browser support which caused complications for SPAs. I will be adding unit tests for this as part of the ES6 refactor but thought it is worth creating this PR for discussion. Done this way it is a non breaking change so could be merged if we decide it is better.
Update to the latest version of GOV.UK autocomplete
Related issues
#450 #408 #545
Checklist