From 27e86306fb4cbcf65b5266097403c0be858433a1 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 25 Oct 2023 11:07:37 +0100 Subject: [PATCH 1/5] Fixes from v0.1.22-prerelease --- CHANGELOG.md | 4 ++++ .../components/card/card.scss | 2 ++ .../components/header/header.scss | 4 +++- .../components/index-grid/index-grid.scss | 7 ------ .../components/picture/picture.scss | 8 ------- .../sensitive-image/sensitive-image.scss | 2 -- .../components/tabs/tabs.scss | 1 - .../colour-schemes/colour-schemes.stories.js | 1 + src/nationalarchives/utilities/_lists.scss | 13 ++--------- .../utilities/_typography.scss | 22 +++++++++++++++---- 10 files changed, 30 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99657462..c5ebb339 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated ### Removed ### Fixed + +- Header allows accent colour to be used with `tna-header--accent` +- More consistent spacing between elements + ### Security ## [0.1.22-prerelease](https://github.com/nationalarchives/tna-frontend/compare/v0.1.21-prerelease...v0.1.22-prerelease) - 2023-10-24 diff --git a/src/nationalarchives/components/card/card.scss b/src/nationalarchives/components/card/card.scss index a1c1c07c..d0a0fbee 100644 --- a/src/nationalarchives/components/card/card.scss +++ b/src/nationalarchives/components/card/card.scss @@ -55,6 +55,8 @@ } &__body { + padding-top: 1rem; + order: 3; } diff --git a/src/nationalarchives/components/header/header.scss b/src/nationalarchives/components/header/header.scss index fea0f943..26012d63 100644 --- a/src/nationalarchives/components/header/header.scss +++ b/src/nationalarchives/components/header/header.scss @@ -47,7 +47,9 @@ .tna-header { @include colour.invert; - background-color: colour.brand-colour("black"); + &:not(&--accent) { + background-color: colour.brand-colour("black"); + } .tna-template--system-theme & { @media (prefers-contrast: more) and (prefers-color-scheme: light) { diff --git a/src/nationalarchives/components/index-grid/index-grid.scss b/src/nationalarchives/components/index-grid/index-grid.scss index caba71da..70026e83 100644 --- a/src/nationalarchives/components/index-grid/index-grid.scss +++ b/src/nationalarchives/components/index-grid/index-grid.scss @@ -27,8 +27,6 @@ &__item { @include colour.invert; - // @include colour.colour-font("contrast-font-base"); - height: 100%; display: flex; @@ -45,10 +43,7 @@ &__item-image { width: 100%; - // height: #{math.div(2, 3) * 100%}; height: auto; - - // object-fit: cover; } &__item-content { @@ -64,9 +59,7 @@ } &__item-title { - // @include typography.heading-font; text-decoration: underline; - // @include typography.relative-font-size(20); .tna-index-grid__item:hover & { &, diff --git a/src/nationalarchives/components/picture/picture.scss b/src/nationalarchives/components/picture/picture.scss index 5894c78b..5582c273 100644 --- a/src/nationalarchives/components/picture/picture.scss +++ b/src/nationalarchives/components/picture/picture.scss @@ -10,8 +10,6 @@ @include spacing.space-above; &__image-wrapper { - // padding: 1rem 0; - position: relative; background-color: #f4f4f4; @@ -33,8 +31,6 @@ padding: 1rem 1.5rem; - // @include colour.colour-font("font-base"); - .tna-template--clicked &:focus { outline: none; } @@ -47,10 +43,6 @@ &__caption { padding: 1rem 0; - // position: relative; - - // text-align: center; - @include colour.colour-border("keyline", 1px, solid, bottom); } diff --git a/src/nationalarchives/components/sensitive-image/sensitive-image.scss b/src/nationalarchives/components/sensitive-image/sensitive-image.scss index 6f9954a5..67c306a2 100644 --- a/src/nationalarchives/components/sensitive-image/sensitive-image.scss +++ b/src/nationalarchives/components/sensitive-image/sensitive-image.scss @@ -8,8 +8,6 @@ &__details { position: relative; - // overflow: hidden; - &::after { width: 100%; padding-bottom: calc( diff --git a/src/nationalarchives/components/tabs/tabs.scss b/src/nationalarchives/components/tabs/tabs.scss index dc6fd545..7bfb590f 100644 --- a/src/nationalarchives/components/tabs/tabs.scss +++ b/src/nationalarchives/components/tabs/tabs.scss @@ -33,7 +33,6 @@ @include typography.relative-font-size(20); @include typography.heading-font; text-decoration: none; - // line-height: 1.5; text-align: center; background: transparent; diff --git a/src/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js b/src/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js index 9e660511..b101a13c 100644 --- a/src/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +++ b/src/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js @@ -305,6 +305,7 @@ const Template = ({ theme, accent }) => {

This is a heading (S)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.

+

Large paragraph. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis. Sed odio libero, sodales eleifend lorem sit amet, feugiat consequat nibh.

We are the official archive of England and Wales. Discover 1,000 years of history through fascinating stories from the past or start your own research and search our catalogue of 32 million records. Plan a visit to access original historic documents from our collections then enjoy the grounds, café, and free exhibitions.

