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

Update to govuk-frontend 3.0 #1010

Merged
merged 27 commits into from
Aug 8, 2019
Merged

Update to govuk-frontend 3.0 #1010

merged 27 commits into from
Aug 8, 2019

Conversation

alex-ju
Copy link
Contributor

@alex-ju alex-ju commented Jul 30, 2019

What

Update govuk_publishing_components to use govuk-frontend 3.0.
Fix focus states on a few components to align them with the colour contrast requirements

Why

Notes

  • this PR is raised for visibility and be used as a base for discussions ready for review
  • for more details regarding changes see govuk-frontend 3.0 changelog

Compatibility checks

These changes were tested with applications in the following states using the appropriate compatibility flags.

  • applications with a direct dependency on govuk_elements_rails, govuk_frontend_toolkit and an indirect dependency on govuk_template (e.g. Service manual frontend)
  • applications with a direct dependency on govuk_frontend_toolkit and an indirect dependency on govuk_template (e.g. Frontend)
  • applications with an indirect dependency on govuk_template - dependent on static (e.g. Calendars)
  • applications without dependencies on legacy projects (e.g. Content Publisher)

Visual Changes

There are visual changes for almost all components, especially related to focus states (which are harder to get with a basic visual comparison). I would recommend using the preview app when reviewing as images don't capture all the states.

View Changes

https://govuk-publishing-compo-pr-1010.herokuapp.com/component-guide

Trello card

@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 July 30, 2019 15:09 Inactive
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

Since we seem to be using govuk-focusable so much would it be worth making our own mixin for the code that you've written to replace it?

Also I've not talked to anyone about this yet but do you know the reason for removing this mixin? It was kind of useful...

@alex-ju alex-ju force-pushed the update-to-govuk-frontend-3-0 branch from ae06f54 to 69759b5 Compare August 1, 2019 12:28
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 1, 2019 12:28 Inactive
@alex-ju alex-ju force-pushed the update-to-govuk-frontend-3-0 branch from 69759b5 to f9afdcd Compare August 1, 2019 15:49
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 1, 2019 15:49 Inactive
@alex-ju alex-ju force-pushed the update-to-govuk-frontend-3-0 branch from f9afdcd to aa492f8 Compare August 2, 2019 11:52
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 2, 2019 11:52 Inactive
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 5, 2019 08:55 Inactive
@alex-ju alex-ju marked this pull request as ready for review August 5, 2019 12:28
@alex-ju alex-ju force-pushed the update-to-govuk-frontend-3-0 branch from 2d4c56d to 92d2725 Compare August 5, 2019 12:30
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 5, 2019 12:30 Inactive
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

Initial review, I've only up to the commit Replace govuk-focusable mixins.

Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

Another partial review, I've got up to (but not including) Update start button icon.

I've noticed that a few of my comments are already out of date, so it's possible you've already addressed them in later commits. I'll review my review and mark/update as appropriate.

@andysellick
Copy link
Contributor

andysellick commented Aug 7, 2019

To be addressed after this PR is merged, logged here: #1028 and here: #1032

Some more thoughts...

  • the accessible autocomplete doesn't have the new focus styles (because it's mostly pulled in from another repo) but we're going to address that separately
  • links that wrap have a potential overlap issue with the line below slightly cropping the line above, as seen in the attachment component (note how the bottom of the 'P' in 'department' is missing). Might be something to talk to the Design System team about (also we might need to adjust the line height in this component)

Screen Shot 2019-08-06 at 13 21 54

Here's an only semi-related but interesting example from the contents list component, where the second line is indented, leaving a trailing bit of the first line's underline visible (I thought it was a quote mark when I first spotted it)

Screen Shot 2019-08-06 at 13 48 53

@andysellick
Copy link
Contributor

andysellick commented Aug 7, 2019

Also fairly obvious but worth pointing out that apps will break with this update - I just tried it in finder-frontend and it failed because apparently we're using the govuk-focusable mixin in that app.

UPDATE: actually might just be finder-frontend that has the problem. Shouldn't be too hard to fix then 😁

