-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add checking what components use govuk-frontend to components audit #3716
Conversation
Someone else is adding stuff to the auditing tools 🎉 Bit confused as to the purpose behind this - why do we need to know which applications use components that use govuk-frontend JS? I thought if we included a component JS in an application that included any govuk-frontend JS as well, or is that going to change? |
In the approach I'm doing to ensure govuk-frontend isn't evaluated/run by browsers that don't support it (browsers that don't support This information just lets me know what components that are using ES6 need to be moved to a separate file and where they are so I can test them. If we are dividing the upgrading of applications between the teams that are responsible for maintaining them, then I thought others might find this information useful. |
In that case can I suggest an alternative approach? Rather than add a whole new section, could you modify the existing 'gem components used by applications' to somehow highlight those components using It also might be useful to have this information included in the main 'component files' section, although there's limited width there already so might not be practical. |
Ah yep, that makes more sense actually! I'll make that change |
298c940
to
4138e1a
Compare
6e18f2e
to
6dbde27
Compare
4138e1a
to
c3fcb31
Compare
c3fcb31
to
94db499
Compare
94db499
to
c4253cc
Compare
@patrickpatrickpatrick would you like a review of this PR? |
Ah yes please @andysellick ! Think this will be useful for anyone upgrading to v5 of govuk-frontend. |
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.
Code changes look good, would be good to get a test included for this if possible. There's a load of test files in /spec/dummy_gem/
that could be adapted, see the other auditing tests.
If a component being used in an application is uses govuk-frontend ES6 JS, then a tag will be added to indicate this in the Component Audit view. This is useful to determine which components are using ES6 JS and need to have their JS be loaded in a different file.
c4253cc
to
d85e212
Compare
@patrickpatrickpatrick am closing this but have used it as the basis for #4058, thanks for suggesting 👍 |
What
Adds checking to see what components use govuk-frontend to the components audit.
Why
Implemented this to double check that I wasn't missing out any component JS when making changes to applications to support govuk-frontend v5. Thought it could be useful if this was a standard feature in the auditing, so I have opened this PR.
Visual Changes
Before
After