diff --git a/src/nationalarchives/utilities/_lists.scss b/src/nationalarchives/utilities/_lists.scss index 96ebf25d..3e827a02 100644 --- a/src/nationalarchives/utilities/_lists.scss +++ b/src/nationalarchives/utilities/_lists.scss @@ -5,7 +5,7 @@ .tna-ul, .tna-ol { - margin: 1rem 0; + margin: 1rem 0 0; padding: 0 0 0 2rem; &:first-child { @@ -25,7 +25,7 @@ } .tna-dl { - margin: 1rem 0; + margin: 1rem 0 0; display: flex; flex-wrap: wrap; @@ -44,7 +44,6 @@ box-sizing: border-box; word-wrap: break-word; - // word-break: break-all; } &--plain { @@ -146,11 +145,6 @@ dd { padding-top: 0; - // padding-left: 2rem; - - + dt { - // @include colour.colour-border("keyline", 1px, solid, top); - } } } @@ -170,9 +164,6 @@ dt, dd { - // padding-left: 0; - // padding-right: 0; - background: transparent !important; @include colour.colour-border("keyline-dark", 1px, solid, top); diff --git a/src/nationalarchives/utilities/_typography.scss b/src/nationalarchives/utilities/_typography.scss index 506e830a..acd0431a 100644 --- a/src/nationalarchives/utilities/_typography.scss +++ b/src/nationalarchives/utilities/_typography.scss @@ -77,11 +77,15 @@ strong { } p { - margin: 1rem 0 0; + margin: 2rem 0 0; &:first-child { margin-top: 0; } + + + p { + margin-top: 1rem + } } a { @@ -249,7 +253,7 @@ a.tna-chip { %headings-and-heading-groups { @include spacing.space-above; - margin-bottom: 1rem; + margin-bottom: 0; padding-top: 1rem; &:first-child { @@ -260,6 +264,10 @@ a.tna-chip { margin-bottom: 0; padding-bottom: 0; } + + + p { + margin-top: 1rem; + } } .tna-heading { @@ -347,14 +355,20 @@ a.tna-chip { } } +.tna-large-paragraph { + @include spacing.space-above; + + @include typography.relative-font-size(20); +} + .tna-scene-setter { + @include spacing.space-above; + @include typography.detail-font; @include colour.colour-font("font-dark"); @include typography.relative-font-size(30); line-height: math.div(50, 30); - @include spacing.space-above; - @include media.on-mobile { @include typography.relative-font-size(24); line-height: 2; From d94824b2b211f5a1b9f0dcb3bdb2b9c8df5816c7 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 25 Oct 2023 11:14:31 +0100 Subject: [PATCH 2/5] Fix linting issues --- src/nationalarchives/components/card/card.scss | 2 +- src/nationalarchives/utilities/_typography.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nationalarchives/components/card/card.scss b/src/nationalarchives/components/card/card.scss index d0a0fbee..e265f7a1 100644 --- a/src/nationalarchives/components/card/card.scss +++ b/src/nationalarchives/components/card/card.scss @@ -56,7 +56,7 @@ &__body { padding-top: 1rem; - + order: 3; } diff --git a/src/nationalarchives/utilities/_typography.scss b/src/nationalarchives/utilities/_typography.scss index acd0431a..f14fb9f8 100644 --- a/src/nationalarchives/utilities/_typography.scss +++ b/src/nationalarchives/utilities/_typography.scss @@ -84,7 +84,7 @@ p { } + p { - margin-top: 1rem + margin-top: 1rem; } } From 42dfcca9bf00b927e03310625ecb0387abf501cb Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 25 Oct 2023 11:15:06 +0100 Subject: [PATCH 3/5] Fix linting issues --- src/nationalarchives/utilities/_typography.scss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nationalarchives/utilities/_typography.scss b/src/nationalarchives/utilities/_typography.scss index f14fb9f8..a420f55b 100644 --- a/src/nationalarchives/utilities/_typography.scss +++ b/src/nationalarchives/utilities/_typography.scss @@ -79,13 +79,13 @@ strong { p { margin: 2rem 0 0; - &:first-child { - margin-top: 0; - } - + p { margin-top: 1rem; } + + &:first-child { + margin-top: 0; + } } a { From ff248075253e31e5e0ee32915f8bdd8ad2344d4d Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 25 Oct 2023 11:16:23 +0100 Subject: [PATCH 4/5] Don't run concurrent CI tests --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5226cccc..074b9323 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,10 @@ on: branches: - '**' +concurrency: + group: tests-${{ github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest From 551a8cd8d5798205327470be96ed63bbe3a884d8 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 25 Oct 2023 11:29:07 +0100 Subject: [PATCH 5/5] Ready v0.1.23-prerelease --- CHANGELOG.md | 10 +++++++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ebb339..f241befc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,19 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/nationalarchives/tna-frontend/compare/v0.1.22-prerelease...HEAD) +## [Unreleased](https://github.com/nationalarchives/tna-frontend/compare/v0.1.23-prerelease...HEAD) ### Added ### Changed ### Deprecated ### Removed +### Fixed +### Security + + +## [0.1.23-prerelease](https://github.com/nationalarchives/tna-frontend/compare/v0.1.22-prerelease...v0.1.23-prerelease) - 2023-10-25 + ### Fixed - Header allows accent colour to be used with `tna-header--accent` - More consistent spacing between elements -### Security - ## [0.1.22-prerelease](https://github.com/nationalarchives/tna-frontend/compare/v0.1.21-prerelease...v0.1.22-prerelease) - 2023-10-24 ### Added diff --git a/package-lock.json b/package-lock.json index 55bc6140..ca9a94c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nationalarchives/frontend", - "version": "0.1.22-prerelease", + "version": "0.1.23-prerelease", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nationalarchives/frontend", - "version": "0.1.22-prerelease", + "version": "0.1.23-prerelease", "license": "MIT", "devDependencies": { "@babel/core": "^7.22.10", diff --git a/package.json b/package.json index b64cc73a..5768ff60 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nationalarchives/frontend", - "version": "0.1.22-prerelease", + "version": "0.1.23-prerelease", "description": "The National Archives frontend styles", "scripts": { "start": "storybook dev -p 6006",