Skip to content

Commit

Permalink
Remove loads of comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Nov 21, 2023
1 parent 440bc08 commit 345b0b2
Show file tree
Hide file tree
Showing 29 changed files with 54 additions and 304 deletions.
5 changes: 1 addition & 4 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import "../src/nationalarchives/all.scss";
import { a11yConfig } from "./storybook-config";
import { customViewports } from "./viewports";
import Cookies from "../src/nationalarchives/lib/cookies.mjs";
// import isChromatic from "chromatic/isChromatic";

document.documentElement.classList.add(
"tna-template",
Expand All @@ -14,9 +13,7 @@ if (window.self !== window.top) {
document.body.classList.add("tna-template__body");

export const parameters = {
actions: {
// disable: true,
},
actions: {},
viewport: { viewports: customViewports },
options: { showPanel: true },
a11y: {
Expand Down
2 changes: 0 additions & 2 deletions .storybook/storybook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,5 @@
padding-left: 0.5rem;

@include colour.colour-background("background-tint");

// @include colour.colour-border("keyline", 1px, solid, top);
}
}
42 changes: 0 additions & 42 deletions .storybook/viewports.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
export const customViewports = {
// ...MINIMAL_VIEWPORTS,
// largeMin: {
// name: "Smallest large device",
// styles: {
// width: "1025px",
// height: "800px",
// },
// },
// mediumMax: {
// name: "Largest medium device",
// styles: {
// width: "1024px",
// height: "800px",
// },
// },
// mediumMin: {
// name: "Smallest medium device",
// styles: {
// width: "769px",
// height: "800px",
// },
// },
// smallMax: {
// name: "Largest small device",
// styles: {
// width: "768px",
// height: "800px",
// },
// },
// smallMin: {
// name: "Smallest small device",
// styles: {
// width: "481px",
// height: "800px",
// },
// },
// tinyMax: {
// name: "Largest tiny device",
// styles: {
// width: "480px",
// height: "800px",
// },
// },
medium: {
name: "Medium device",
styles: {
Expand Down
11 changes: 0 additions & 11 deletions src/nationalarchives/all.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ window.addEventListener("touchstart", onFirstTouch);
window.addEventListener("keydown", onKeyDown);
window.addEventListener("mousedown", onMouseDown);

// if (document.documentElement.classList.contains("tna-template--system-theme")) {
// document.documentElement.classList.add(
// window.matchMedia("(prefers-color-scheme: dark)").matches
// ? "tna-template--dark-theme"
// : "tna-template--light-theme",
// );
// if (window.matchMedia("(prefers-contrast: more)").matches) {
// document.documentElement.classList.add("tna-template--high-contrast-theme");
// }
// }

const initAll = (options) => {
options = typeof options !== "undefined" ? options : {};
const $scope =
Expand Down
10 changes: 0 additions & 10 deletions src/nationalarchives/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@

@include colour.colour-border("button-background", 0.25rem);

// transition:
// color 200ms,
// background-color 200ms,
// border-color 200ms;

cursor: pointer;

&,
Expand All @@ -48,11 +43,6 @@
text-decoration: none;

background: transparent;

// transition:
// color 50ms,
// background-color 50ms,
// border-color 50ms;
}

&--plain {
Expand Down
17 changes: 0 additions & 17 deletions src/nationalarchives/components/card/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@
}

&__meta {
// margin: 0;
// padding: 0;

display: flex;
flex-wrap: wrap;
gap: 0.5rem 1.5rem;
Expand All @@ -72,20 +69,6 @@

list-style: none;

// &-item {
// display: flex;
// align-items: center;

// @include colour.colour-font("font-dark");
// @include typography.detail-font-small;

// .fa-solid {
// margin-right: 0.75rem;

// @include colour.colour-font("icon-light");
// }
// }

+ p {
margin-top: 1rem;
}
Expand Down
8 changes: 0 additions & 8 deletions src/nationalarchives/components/checkboxes/checkboxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
@use "../../utilities";

.tna-checkboxes {
// margin-top: 1rem;

display: flex;
flex-direction: column;
align-items: flex-start;
Expand Down Expand Up @@ -75,9 +73,6 @@
left: 1rem;
z-index: 2;

// @include colour.colour-border("input-foreground", 0, solid);
// border-width: 0 0 forms.$checkbox-checkmark-width
// forms.$checkbox-checkmark-width;
@include colour.colour-border("input-background", 0, solid);
border-width: 0 0 forms.$checkbox-checkmark-width
forms.$checkbox-checkmark-width;
Expand Down Expand Up @@ -107,10 +102,7 @@
height: 0.375rem;
margin-top: -0.125rem;

/* stylelint-disable-next-line number-max-precision */
// top: 0.46875rem;
top: 0.75rem;
// left: 0.375rem;
left: 0.75rem;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

.tna-date-search {
max-width: 100%;
// margin-top: 1rem;
padding: 0 0.375rem;

display: block;
Expand Down
8 changes: 0 additions & 8 deletions src/nationalarchives/components/filters/filters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@

border-radius: 99rem;

// transition:
// color 200ms,
// background-color 200ms;

&,
&:link,
&:visited {
Expand All @@ -44,10 +40,6 @@
color: #fff;

background-color: #004c7e;

// transition:
// color 50ms,
// background-color 50ms;
}
}
}
11 changes: 0 additions & 11 deletions src/nationalarchives/components/gallery/gallery.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

&__items {
width: 100%;
// padding-top: 2rem;

display: flex;
flex-direction: column;
Expand Down Expand Up @@ -106,23 +105,13 @@

@include colour.on-high-contrast {
&__items {
// padding-top: 2rem;
}

&__item {
// padding-bottom: 2rem;

// @include colour.colour-border("keyline-dark", 1px);

&-index {
// padding-top: 0.5rem;
}

&-description {
// margin-bottom: 2rem;
// padding: 0 1rem 1rem;

// border: none;
}
}
}
Expand Down
18 changes: 8 additions & 10 deletions src/nationalarchives/components/gallery/gallery.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Gallery from "./template.njk";
import macroOptions from "./macro-options.json";
// import { expect } from "@storybook/jest";
// import { within, userEvent } from "@storybook/testing-library";

const argTypes = {
heading: { control: "object" },
Expand Down Expand Up @@ -62,14 +60,14 @@ Standard.args = {
},
]
: index === 1
? [
{
id: "tab-1",
title: "Transcript",
body: "<p>TEST TRANSCRIPT</p>",
},
]
: null,
? [
{
id: "tab-1",
title: "Transcript",
body: "<p>TEST TRANSCRIPT</p>",
},
]
: null,
})),

classes: "tna-gallery--demo",
Expand Down
21 changes: 9 additions & 12 deletions src/nationalarchives/components/header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@

@include colour.colour-background("font-dark");

transition: height 1ms 100ms;
// transition: height 1ms 100ms;

&::before,
&::after {
Expand All @@ -183,10 +183,10 @@

background-color: inherit;

transition:
top 100ms 100ms,
bottom 100ms 100ms,
transform 100ms;
// transition:
// top 100ms 100ms,
// bottom 100ms 100ms,
// transform 100ms;

content: "";
}
Expand Down Expand Up @@ -225,10 +225,10 @@

&::before,
&::after {
transition:
top 100ms,
bottom 100ms,
transform 100ms 100ms;
// transition:
// top 100ms,
// bottom 100ms,
// transform 100ms 100ms;
}

&::before {
Expand Down Expand Up @@ -264,8 +264,6 @@
justify-content: flex-end;
gap: 0.5rem 1.5rem;

// order: 1;

list-style: none;

line-height: 1;
Expand Down Expand Up @@ -387,7 +385,6 @@

&__navigation-toggle {
&.tna-column {
// padding-right: gridVars.$gutter-width-tiny;
padding-left: 0;
}
}
Expand Down
41 changes: 0 additions & 41 deletions src/nationalarchives/components/header/header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,44 +210,3 @@ Mobile.play = async ({ args, canvasElement, step }) => {

$navigationToggle.blur();
};

// export const NoJavascript = Template.bind({});
// NoJavascript.args = {
// navigation: [
// {
// text: "Alpha",
// href: "#/alpha",
// selected: true,
// },
// {
// text: "Beta",
// href: "#/beta",
// },
// {
// text: "Gamma",
// href: "#/gamma",
// },
// ],
// classes: "tna-header--demo",
// };
// NoJavascript.play = async ({ args, canvasElement, step }) => {
// document.documentElement.classList.remove("tna-template--js-enabled");
// canvasElement.innerHTML = canvasElement.innerHTML;
// const $navigationToggleWrapper = canvasElement.querySelector(
// `.tna-header__navigation-toggle`,
// );
// $navigationToggleWrapper.innerHTML = "";

// const canvas = within(canvasElement);

// // const $navigationItems = canvasElement.querySelector(
// // `.tna-header__navigation-items`,
// // );
// // const [$linkA, $linkB, $linkC] = args.navigation.map((navigationItem) =>
// // canvas.getByText(navigationItem.text),
// // );
// // await expect($navigationItems).toBeVisible();
// // await expect($linkA).toBeVisible();
// // await expect($linkB).toBeVisible();
// // await expect($linkC).toBeVisible();
// };
7 changes: 1 addition & 6 deletions src/nationalarchives/components/message/message.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@

color: colour.brand-colour("black");

@include colour.colour-background("keyline");

@include colour.colour-border("keyline-dark", 0.5rem, solid, left);

// &--yellow {
background-color: colour.brand-colour("cream");

@include colour.colour-border("keyline-dark", 0.5rem, solid, left);
border-left-color: colour.brand-colour("yellow");
// }

&__icon {
margin-right: 1rem;
Expand Down
Loading

0 comments on commit 345b0b2

Please sign in to comment.