Skip to content

Commit

Permalink
Merge pull request #826 from nhsuk/feature/textarea-error-focus-height
Browse files Browse the repository at this point in the history
Reduce form input error borders to 2px, matching govuk - fixes bug with moving text in inputs / textareas
  • Loading branch information
wa-rren-dev authored Aug 8, 2022
2 parents af013aa + ec56ae1 commit 568737d
Show file tree
Hide file tree
Showing 44 changed files with 33 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# NHS.UK frontend Changelog

## Unreleased

:wrench: **Fixes**

- Reduce input and textarea error border widths to eliminate text movement / dimension changes when focusing and unfocusing a field with an error ([Issue 825](https://github.com/nhsuk/nhsuk-frontend/issues/825)), ([PR 826](https://github.com/nhsuk/nhsuk-frontend/pull/826)).

## 6.1.1 - 13 June 2022

:wrench: **Fixes**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"backstop:ci": "start-server-and-test start http://0.0.0.0:3000 backstop:citest",
"backstop:citest": "backstop --config=./tests/backstop/backstop.js test --docker",
"backstop:approve": "backstop --config=./tests/backstop/backstop.js approve",
"backstop:clean": "rm -rf tests/backstop/bitmaps_test/*",
"backstop:clean": "rm -rf tests/backstop/bitmaps_test/* && rm -rf tests/backstop/html_report",
"build-gh-pages": "gulp bundle && BASE_URL='/nhsuk-frontend/' gulp docs:build",
"build-gh-release": "gulp zip",
"jest:dev": "jest --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/settings/_globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ $nhsuk-header-spacing: 20px;
//

$nhsuk-border-width-form-element: 2px !default;
$nhsuk-border-width-form-element-error: 4px !default;
$nhsuk-border-width-form-element-error: 2px !default;
$nhsuk-focus-width: 4px !default;
$nhsuk-border-width: 4px !default;
$nhsuk-border-width-mobile: 4px !default;
Expand Down
25 changes: 25 additions & 0 deletions tests/backstop/backstop.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ module.exports = {
label: 'Checkboxes with error message',
url: `${TEST_URL}/checkboxes/error.html`,
},
{
label: 'Checkboxes with error message - focused',
url: `${TEST_URL}/checkboxes/error.html`,
clickSelector: '#waste-1',
},
{
label: 'Checkboxes with conditional content',
url: `${TEST_URL}/checkboxes/conditional.html`,
Expand Down Expand Up @@ -312,6 +317,11 @@ module.exports = {
label: 'Input with error message',
url: `${TEST_URL}/input/error.html`,
},
{
label: 'Input with error message - focused',
url: `${TEST_URL}/input/error.html`,
clickSelector: '#input-with-error-message',
},
{
label: 'Input with width modifier',
url: `${TEST_URL}/input/custom-width.html`,
Expand Down Expand Up @@ -364,6 +374,11 @@ module.exports = {
label: 'Radios with hint text and error message',
url: `${TEST_URL}/radios/hint-error.html`,
},
{
label: 'Radios with hint text and error message - focused',
url: `${TEST_URL}/radios/hint-error.html`,
clickSelector: '#example-2',
},
{
label: 'Radios with conditional content',
url: `${TEST_URL}/radios/conditional.html`,
Expand All @@ -377,6 +392,11 @@ module.exports = {
label: 'Select with hint text and error message',
url: `${TEST_URL}/select/hint-error.html`,
},
{
label: 'Select with hint text and error message - focused',
url: `${TEST_URL}/select/hint-error.html`,
clickSelector: '[for=select-2]',
},
{
label: 'Summary list',
url: `${TEST_URL}/summary-list/index.html`,
Expand Down Expand Up @@ -413,6 +433,11 @@ module.exports = {
label: 'Textarea with error message',
url: `${TEST_URL}/textarea/error.html`,
},
{
label: 'Textarea with error message - focused',
url: `${TEST_URL}/textarea/error.html`,
clickSelector: '#no-ni-reason',
},
{
label: 'Warning callout',
url: `${TEST_URL}/warning-callout/index.html`,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 568737d

Please sign in to comment.