@alex-ju alex-ju force-pushed the update-to-govuk-frontend-3-0 branch from 92d2725 to ab95dcd Compare August 7, 2019 08:59
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 7, 2019 09:00 Inactive
@andysellick
Copy link
Contributor

Tables look good with the new, slightly lighter grey...

Screen Shot 2019-08-07 at 10 21 48

Old:

Screen Shot 2019-08-07 at 10 21 42

@andysellick
Copy link
Contributor

andysellick commented Aug 7, 2019

To be addressed after this PR is merged, logged here: #1028

The new focus style takes up a bit more vertical space than it used to. The worst example of this so far that I've found is the image card.

Screen Shot 2019-08-07 at 11 06 00

Screen Shot 2019-08-07 at 11 12 25

I don't know if this is actually a problem though. You're most likely to notice this if you're using a keyboard, in which case moving the focus won't be a problem. Also the one you're currently focussed on is fine.

Might be worth looking at some of these issues after this PR is merged, just noting it here for reference. Other components where this is a problem:

  • textarea, with text beneath it
  • metadata
  • organisation logo (see below)

Screen Shot 2019-08-07 at 13 23 43

@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 7, 2019 10:09 Inactive
@alex-ju alex-ju force-pushed the update-to-govuk-frontend-3-0 branch from 77cf625 to 6dda899 Compare August 7, 2019 10:22
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 7, 2019 10:23 Inactive
@andysellick
Copy link
Contributor

andysellick commented Aug 7, 2019

Unrelated to this PR, logged separately here: #1029

This is unrelated but worth adding to the 'to check later' list... the layout header with links doesn't seem to collapse early enough, plus when the links do collapse the dropdown menu doesn't seem to work?

Screen Shot 2019-08-07 at 13 14 28

@andysellick
Copy link
Contributor

andysellick commented Aug 7, 2019

Unrelated to this PR, logged separately here: #1030

Page title (with context link) lacks a focus state for the link. This was a problem prior to this PR, so arguably out of scope, but we should fix it.

Screen Shot 2019-08-07 at 13 27 10

It's even worse for the inverse option...

Screen Shot 2019-08-07 at 13 28 44

@vanitabarrett
Copy link
Contributor

Do we need to update the govspeak 'highlight answer' to use the green instead of the turquoise?
https://govuk-publishing-compo-pr-1010.herokuapp.com/component-guide/govspeak/highlight_answer/preview

Screen Shot 2019-08-07 at 14 50 02

@alex-ju alex-ju force-pushed the update-to-govuk-frontend-3-0 branch from 6dda899 to 817f8af Compare August 8, 2019 13:55
@bevanloon bevanloon temporarily deployed to govuk-publishing-compo-pr-1010 August 8, 2019 13:55 Inactive
@alex-ju
Copy link
Contributor Author

alex-ju commented Aug 8, 2019

@vanitabarrett Thanks for the review. Tried to address the comments. Do let me know if the review is still in progress.

Do we need to update the govspeak 'highlight answer' to use the green instead of the turquoise?
https://govuk-publishing-compo-pr-1010.herokuapp.com/component-guide/govspeak/highlight_answer/preview

Updated to use the new colour

@andysellick Thanks for the review. Tried to address all the comments (aside from the ones with an associated issue - 🙌 for that). For those comments without a thread I tried to reply below.

The hover + focus state for next/previous navigation could do with a bit of attention...

Updated to preserve the focus state when hovering

Skip link hasn't picked up the new focus style, might be defining it itself?

This is how the component is coming from govuk-frontend. We can propose enhancements upstream or do overwrites if we have good reasons for that.

We might want to tweak the image card component a little... if you focus and hover some of the links, you get a double underline.

Fixed the focus/hover states on image card component

Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀 🎉 ❤️ 🚀

@alex-ju
Copy link
Contributor Author

alex-ju commented Aug 8, 2019

Rebased again before merging. Thanks everyone who commented on this, that helped a lot!

@alex-ju alex-ju merged commit 3431577 into master Aug 8, 2019
@alex-ju alex-ju deleted the update-to-govuk-frontend-3-0 branch August 8, 2019 15:04
@alex-ju alex-ju added this to the 18.0.0 milestone Aug 8, 2019
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.

8 participants