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

LTD-4702 Upgrade lite-frontend to use govuk-frontend v4.8.0 #1799

Merged

Conversation

hnryjmes
Copy link
Contributor

@hnryjmes hnryjmes commented Feb 19, 2024

Aim

This upgrades lite-frontend to use govuk-frontend v4.8.0 which is a recent release for govuk-frontend including the crown logo changes.

The GOV.UK team released v5.0.0 after v4.7.0 so this was tried initially but as there are many breaking changes that may take time to resolve, we have opted for v4.8.0 which is the latest release for the 4.x series.

LTD-4702

Below is my original draft PR description:

My current plan to do the upgrade is to move lite-frontend through all major and minor (skipping patch) released versions of govuk-frontend, one version per commit, and seeing that the full test suite passes at each commit.

If there are no problems, then great.

If there are problems on a commit when it is tested, these can be fixed at that point, and the issues will be easier to identify as they can be related to a particular version change.

The major and minor versions (skipping patches) we should check are:

EDIT: we can now also upgrade to v5.2.0 as this has now become available

EDIT 2: we are now decided to go with v4.8.0 as this has the crown logo changes on it and there are many breaking changes in v5.0.0 that may take some time to resolve.

@hnryjmes hnryjmes force-pushed the LTD-4702_Upgrade_lite-frontend_to_use_govuk-frontend_v5.1.0 branch 2 times, most recently from 8e750b9 to 28652e5 Compare February 21, 2024 16:38
@hnryjmes hnryjmes changed the title [Draft] LTD-4702 Upgrade lite-frontend to use govuk-frontend v5.1.0 [Draft] LTD-4702 Upgrade lite-frontend to use govuk-frontend v5.2.0 Feb 21, 2024
@hnryjmes hnryjmes force-pushed the LTD-4702_Upgrade_lite-frontend_to_use_govuk-frontend_v5.1.0 branch 3 times, most recently from d815a32 to ad1740d Compare February 23, 2024 09:52
@hnryjmes hnryjmes changed the title [Draft] LTD-4702 Upgrade lite-frontend to use govuk-frontend v5.2.0 [Draft] LTD-4702 Upgrade lite-frontend to use govuk-frontend v4.8.0 Feb 23, 2024
@hnryjmes hnryjmes force-pushed the LTD-4702_Upgrade_lite-frontend_to_use_govuk-frontend_v5.1.0 branch 2 times, most recently from 943b7ac to e15ef51 Compare February 23, 2024 09:59
@hnryjmes hnryjmes changed the title [Draft] LTD-4702 Upgrade lite-frontend to use govuk-frontend v4.8.0 LTD-4702 Upgrade lite-frontend to use govuk-frontend v4.8.0 Feb 23, 2024
@hnryjmes hnryjmes marked this pull request as ready for review February 23, 2024 10:02
@@ -10,7 +10,7 @@
}

.lite-case-note__controls {
border: $govuk-border-width-form-element-error solid $govuk-error-colour;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm presuming all of these border-width things are going because this variable doesn't exist anymore but what is setting the border width now instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question. this variable was overriding the border width but now there is no override. this change is explained here: https://github.com/alphagov/govuk-frontend/releases/tag/v4.0.0

Remove deprecated $govuk-border-width-form-element-error variable
In GOV.UK Frontend v3.8.0, we made the border width of form elements in their error state the same as for form elements in their normal state and deprecated the $govuk-border-width-form-element-error variable.

Before, an element's border got thicker to show the element was in an error state. However, elements in their focused state also have a thicker border. As a result, when users focused an element in an error state, the only visible border-change was from red to black. Not all users could perceive this change. So, we reduced the element border's width, to make sure its thickness changes when users focus.

We've now removed $govuk-border-width-form-element-error completely.

If you’re referencing $govuk-border-width-form-element-error in your own Sass, you must remove it. If you're also defining your own error state, you only need to change the border colour.

You should avoid overriding the border width. For example, replace border: $govuk-border-width-form-element-error solid $govuk-error-colour; with border-color: $govuk-error-colour;.

You should also remove any override of $govuk-border-width-form-element-error from your Sass. This override no longer does anything.

This change was introduced in alphagov/govuk-frontend#1963.

@hnryjmes hnryjmes force-pushed the LTD-4702_Upgrade_lite-frontend_to_use_govuk-frontend_v5.1.0 branch from e15ef51 to 4ba6798 Compare February 23, 2024 12:02
@hnryjmes hnryjmes force-pushed the LTD-4702_Upgrade_lite-frontend_to_use_govuk-frontend_v5.1.0 branch from 4ba6798 to e416859 Compare February 26, 2024 09:55
@hnryjmes hnryjmes merged commit 44268b4 into dev Feb 26, 2024
12 checks passed
@hnryjmes hnryjmes deleted the LTD-4702_Upgrade_lite-frontend_to_use_govuk-frontend_v5.1.0 branch February 26, 2024 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants