From e32a714ed2628fd30efc936e22cff41af905772e Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Mon, 30 Sep 2024 18:21:09 +0200 Subject: [PATCH 01/17] define schema for footer content --- src/custom/docs/components/footer/footer.schema.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/custom/docs/components/footer/footer.schema.tsx diff --git a/src/custom/docs/components/footer/footer.schema.tsx b/src/custom/docs/components/footer/footer.schema.tsx new file mode 100644 index 0000000..7b682b9 --- /dev/null +++ b/src/custom/docs/components/footer/footer.schema.tsx @@ -0,0 +1,13 @@ +import { z } from 'zod'; + + +const ItemsSchema = z.object({ + name: z.string(), + href: z.string() +}) + + +export const FooterSchema = z.object({ + "title": z.string(), + "items": z.array(ItemsSchema) +}) From f9de06c4ac2a9d5e8688240c4b250494f5ce18d0 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Mon, 30 Sep 2024 18:21:16 +0200 Subject: [PATCH 02/17] textual footer content --- src/custom/docs/components/footer/text.json | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/custom/docs/components/footer/text.json diff --git a/src/custom/docs/components/footer/text.json b/src/custom/docs/components/footer/text.json new file mode 100644 index 0000000..a1d6bde --- /dev/null +++ b/src/custom/docs/components/footer/text.json @@ -0,0 +1,38 @@ +[ + { + "name": "Products", + "items": [ + { + "name": "H-Series", + "href": "https://docs.quantinuum.com/h-series" + }, + { + "name": "Nexus", + "href": "https://docs.quantinuum.com/nexus" + }, + { + "name": "InQuanto", + "href": "https://docs.quantinuum.com/inquanto" + } + ] + }, { + "name": "Opensource", + "items": [ + { + "name": "TKET", + "href": "https://docs.quantinuum.com/tket" + }, + { + "name": "\u03BBambeq", + "href": "https://docs.quantinuum.com/lambeq" + } + ] + },{ + "name": "Quantinuum", + "items": { + "About": "https://www.quantinuum.com/about", + "Careers": "https://www.quantinuum.com/publications", + "Events": "https://www.quantinuum.com/events" + } + } +] \ No newline at end of file From fa8a4833a5b0c2403ddb06d5f05fe46a22a98a33 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Mon, 30 Sep 2024 18:21:39 +0200 Subject: [PATCH 03/17] parse footercontent and map to typescript function --- src/custom/docs/components/footer/index.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index ff14355..105c345 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -1,12 +1,11 @@ import { QuantinuumLogo } from "../../QuantinuumLogo"; import { Separator } from "src"; -export const Footer = (props: { subtitle: string, columns: { - title: string; - items: { - name: string; - href: string; - }[]; -}[] }) => { +import { FooterSchema } from "./footer.schema"; +import text from "./text.json" + +const FooterContent = FooterSchema.parse(text); + +export const Footer = () => { return (
@@ -30,7 +29,7 @@ export const Footer = (props: { subtitle: string, columns: {
- {props.columns.map((col) => { + {FooterContent.map((col) => { return (
From 71b7c825d776106e5cfda1537d2529526e86207e Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Mon, 30 Sep 2024 18:41:12 +0200 Subject: [PATCH 04/17] move Footer Schema and Content into index.tsx --- src/custom/docs/components/footer/index.tsx | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index 105c345..9306834 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -5,6 +5,55 @@ import text from "./text.json" const FooterContent = FooterSchema.parse(text); +const FooterConfig = { + columns: [ + { + name: "Products", + items: [ + { + name: "H-Series", + href: "https://docs.quantinuum.com/h-series" + }, + { + name: "Nexus", + href: "https://docs.quantinuum.com/nexus" + }, + { + name: "InQuanto", + href: "https://docs.quantinuum.com/inquanto" + } + ] + }, { + name: "Opensource", + items: [ + { + name: "TKET", + href: "https://docs.quantinuum.com/tket" + }, + { + name: "\u03BBambeq", + href: "https://docs.quantinuum.com/lambeq" + } + ] + },{ + name: "Quantinuum", + items: [ + { + name: "About", + href: "https://www.quantinuum.com/about", + }, { + name: "Careers", + href: "https://www.quantinuum.com/publications", + },{ + name: "Events", + href: "https://www.quantinuum.com/events" + } + ] + } + ], + subtitle: "", +} + export const Footer = () => { return (
From 693031eb1c93f989120725ee79f9546f6e935212 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Mon, 30 Sep 2024 18:41:41 +0200 Subject: [PATCH 05/17] correct indentation --- src/custom/docs/components/footer/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index 9306834..bf0997b 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -8,7 +8,7 @@ const FooterContent = FooterSchema.parse(text); const FooterConfig = { columns: [ { - name: "Products", + name: "Products", items: [ { name: "H-Series", From 816462413045eddf345967b3153033777de78893 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Mon, 30 Sep 2024 18:44:19 +0200 Subject: [PATCH 06/17] remove redundant code --- src/custom/docs/components/footer/index.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index bf0997b..b45d1ae 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -1,9 +1,5 @@ import { QuantinuumLogo } from "../../QuantinuumLogo"; import { Separator } from "src"; -import { FooterSchema } from "./footer.schema"; -import text from "./text.json" - -const FooterContent = FooterSchema.parse(text); const FooterConfig = { columns: [ From 774acd56d64bf44f662e6bb52dd3dfc826d080b2 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Mon, 30 Sep 2024 18:45:03 +0200 Subject: [PATCH 07/17] use footerConfig within TSX function --- src/custom/docs/components/footer/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index b45d1ae..f7e028a 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -1,7 +1,7 @@ import { QuantinuumLogo } from "../../QuantinuumLogo"; import { Separator } from "src"; -const FooterConfig = { +const footerConfig = { columns: [ { name: "Products", @@ -74,7 +74,7 @@ export const Footer = () => {
- {FooterContent.map((col) => { + {footerConfig.map((col) => { return (
From 4478a0e4338cf6aa3857a31823d8dd5a43e1ba82 Mon Sep 17 00:00:00 2001 From: irfankhan10 Date: Tue, 1 Oct 2024 16:08:33 +0100 Subject: [PATCH 08/17] Delete src/custom/docs/components/footer/text.json delete unneeded text.json --- src/custom/docs/components/footer/text.json | 38 --------------------- 1 file changed, 38 deletions(-) delete mode 100644 src/custom/docs/components/footer/text.json diff --git a/src/custom/docs/components/footer/text.json b/src/custom/docs/components/footer/text.json deleted file mode 100644 index a1d6bde..0000000 --- a/src/custom/docs/components/footer/text.json +++ /dev/null @@ -1,38 +0,0 @@ -[ - { - "name": "Products", - "items": [ - { - "name": "H-Series", - "href": "https://docs.quantinuum.com/h-series" - }, - { - "name": "Nexus", - "href": "https://docs.quantinuum.com/nexus" - }, - { - "name": "InQuanto", - "href": "https://docs.quantinuum.com/inquanto" - } - ] - }, { - "name": "Opensource", - "items": [ - { - "name": "TKET", - "href": "https://docs.quantinuum.com/tket" - }, - { - "name": "\u03BBambeq", - "href": "https://docs.quantinuum.com/lambeq" - } - ] - },{ - "name": "Quantinuum", - "items": { - "About": "https://www.quantinuum.com/about", - "Careers": "https://www.quantinuum.com/publications", - "Events": "https://www.quantinuum.com/events" - } - } -] \ No newline at end of file From a38ca41741bf5465dda9ac0b13cfe57a9f513f4a Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Thu, 3 Oct 2024 15:02:55 +0100 Subject: [PATCH 09/17] delete redundent file --- src/custom/docs/components/footer/footer.schema.tsx | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/custom/docs/components/footer/footer.schema.tsx diff --git a/src/custom/docs/components/footer/footer.schema.tsx b/src/custom/docs/components/footer/footer.schema.tsx deleted file mode 100644 index 7b682b9..0000000 --- a/src/custom/docs/components/footer/footer.schema.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { z } from 'zod'; - - -const ItemsSchema = z.object({ - name: z.string(), - href: z.string() -}) - - -export const FooterSchema = z.object({ - "title": z.string(), - "items": z.array(ItemsSchema) -}) From 1c7d0e15e8c6a8bbdf4bff98c1a5959ad5d28f69 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Thu, 3 Oct 2024 15:03:30 +0100 Subject: [PATCH 10/17] remove {props.subtitle} and add Trademark Guidelines --- src/custom/docs/components/footer/index.tsx | 38 ++++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index f7e028a..34f28d5 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -7,28 +7,28 @@ const footerConfig = { name: "Products", items: [ { - name: "H-Series", - href: "https://docs.quantinuum.com/h-series" - }, + name: "H-Series", + href: "https://docs.quantinuum.com/h-series" + }, { - name: "Nexus", - href: "https://docs.quantinuum.com/nexus" + name: "Nexus", + href: "https://docs.quantinuum.com/nexus" }, { - name: "InQuanto", - href: "https://docs.quantinuum.com/inquanto" + name: "InQuanto", + href: "https://docs.quantinuum.com/inquanto" } ] }, { name: "Opensource", items: [ { - name: "TKET", - href: "https://docs.quantinuum.com/tket" + name: "TKET", + href: "https://docs.quantinuum.com/tket" }, { - name: "\u03BBambeq", - href: "https://docs.quantinuum.com/lambeq" + name: "\u03BBambeq", + href: "https://docs.quantinuum.com/lambeq" } ] },{ @@ -67,10 +67,22 @@ export const Footer = () => {

Copyright © {new Date().getFullYear()} Quantinuum Inc. All rights reserved.{' '} -
{props.subtitle}

+
From 1204910077fbcb12b82411c0e5af5b9c2240ca7f Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Thu, 3 Oct 2024 15:06:02 +0100 Subject: [PATCH 11/17] Add forward slash after second legal entry --- src/custom/docs/components/footer/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index 34f28d5..2e4cfda 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -74,7 +74,7 @@ export const Footer = () => {
/
Privacy Policy - +
/
From c35745fe4946cc7d6667c56e29cec87b1760b000 Mon Sep 17 00:00:00 2001 From: aidanCQ Date: Thu, 3 Oct 2024 15:16:55 +0100 Subject: [PATCH 12/17] Add lint to ci. --- .github/workflows/pre-release.yml | 1 + .github/workflows/release.yml | 1 + package.json | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 0dd7528..d13346b 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -18,6 +18,7 @@ jobs: node-version: 20 cache: 'npm' - run: npm ci + - run: npm run lint - run: npm run build - run: npx semantic-release env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3e673b..ce72c36 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: node-version: 20 cache: 'npm' - run: npm ci + - run: npm run lint - run: npm run build && npm run build-storybook - name: Upload artifact. diff --git a/package.json b/package.json index 6954c63..0134d58 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "scripts": { "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", + "lint": "tsc", "build": "rm -rf ./dist && rollup -c" }, "release": { From 60c1a3a95ba3594f1fff206bac7019dc43687991 Mon Sep 17 00:00:00 2001 From: aidanCQ Date: Thu, 3 Oct 2024 15:17:00 +0100 Subject: [PATCH 13/17] Fix type errors. --- src/custom/docs/components/footer/index.tsx | 6 +- stories/custom/docs-footer.stories.tsx | 64 +-------------------- 2 files changed, 4 insertions(+), 66 deletions(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index 2e4cfda..4ba7b31 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -86,11 +86,11 @@ export const Footer = () => {
- {footerConfig.map((col) => { + {footerConfig.columns.map((col) => { return ( -
+
- {col.title} + {col.name}
    {col.items.map((item) => { diff --git a/stories/custom/docs-footer.stories.tsx b/stories/custom/docs-footer.stories.tsx index 26b2d1f..38d6759 100644 --- a/stories/custom/docs-footer.stories.tsx +++ b/stories/custom/docs-footer.stories.tsx @@ -1,71 +1,9 @@ import { Meta, StoryObj } from "@storybook/react"; import {DocsFooter } from "src"; -import { QuantinuumLogo } from "src/custom/docs/QuantinuumLogo"; - const footerConfig = { - logo: , - columns: [ - { - title: 'Solutions', - items: [ - { - href: 'https://docs.quantinuum.com/nexus/index.html', - name: 'Quantinuum Nexus', - }, - { - href: 'https://docs.quantinuum.com/inquanto/index.html', - name: 'Inquanto', - }, - { - href: 'https://tket.quantinuum.com/', - name: 'TKET', - }, - { - href: 'https://docs.quantinuum.com/lambeq', - name: 'Lambeq', - }, - ], - }, - { - title: 'Hardware', - items: [ - { - href: 'https://docs.quantinuum.com/h-series/index.html', - name: 'System Model H1', - }, - { - href: 'https://docs.quantinuum.com/h-series/index.html', - name: 'System Model H2', - }, - { - href: 'https://www.quantinuum.com/hardware#access', - name: 'Get Access', - }, - ], - }, - { - title: 'What We Do?', - items: [ - { - href: 'https://www.quantinuum.com/about', - name: 'About Quantinuum', - }, - { - href: '"https://www.quantinuum.com/publications', - name: 'Research', - }, - { - href: 'https://www.quantinuum.com/events', - name: 'Events', - }, - ], - }, - ], - subtitle: '', - } export function DocsNavDemo() { - return ; + return ; } const meta: Meta = { From 34f9064b02acc337acd6d1fdb995d83c40cc4899 Mon Sep 17 00:00:00 2001 From: aidanCQ Date: Thu, 3 Oct 2024 15:17:58 +0100 Subject: [PATCH 14/17] Remove domain from intralinks. --- src/custom/docs/components/footer/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index 4ba7b31..814502d 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -8,15 +8,15 @@ const footerConfig = { items: [ { name: "H-Series", - href: "https://docs.quantinuum.com/h-series" + href: "/h-series" }, { name: "Nexus", - href: "https://docs.quantinuum.com/nexus" + href: "/nexus" }, { name: "InQuanto", - href: "https://docs.quantinuum.com/inquanto" + href: "/inquanto" } ] }, { @@ -24,11 +24,11 @@ const footerConfig = { items: [ { name: "TKET", - href: "https://docs.quantinuum.com/tket" + href: "/tket" }, { name: "\u03BBambeq", - href: "https://docs.quantinuum.com/lambeq" + href: "/lambeq" } ] },{ From d203c5eb9c1e547d55fd836c7488ed52490cd5c4 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Thu, 3 Oct 2024 15:18:48 +0100 Subject: [PATCH 15/17] remove unneeded subtitle --- src/custom/docs/components/footer/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index 2e4cfda..f0882db 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -47,7 +47,6 @@ const footerConfig = { ] } ], - subtitle: "", } export const Footer = () => { From ed1e978be8004bcc246cc48bb3a467539fab86f3 Mon Sep 17 00:00:00 2001 From: Irfan Khan Date: Thu, 3 Oct 2024 15:19:44 +0100 Subject: [PATCH 16/17] change title to name and specify column as property of FooterConfig --- src/custom/docs/components/footer/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index f0882db..6423426 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -85,11 +85,11 @@ export const Footer = () => {
- {footerConfig.map((col) => { + {footerConfig.columns.map((col) => { return ( -
+
- {col.title} + {col.name}