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 govuk_elements to version 2.2.1 #701

Merged
merged 3 commits into from
Dec 5, 2016
Merged

Conversation

Guntrisoft
Copy link
Contributor

@Guntrisoft Guntrisoft commented Dec 2, 2016

Forms with radio buttons before
screen shot 2016-12-02 at 16 58 55

Forms with radio buttons after
screen shot 2016-12-02 at 17 00 07

Blog post explaining the change of style for radio/checkboxes
https://designnotes.blog.gov.uk/2016/11/30/weve-updated-the-radios-and-checkboxes-on-gov-uk/

  • made some minor adjustments to form to look good with
    new radio/checkbox styles
  • removed field_with_errors wrapping div which
    conflicts with new radio/checkbox JS modules

Full list of changes:

Remove the images path override from the helpers partial
alphagov/govuk_elements#292

Bump govuk frontend toolkit to 4.16.1
alphagov/govuk_elements#288

Form validation patterns for conditionally revealing content
alphagov/govuk_elements#286

Centre text on full-width buttons
alphagov/govuk_elements#289

Lint JS code using StandardJS
alphagov/govuk_elements#290

Update govuk_frontend_toolkit to 5.0.0 and govuk_template to 0.19.0
alphagov/govuk_elements#333

Add a select box example
alphagov/govuk_elements#303

Add bullet points describing use of disabled buttons
alphagov/govuk_elements#304

Add reasoning for native over custom file inputs

Clear floats on details elements
alphagov/govuk_elements#328

Add a .bold utility class
alphagov/govuk_elements#321

Remove external link styles
alphagov/govuk_elements#274

Remove rounded corners on form inputs elements and textareas in iOS
alphagov/govuk_elements#342

Fix focus outline on form fields in Chrome / Safari
alphagov/govuk_elements#346

Updates the contribution guidelines
alphagov/govuk_elements#339

Recommend .visually-hidden over .visuallyhidden
alphagov/govuk_elements#341

Add snippets for data visualisation examples
alphagov/govuk_elements#350
alphagov/govuk_elements#351

Fix the grey left hand border example for Radios and checkboxes
alphagov/govuk_elements#349

Fix the spacing underneath the "inline" block label example
alphagov/govuk_elements#348

Custom radios / checkboxes
alphagov/govuk_elements#296

Fix contrast issues with phase banners. Use $govuk-blue for the phase tag and update the examples
alphagov/govuk_elements#364

@Guntrisoft
Copy link
Contributor Author

@benbarnett @AndrewVos Give this a quick review once again, now that various test issues have been fixed

$(function() {
'use strict';

jQuery.fx.off = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it

@@ -23,5 +23,9 @@ class Application < Rails::Application
config.middleware.use BounceBrowserconfig

config.mount_javascript_test_routes = false

config.action_view.field_error_proc = proc { |html_tag, _|
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be worth breaking into it's own commit to help explain what it does and why the change was made?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a bit more of a 'why this was changed' thing to that commit msg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry! - done!

@@ -20,5 +20,17 @@ class BookingStepTwo < SitePrism::Page

element :submit, '.t-submit'
element :back, '.t-back'

def check_hidden_checkbox(element, check)
Copy link
Contributor

Choose a reason for hiding this comment

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

As these radio buttons & checkboxes will be used everywhere now (e.g. the 'appointment summary page'), can these methods live somewhere more global?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Guntrisoft Guntrisoft force-pushed the update_govuk_elements branch 2 times, most recently from 0ac85d2 to 518d980 Compare December 5, 2016 12:04
- made some minor adjustments to form to look good with
  new radio/checkbox styles

Full list of changes:

Remove the images path override from the helpers partial
alphagov/govuk_elements#292

Bump govuk frontend toolkit to 4.16.1
alphagov/govuk_elements#288

Form validation patterns for conditionally revealing content
alphagov/govuk_elements#286

Centre text on full-width buttons
alphagov/govuk_elements#289

Lint JS code using StandardJS
alphagov/govuk_elements#290

Update govuk_frontend_toolkit to 5.0.0 and govuk_template to 0.19.0
alphagov/govuk_elements#333

Add a select box example
alphagov/govuk_elements#303

Add bullet points describing use of disabled buttons
alphagov/govuk_elements#304

Add reasoning for native over custom file inputs

Clear floats on details elements
alphagov/govuk_elements#328

Add a .bold utility class
alphagov/govuk_elements#321

Remove external link styles
alphagov/govuk_elements#274

Remove rounded corners on form inputs elements and textareas in iOS
alphagov/govuk_elements#342

Fix focus outline on form fields in Chrome / Safari
alphagov/govuk_elements#346

Updates the contribution guidelines
alphagov/govuk_elements#339

Recommend .visually-hidden over .visuallyhidden
alphagov/govuk_elements#341

Add snippets for data visualisation examples
alphagov/govuk_elements#350
alphagov/govuk_elements#351

Fix the grey left hand border example for Radios and checkboxes
alphagov/govuk_elements#349

Fix the spacing underneath the "inline" block label example
alphagov/govuk_elements#348

Custom radios / checkboxes
alphagov/govuk_elements#296

Fix contrast issues with phase banners. Use $govuk-blue for the phase tag and update the examples
alphagov/govuk_elements#364
- input is no longer clickable through Capybara with new style
  radio/checkboxes as they have opacity: 0
- these methods use trigger('click') to hit the labels
  associated with the inputs
- corrected other SitePrism objects to inherit from 'Page'
  object to be consistent with others
- the field_with_errors div was causing an issue with the
  javascript for the new GOVUK style radio/checkboxes
  and was therefore not highlighting element which had
  an error in a form
@Guntrisoft Guntrisoft force-pushed the update_govuk_elements branch from 518d980 to 3171fce Compare December 5, 2016 12:25
Copy link
Contributor

@benbarnett benbarnett left a comment

Choose a reason for hiding this comment

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

Big fan of this PR

@Guntrisoft Guntrisoft merged commit 824d0e3 into master Dec 5, 2016
@Guntrisoft Guntrisoft deleted the update_govuk_elements branch December 5, 2016 12:30
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.

2 participants