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

Reintroduce additional bottom margin to Error Summary content #5060

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

querkmachine
Copy link
Member

@querkmachine querkmachine commented Jun 10, 2024

Reverses a visual change introduced in #4971 where the negative space at the bottom of the Error Summary component was reduced to create equal padding on all sides of the container.

Although this was originally approved of by a designer on the team, further discussion after the 5.4.0 release concluded that having additional negative space below the Error Summary's content was desirable, as it allowed extra space for text descenders to occupy, if any are present.

This PR reintroduces that space, but does so in a way that's compatible with the new configuration variants made possible by #4971. (Originally, this additional spacing only existed if the errorList parameter was being used, whereas this is no longer a requirement.)

Closes #4997.

@querkmachine querkmachine self-assigned this Jun 10, 2024
Copy link

github-actions bot commented Jun 10, 2024

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.43 KiB
dist/govuk-frontend-development.min.js 41.88 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 87.42 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 82.11 KiB
packages/govuk-frontend/dist/govuk/all.mjs 981 B
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.42 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 41.87 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 4.86 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 79.24 KiB 39.84 KiB
accordion.mjs 23.5 KiB 12.39 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for 9c6828e

@querkmachine querkmachine requested a review from a team June 10, 2024 12:09
Copy link

github-actions bot commented Jun 10, 2024

Stylesheets changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
index de0a3a8db..f0aa66d38 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -3184,6 +3184,10 @@ screen and (forced-colors:active) {
     }
 }
 
+.govuk-error-summary__body>:last-child {
+    margin-bottom: 5px
+}
+
 .govuk-error-summary__list,
 .govuk-error-summary__list li:last-child {
     margin-bottom: 0

Action run for 9c6828e

Copy link

github-actions bot commented Jun 10, 2024

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss b/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss
index 0cb1cc2cc..69bdbaf78 100644
--- a/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/error-summary/_index.scss
@@ -30,6 +30,10 @@
     > * + * {
       @include govuk-responsive-margin(4, "top");
     }
+
+    > :last-child {
+      @include govuk-responsive-margin(1, "bottom");
+    }
   }
 
   // Cross-component class - adjusts styling of list component

Action run for 9c6828e

@querkmachine querkmachine marked this pull request as ready for review June 10, 2024 12:22
Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Code change looks good to me! @mia-allers-gds (or @Ciandelle, @CharlotteDowns) would you be able to give a quick 'designer approved' stamp on this one as well (the value added back is the same as the one that was there before, which was the bottom margin of the list) 😊

@mia-allers-gds
Copy link

@romaricpascal I think it looks good!

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

@romaricpascal I think it looks good!

Let's merge it! ⛵

Reverses a visual change introduced in #4971 where the negative space at the bottom of the Error Summary component was reduced to equalise the container padding on all sides.

Although this was originally approved of by a designer on the team, further discussion after the 5.4.0 release concluded that having additional negative space below the Error Summary's content was desirable, as it gave extra space for text descenders to occupy (if present).
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5060 June 11, 2024 15:28 Inactive
@querkmachine querkmachine merged commit 520f234 into main Jun 11, 2024
48 checks passed
@querkmachine querkmachine deleted the error-summary-spacing-tweak branch June 11, 2024 15:38
@romaricpascal romaricpascal mentioned this pull request Jul 12, 2024
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.

Add margin below final element in the Error Summary
4 participants