From 9b79b4e34ced01616e4839ae5fdb718f83f19d98 Mon Sep 17 00:00:00 2001 From: irfankhan10 Date: Thu, 3 Oct 2024 15:47:04 +0100 Subject: [PATCH] feat(): global hardcoded docs footer (#26) * define schema for footer content * textual footer content * parse footercontent and map to typescript function * move Footer Schema and Content into index.tsx * correct indentation * remove redundant code * use footerConfig within TSX function * Delete src/custom/docs/components/footer/text.json delete unneeded text.json * delete redundent file * remove {props.subtitle} and add Trademark Guidelines * Add forward slash after second legal entry * Add lint to ci. * Fix type errors. * Remove domain from intralinks. * remove unneeded subtitle * change title to name and specify column as property of FooterConfig * Improve footer link wrapping. * feat(): Feat/global footer commit f982431020a99c66aa106486b23bd663e5c4b090 Merge: ed1e978 34f9064 Author: Irfan Khan Date: Thu Oct 3 15:21:06 2024 +0100 Merge branch 'feat/global_footer' of https://github.com/CQCL/quantinuum-ui into feat/global_footer commit ed1e978be8004bcc246cc48bb3a467539fab86f3 Author: Irfan Khan Date: Thu Oct 3 15:19:44 2024 +0100 change title to name and specify column as property of FooterConfig commit d203c5eb9c1e547d55fd836c7488ed52490cd5c4 Author: Irfan Khan Date: Thu Oct 3 15:18:48 2024 +0100 remove unneeded subtitle commit 34f9064b02acc337acd6d1fdb995d83c40cc4899 Author: aidanCQ Date: Thu Oct 3 15:17:58 2024 +0100 Remove domain from intralinks. commit 60c1a3a95ba3594f1fff206bac7019dc43687991 Author: aidanCQ Date: Thu Oct 3 15:17:00 2024 +0100 Fix type errors. commit c35745fe4946cc7d6667c56e29cec87b1760b000 Author: aidanCQ Date: Thu Oct 3 15:16:55 2024 +0100 Add lint to ci. commit 1204910077fbcb12b82411c0e5af5b9c2240ca7f Author: Irfan Khan Date: Thu Oct 3 15:06:02 2024 +0100 Add forward slash after second legal entry commit 1c7d0e15e8c6a8bbdf4bff98c1a5959ad5d28f69 Author: Irfan Khan Date: Thu Oct 3 15:03:30 2024 +0100 remove {props.subtitle} and add Trademark Guidelines commit a38ca41741bf5465dda9ac0b13cfe57a9f513f4a Author: Irfan Khan Date: Thu Oct 3 15:02:55 2024 +0100 delete redundent file commit 4478a0e4338cf6aa3857a31823d8dd5a43e1ba82 Author: irfankhan10 Date: Tue Oct 1 16:08:33 2024 +0100 Delete src/custom/docs/components/footer/text.json delete unneeded text.json commit 774acd56d64bf44f662e6bb52dd3dfc826d080b2 Author: Irfan Khan Date: Mon Sep 30 18:45:03 2024 +0200 use footerConfig within TSX function commit 816462413045eddf345967b3153033777de78893 Author: Irfan Khan Date: Mon Sep 30 18:44:19 2024 +0200 remove redundant code commit 693031eb1c93f989120725ee79f9546f6e935212 Author: Irfan Khan Date: Mon Sep 30 18:41:41 2024 +0200 correct indentation commit 71b7c825d776106e5cfda1537d2529526e86207e Author: Irfan Khan Date: Mon Sep 30 18:41:12 2024 +0200 move Footer Schema and Content into index.tsx commit fa8a4833a5b0c2403ddb06d5f05fe46a22a98a33 Author: Irfan Khan Date: Mon Sep 30 18:21:39 2024 +0200 parse footercontent and map to typescript function commit f9de06c4ac2a9d5e8688240c4b250494f5ce18d0 Author: Irfan Khan Date: Mon Sep 30 18:21:16 2024 +0200 textual footer content commit e32a714ed2628fd30efc936e22cff41af905772e Author: Irfan Khan Date: Mon Sep 30 18:21:09 2024 +0200 define schema for footer content --------- Co-authored-by: aidanCQ --- .github/workflows/pre-release.yml | 1 + .github/workflows/release.yml | 1 + package.json | 1 + src/custom/docs/components/footer/index.tsx | 83 +++++++++++++++++---- stories/custom/docs-footer.stories.tsx | 64 +--------------- 5 files changed, 73 insertions(+), 77 deletions(-) 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": { diff --git a/src/custom/docs/components/footer/index.tsx b/src/custom/docs/components/footer/index.tsx index ff14355..cda0fd0 100644 --- a/src/custom/docs/components/footer/index.tsx +++ b/src/custom/docs/components/footer/index.tsx @@ -1,12 +1,55 @@ import { QuantinuumLogo } from "../../QuantinuumLogo"; import { Separator } from "src"; -export const Footer = (props: { subtitle: string, columns: { - title: string; - items: { - name: string; - href: string; - }[]; -}[] }) => { + +const footerConfig = { + columns: [ + { + name: "Products", + items: [ + { + name: "H-Series", + href: "/h-series" + }, + { + name: "Nexus", + href: "/nexus" + }, + { + name: "InQuanto", + href: "/inquanto" + } + ] + }, { + name: "Opensource", + items: [ + { + name: "TKET", + href: "/tket" + }, + { + name: "\u03BBambeq", + href: "/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" + } + ] + } + ], +} + +export const Footer = () => { return (
@@ -15,7 +58,7 @@ export const Footer = (props: { subtitle: string, columns: {