Skip to content
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

Fixing govuk frontend until they release update #1640

Merged
merged 4 commits into from
Oct 10, 2022

Conversation

nataliecarey
Copy link
Contributor

At the moment we're being held up by the PR to get the new config file into govuk-frontend. We can't really release because core features are broken and need working around.

This PR puts in the workarounds for the user, it detects the absence of nunjucksMacros and puts in the fixes needed for older versions of govuk-frontend (including the current live version).

There are two reasons to include this work:

  1. To remove the hard dependency on govuk-frontend making a new release before we can move forward
  2. To allow users to use older versions of govuk-frontend smoothly if they need/want to.

@nataliecarey nataliecarey requested a review from a team September 30, 2022 15:57
@lfdebrux lfdebrux changed the base branch from main to v13 September 30, 2022 16:23
@lfdebrux
Copy link
Member

lfdebrux commented Oct 3, 2022

A bit confused about the empty file lib/assets/legacy-govuk-frontend-fixes.js/legacy-govuk-frontend-fixes.scss, how does that work?

lib/build/tasks.js Outdated Show resolved Hide resolved
@nataliecarey nataliecarey force-pushed the fixing-govuk-frontend-until-they-release-update branch from 7ecf3f7 to a686db3 Compare October 3, 2022 13:21
lib/routes/extensions.js Outdated Show resolved Hide resolved
@BenSurgisonGDS BenSurgisonGDS force-pushed the fixing-govuk-frontend-until-they-release-update branch from a9fcb9b to 36d24e9 Compare October 5, 2022 11:40
@nataliecarey nataliecarey force-pushed the fixing-govuk-frontend-until-they-release-update branch from 36d24e9 to da83e5a Compare October 10, 2022 10:40
@lfdebrux
Copy link
Member

We should mention in the changelog that users will need to import component macros themselves for older versions of GOV.UK Frontend.

@nataliecarey nataliecarey merged commit d2452b3 into v13 Oct 10, 2022
@nataliecarey nataliecarey deleted the fixing-govuk-frontend-until-they-release-update branch October 10, 2022 14:49
lfdebrux added a commit that referenced this pull request Oct 28, 2022
I noticed that one of the text lines wasn't formatted correctly on the
password page, because it was missing the `govuk-body` class. Digging
deeper, it seems that we used to expect that the GOV.UK frontend global
styles would work for pages using the 'unbranded' stylesheet, but it
stopped in the rework for v13.

The issue is that we import the govuk-frontend settings in the unbranded
template, before we set the govuk-global-styles variable to true.
Previously this was fine because we were setting that variable strongly,
however in v13 we added the `!default` thingy [[1]], because we want
users to be able to override the value in `settings.scss`. I think this
behaviour is unavoidable, but luckily there is a workaround; we were
only importing the settings to get `govuk-body-background-colour`, but
the value of that is just `#fffff` (white). We can set the value to
white without needing to import any settings. If the GOV.UK Design
System decides to go with an off-white body background colour in the
future, that's also fine, the point of the unbranded template is not to
look like GOV.UK, so we're not losing anything by hardcoding the value.

[1]: #1640 (comment)
@lfdebrux lfdebrux mentioned this pull request Nov 17, 2022
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.

3 participants