alphagov / govuk_frontend_toolkit

❗️GOV.UK Frontend Toolkit is deprecated, and will only receive major bug fixes and security patches.
MIT License
403 stars 107 forks source link

Suppress elements deprecation notice #416

Closed fofr closed 6 years ago

fofr commented 7 years ago

The deprecation notice on selection-buttons.js (https://github.com/alphagov/govuk_frontend_toolkit/blob/0f53e6d2f652f271d22527f29d69c899a965c317/javascripts/govuk/selection-buttons.js#L8) assumes that the javascript is being used with Elements.

GOV.UK uses govuk_frontend_toolkit but does not use Elements. The notice is displaying in the console on GOV.UK because this file is included and used. While we are looking at switching some tools to GOV.UK Elements in preparation for GOV.UK Frontend, there are no plans to switch all of GOV.UK to Elements, and selection-buttons.js will be needed for a while to come.

https://github.com/alphagov/static/issues/1053

h-lame commented 6 years ago

FWIW: this message doesn't just appear in the dev console in the browser. It also can appear (many many times) in the terminal output of automated tests. This makes the tests noisy and harder for us to spot other warnings that we would like to resolve.

kr8n3r commented 6 years ago

easy solution and a non-breaking change would be remove that log. agree?

tijmenb commented 6 years ago

I think this can be closed now after https://github.com/alphagov/govuk_frontend_toolkit/pull/454? Feel free to reopen if not.