From 50bfc2053a4e019b8016ff13c797ba5ffa1607dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Fri, 2 Dec 2022 13:18:00 -0300 Subject: [PATCH 01/65] fix: show 2 latest releases for linux --- src/components/UI/downloads/DownloadsTable.tsx | 4 +++- src/constants.ts | 2 +- src/pages/downloads.tsx | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/UI/downloads/DownloadsTable.tsx b/src/components/UI/downloads/DownloadsTable.tsx index d77789f73f..7b3263313c 100644 --- a/src/components/UI/downloads/DownloadsTable.tsx +++ b/src/components/UI/downloads/DownloadsTable.tsx @@ -33,6 +33,8 @@ export const DownloadsTable: FC = ({ androidData.length ]; + const LAST_2_LINUX_RELEASES = amountOfReleasesToShow + 12; + return ( setTotalReleases(totalReleases[idx])}> @@ -61,7 +63,7 @@ export const DownloadsTable: FC = ({ diff --git a/src/constants.ts b/src/constants.ts index 3e282e0b85..58c0354042 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -20,7 +20,7 @@ export const GETH_DISCORD_URL = 'https://discord.com/invite/nthXNEv'; export const GO_URL = 'https://go.dev/'; // Downloads -export const DEFAULT_BUILD_AMOUNT_TO_SHOW = 10; +export const DEFAULT_BUILD_AMOUNT_TO_SHOW = 12; export const DOWNLOAD_HEADER_BUTTONS: { [index: string]: { name: string; diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 3afa2c6005..c955085a13 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -287,11 +287,11 @@ const DownloadsPage: NextPage = ({ data }) => { const [totalDevBuilds, setTotalDevBuilds] = useState(ALL_LINUX_DEV_BUILDS.length); const showMoreStableReleases = () => { - setAmountStableReleases(amountStableReleases + 10); + setAmountStableReleases(amountStableReleases + 12); }; const showMoreDevBuilds = () => { - setAmountDevBuilds(amountDevBuilds + 10); + setAmountDevBuilds(amountDevBuilds + 12); }; return ( From a1ff1fe755811b32f051600e50e2de70ea7b3430 Mon Sep 17 00:00:00 2001 From: Avi Thour Date: Fri, 2 Dec 2022 21:49:09 +0530 Subject: [PATCH 02/65] Extracted the style objects and props into variable Extracted the common style objects and props into variables or constants to avoid repeating the same code and make the code easier to read. Instead of repeating the same _hover styles in multiple places, I created a hoverStyles object and used it in each Link component. --- src/components/layouts/Footer.tsx | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/components/layouts/Footer.tsx b/src/components/layouts/Footer.tsx index 14db5fddfe..cd9802ca11 100644 --- a/src/components/layouts/Footer.tsx +++ b/src/components/layouts/Footer.tsx @@ -12,6 +12,12 @@ import { import { DiscordIcon, GitHubIcon, TwitterIcon } from '../UI/icons'; +const hoverStyles = { + textDecoration: 'none', + bg: 'primary', + color: 'bg !important' +}; + export const Footer: FC = () => { return ( @@ -32,11 +38,7 @@ export const Footer: FC = () => {
{
{ lg: 'none' }} borderColor='primary !important' - _hover={{ - bg: 'primary' - }} + _hover={hoverStyles} p={4} > @@ -96,9 +92,7 @@ export const Footer: FC = () => {
{
From 7e5c3cacbcef138315038728dffeb5d664d9006f Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Sat, 3 Dec 2022 18:50:11 -0800 Subject: [PATCH 03/65] use Box instead of flex Stack for nav items allows vertical margins of children to properly collapse into one another --- src/components/UI/docs/DocumentNav.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index 25663a720b..4526af7725 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import { Divider, Link, Stack, Text } from '@chakra-ui/react'; +import { Box, Divider, Link, Text } from '@chakra-ui/react'; import NextLink from 'next/link'; import { parseHeadingId } from '../../../utils/parseHeadingId'; @@ -20,7 +20,7 @@ export const DocumentNav: FC = ({ content }) => { const activeHash = useActiveHash(parsedHeadings.map(heading => heading!.headingId)); return ( - + on this page @@ -39,6 +39,6 @@ export const DocumentNav: FC = ({ content }) => { ); })} - + ); }; From e564ae46aa5e81a670e81992fac26bcc2364aba6 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Sat, 3 Dec 2022 18:50:23 -0800 Subject: [PATCH 04/65] adjust docs nav gap to 14px per design --- src/components/UI/docs/DocumentNav.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index 4526af7725..21c6f89a08 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -32,6 +32,7 @@ export const DocumentNav: FC = ({ content }) => { {heading?.title} From 2ae56986224005dba1b75bc152e6404e32798107 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 5 Dec 2022 16:13:47 +0100 Subject: [PATCH 05/65] Stylize active docs link [Fixes #74, Fixes #115] (#108) * add bold for active docs link [Fixes #74] * Add ::before indicator to active doc link Removes bold styling per design * Update documentation-links.yaml Makes it so `id` is paired with either a `to` field OR a list of `items` but not both * Updates hover styling for left docs nav * clean up styling Removes remaining underlines from links styled as buttons. Cleans up logic for conditionally showing the ::before pseudo element. Makes the ::before indicator slightly larger. * tweak ::before indicator styling * tweak ::before indicator styling --- src/components/UI/docs/DocsLinks.tsx | 132 ++++++++++++++++----------- src/components/UI/docs/LinkList.tsx | 72 ++++++++++----- src/data/documentation-links.yaml | 15 ++- 3 files changed, 134 insertions(+), 85 deletions(-) diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index 14beb534ed..6350316399 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -11,6 +11,7 @@ import { } from '@chakra-ui/react'; import { AddIcon, MinusIcon } from '@chakra-ui/icons'; import NextLink from 'next/link'; +import { useRouter } from 'next/router'; import { LinksList } from './'; @@ -20,62 +21,83 @@ interface Props { navLinks: NavLink[]; } -export const DocsLinks: FC = ({ navLinks }) => ( - - {navLinks.map(({ id, to, items }, idx) => { - return ( - - - {({ isExpanded }) => ( - <> - - = ({ navLinks }) => { + const router = useRouter(); + const { slug } = router.query; + return ( + + {navLinks.map(({ id, to, items }, idx) => { + const split = to?.split('/') + const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; + return ( + + + {({ isExpanded }) => ( + <> + - {to ? ( - - - {id} - - - ) : ( - {id} - )} - - - {items && ( - -
- {isExpanded ? ( - - ) : ( - - )} -
+ + {to ? ( + + + + {id} + + + + ) : ( + {id} + )} + + {items && ( + +
+ {isExpanded ? ( + + ) : ( + + )} +
+
+ )} +
+ {items && ( + + + )} - - {items && ( - - - - )} - - )} -
-
- ); - })} -
-); + + )} + + + ); + })} + + ); +} diff --git a/src/components/UI/docs/LinkList.tsx b/src/components/UI/docs/LinkList.tsx index d8c84c72d5..9b121c6f79 100644 --- a/src/components/UI/docs/LinkList.tsx +++ b/src/components/UI/docs/LinkList.tsx @@ -1,6 +1,7 @@ import { FC } from 'react'; import { Link, Stack, Text } from '@chakra-ui/react'; import NextLink from 'next/link'; +import { useRouter } from 'next/router'; import { NavLink } from '../../../types'; @@ -8,28 +9,49 @@ interface LinksListProps { links: NavLink[]; } -export const LinksList: FC = ({ links }) => ( - - {links.map(({ id, to, items }) => { - return to ? ( - - - - - {id} - - - - {items && } - - ) : ( - - - {id} - - {items && } - - ); - })} - -); +export const LinksList: FC = ({ links }) => { + const router = useRouter(); + const { slug } = router.query; + return ( + + {links.map(({ id, to, items }) => { + const split = to?.split('/') + const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; + return to ? ( + + + + + {id} + + + + {items && } + + ) : ( + + + {id} + + {items && } + + ); + })} + + ); +}; diff --git a/src/data/documentation-links.yaml b/src/data/documentation-links.yaml index 137b4574d2..f889d4cc6f 100644 --- a/src/data/documentation-links.yaml +++ b/src/data/documentation-links.yaml @@ -1,6 +1,7 @@ - id: Getting started - to: /docs/getting-started items: + - id: Introduction + to: /docs/getting-started - id: Hardware requirements to: /docs/getting-started/hardware-requirements - id: Installing Geth @@ -8,8 +9,9 @@ - id: Consensus clients to: /docs/getting-started/consensus-clients - id: Fundamentals - to: /docs/fundamentals items: + - id: Introduction + to: /docs/fundamentals - id: Node architecture to: /docs/fundamentals/node-architecture - id: Command-line options @@ -35,8 +37,9 @@ - id: Interacting with Geth items: - id: JSON-RPC Server - to: /docs/interacting-with-geth/rpc items: + - id: Introduction + to: /docs/interacting-with-geth/rpc - id: Batch requests to: /docs/interacting-with-geth/rpc/batch - id: GraphQL server @@ -70,8 +73,9 @@ - id: 'JavaScript Console 2: Contracts' to: /docs/interacting-with-geth/javascript-console-contracts - id: Developers - to: /docs/developers items: + - id: Introduction + to: /docs/developers - id: Dapp developers items: - id: Go API @@ -83,8 +87,9 @@ - id: Geth for Mobile to: /docs/developers/dapp-developer/mobile - id: EVM tracing - to: /docs/developers/evm-tracing items: + - id: Introduction + to: /docs/developers/evm-tracing - id: Basic traces to: /docs/developers/evm-tracing/basic-traces - id: Built-in tracers From 0bddab847d6e0e5fb61dc051321cc6c90c58ad61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 5 Dec 2022 13:28:34 -0300 Subject: [PATCH 06/65] fix: Show older releases button width on mobile (#125) --- src/pages/downloads.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 7be72330b9..8628b05360 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -393,6 +393,7 @@ const DownloadsPage: NextPage = ({ data }) => { = ({ data }) => { Date: Mon, 5 Dec 2022 17:31:39 +0100 Subject: [PATCH 07/65] Icon line weight patch [Fixes #70] (#105) * add custom AddIcon and MinusIcon svgs * switch DocsLinks to use custom +/- svgs * fix size of +/- svgs --- src/components/UI/docs/DocsLinks.tsx | 6 +++--- src/components/UI/svgs/AddIcon.tsx | 21 +++++++++++++++++++++ src/components/UI/svgs/MinusIcon.tsx | 20 ++++++++++++++++++++ src/components/UI/svgs/index.ts | 2 ++ 4 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 src/components/UI/svgs/AddIcon.tsx create mode 100644 src/components/UI/svgs/MinusIcon.tsx diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index 6350316399..ab77e803ae 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -9,7 +9,7 @@ import { Stack, Text } from '@chakra-ui/react'; -import { AddIcon, MinusIcon } from '@chakra-ui/icons'; +import { AddIcon, MinusIcon } from '../svgs/' import NextLink from 'next/link'; import { useRouter } from 'next/router'; @@ -79,9 +79,9 @@ export const DocsLinks: FC = ({ navLinks }) => {
{isExpanded ? ( - + ) : ( - + )}
diff --git a/src/components/UI/svgs/AddIcon.tsx b/src/components/UI/svgs/AddIcon.tsx new file mode 100644 index 0000000000..fe8f3016c9 --- /dev/null +++ b/src/components/UI/svgs/AddIcon.tsx @@ -0,0 +1,21 @@ +import { IconProps } from '@chakra-ui/react'; +import { createIcon } from '@chakra-ui/icons'; + +const [w, h] = [24, 24]; + +const Icon = createIcon({ + displayName: 'AddIcon', + viewBox: `0 0 ${w} ${h}`, + path: ( + + + + + + + ) +}); + +export const AddIcon: React.FC = props => ( + +); diff --git a/src/components/UI/svgs/MinusIcon.tsx b/src/components/UI/svgs/MinusIcon.tsx new file mode 100644 index 0000000000..689f611370 --- /dev/null +++ b/src/components/UI/svgs/MinusIcon.tsx @@ -0,0 +1,20 @@ +import { IconProps } from '@chakra-ui/react'; +import { createIcon } from '@chakra-ui/icons'; + +const [w, h] = [24, 24]; + +const Icon = createIcon({ + displayName: 'MinusIcon', + viewBox: `0 0 ${w} ${h}`, + path: ( + + + + + + ) +}); + +export const MinusIcon: React.FC = props => ( + +); diff --git a/src/components/UI/svgs/index.ts b/src/components/UI/svgs/index.ts index c1a85f7e2c..91312334c8 100644 --- a/src/components/UI/svgs/index.ts +++ b/src/components/UI/svgs/index.ts @@ -1,5 +1,7 @@ +export * from './AddIcon'; export * from './GlyphHome'; export * from './GopherDownloads'; export * from './GopherHomeFront'; export * from './GopherHomeLinks'; export * from './GopherHomeNodes'; +export * from './MinusIcon'; From 1f90789712163ec8cfff0797a9d0172767a3f3a2 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:37:44 +0100 Subject: [PATCH 08/65] Link section padding [Fixes #71] (#106) * rename to LinksList * add padding after sections in LinksList * reduce padding between sections to 1.5rem --- src/components/UI/docs/{LinkList.tsx => LinksList.tsx} | 4 ++-- src/components/UI/docs/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/components/UI/docs/{LinkList.tsx => LinksList.tsx} (92%) diff --git a/src/components/UI/docs/LinkList.tsx b/src/components/UI/docs/LinksList.tsx similarity index 92% rename from src/components/UI/docs/LinkList.tsx rename to src/components/UI/docs/LinksList.tsx index 9b121c6f79..6c9d838e1d 100644 --- a/src/components/UI/docs/LinkList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -18,7 +18,7 @@ export const LinksList: FC = ({ links }) => { const split = to?.split('/') const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return to ? ( - + = ({ links }) => { {items && } ) : ( - + {id} diff --git a/src/components/UI/docs/index.ts b/src/components/UI/docs/index.ts index 9214774f4c..56eadcff2b 100644 --- a/src/components/UI/docs/index.ts +++ b/src/components/UI/docs/index.ts @@ -3,6 +3,6 @@ export * from './Code'; export * from './DocsLinks'; export * from './DocsNav'; export * from './DocumentNav'; -export * from './LinkList'; +export * from './LinksList'; export * from './Note'; export { default } from './MDComponents'; From e25b87f32d9ca35a8e509848ca905ffaf2f2c7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 5 Dec 2022 13:39:12 -0300 Subject: [PATCH 09/65] fix: remove Showing... count message (#118) * fix: remove Showing... count message * Update src/pages/downloads.tsx Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> * Update src/pages/downloads.tsx Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> --- src/pages/downloads.tsx | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 8628b05360..c521e6ea1d 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -374,26 +374,13 @@ const DownloadsPage: NextPage = ({ data }) => { - - - {totalStableReleases > 0 - ? `Showing ${Math.min( - amountStableReleases, - totalStableReleases - )} latest releases of - a total ${totalStableReleases} releases` - : `No releases`} - - - {totalStableReleases > amountStableReleases && ( = ({ data }) => { - - - {totalDevBuilds > 0 - ? `Showing ${Math.min(amountDevBuilds, totalDevBuilds)} latest releases of - a total ${totalDevBuilds} releases` - : `No releases`} - - - {totalDevBuilds > amountDevBuilds && ( Date: Mon, 5 Dec 2022 13:42:09 -0300 Subject: [PATCH 10/65] hotfix: button width --- src/pages/downloads.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index c521e6ea1d..00c0e0a288 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -381,6 +381,7 @@ const DownloadsPage: NextPage = ({ data }) => { = ({ data }) => { Date: Mon, 5 Dec 2022 17:54:38 +0100 Subject: [PATCH 11/65] xs font size for os label on mobile [Fixes #94] (#123) --- src/theme/foundations/textStyles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index df2c9e9d70..4ce02a0caa 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -137,7 +137,7 @@ export const textStyles = { fontWeight: 700, textTransform: 'uppercase', textAlign: 'center', - fontSize: 'sm' + fontSize: { base: 'xs', sm: 'sm' } }, 'docs-nav-dropdown': { fontFamily: 'heading', From 94cb14b9785a3de5f91f798e484e0d2cd6950866 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 5 Dec 2022 18:13:26 +0100 Subject: [PATCH 12/65] Add gap between md content and right nav [Fixes #77] (#110) * add gap between md content and right nav * shorten max width of right nav divider * make DocumentNav width responsive Existing fixed width was too large after the 2rem of padding was added. Simply making it more narrow made it unnecessarily small on larger screen sizes. Clamp sets a min of chakra-size-40, max of chakra-size-58, while targeting an eighth of the screen width. --- src/pages/[...slug].tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index 9119adae5a..db92232ee2 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -115,7 +115,7 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - + = ({ frontmatter, content, navLinks, lastModified - + From 5926da4aa7b49a45929ca22a37a7e163ebc4f405 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 5 Dec 2022 11:38:04 -0700 Subject: [PATCH 13/65] filter out anchor tag --- src/components/UI/docs/Breadcrumbs.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/UI/docs/Breadcrumbs.tsx b/src/components/UI/docs/Breadcrumbs.tsx index e1b6f71304..217b9c524e 100644 --- a/src/components/UI/docs/Breadcrumbs.tsx +++ b/src/components/UI/docs/Breadcrumbs.tsx @@ -7,7 +7,8 @@ export const Breadcrumbs: FC = () => { const router = useRouter(); let pathSplit = router.asPath.split('/'); - pathSplit = pathSplit.splice(1, pathSplit.length); + pathSplit = pathSplit.splice(1, pathSplit.length) + .map((path) => path.includes('#') ? path.split('#')[0] : path); return ( <> From 26673626d23a34d8e70931a8efa4d32f72320ebd Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 5 Dec 2022 21:17:11 +0100 Subject: [PATCH 14/65] Remove color style for list items, and change first-child to first-of-type based on console error for SSR (#127) --- src/components/UI/docs/MDComponents.tsx | 2 +- src/pages/[...slug].tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 09f8b2b71f..ff1217b126 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -143,7 +143,7 @@ const MDComponents = { ); }, li: ({ children }: any) => { - return {children}; + return {children}; }, note: ({ children }: any) => { return {children}; diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index db92232ee2..3c5166e91b 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -116,7 +116,7 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - + Date: Tue, 6 Dec 2022 01:40:07 +0100 Subject: [PATCH 15/65] Adjust link styling for various states [Fixes #89] (#129) * fix: link styling for various states updates hover/active/focus link states to match design system * hover underline color to secondary --- src/theme/components/Link.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/theme/components/Link.ts b/src/theme/components/Link.ts index ca8aaf93c1..0c09c4ecc7 100644 --- a/src/theme/components/Link.ts +++ b/src/theme/components/Link.ts @@ -15,13 +15,13 @@ export const Link = { light: { textDecoration: 'underline', color: 'primary', - _hover: { color: 'body', textDecorationColor: 'body' }, + _hover: { color: 'body', textDecorationColor: 'secondary' }, _focus: { color: 'primary', - boxShadow: '0 0 0 1px var(--chakra-colors-primary)', + boxShadow: '0 0 0 1px var(--chakra-colors-primary) !important', textDecoration: 'none' }, - _pressed: { + _active: { color: 'secondary', textDecorationColor: 'secondary' } From e983c7e64dc4c1a9214a3379c6cb40bfd75da439 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 6 Dec 2022 11:14:17 +0000 Subject: [PATCH 16/65] update redirects and fix line break on cli page --- docs/fundamentals/command-line-options.md | 3 +- url-list.csv | 117 +++++++++++----------- 2 files changed, 58 insertions(+), 62 deletions(-) diff --git a/docs/fundamentals/command-line-options.md b/docs/fundamentals/command-line-options.md index c77bfd0fab..a110ddeee5 100644 --- a/docs/fundamentals/command-line-options.md +++ b/docs/fundamentals/command-line-options.md @@ -3,8 +3,7 @@ title: Command-line Options description: A list of commands for Geth --- -Geth is primarily controlled using the command line. Geth is started using the `geth` command. Geth is stopped by pressing `ctrl-c`. There are then many combinations of commands that configure precisely how geth will run. These commands are displayed below. The same information can be -obtained at any time from your Geth instance by running: +Geth is primarily controlled using the command line. Geth is started using the `geth` command. Geth is stopped by pressing `ctrl-c`. There are then many combinations of commands that configure precisely how geth will run. These commands are displayed below. The same information can be obtained at any time from your Geth instance by running: ```sh geth --help diff --git a/url-list.csv b/url-list.csv index b58730f5ea..517882c64d 100644 --- a/url-list.csv +++ b/url-list.csv @@ -1,60 +1,57 @@ -OLD Geth website URLS,Equivalent NEW website URLs,Relative path to markdown file,Notes -https://geth.ethereum.org/,https://geth.ethereum.org,src/pages/homepage,will be react page -https://geth.ethereum.org/downloads/,https://geth.ethereum.org/downloads,src/pages/downloads,will be react page -https://geth.ethereum.org/docs/,https://geth.ethereum.org/docs,src/pages/docs/index.md,n/a -https://geth.ethereum.org/docs/getting-started,https://geth.ethereum.org/docs/getting_started/getting-started,src/pages/docs/getting_started/getting_started.md,n/a -https://geth.ethereum.org/docs/getting-started/geth-and-clef,https://geth.ethereum.org/docs/getting_started_with_clef,src/pages/docs/getting_started/getting-started-with-clef.md,n/a -https://geth.ethereum.org/docs/getting-started/dev-mode,https://geth.ethereum.org/docs/developers/geth-developers/dev-mode,src/pages/docs/developers/geth-developer/dev-mode.md,n/a -https://geth.ethereum.org/docs/install-and-build/installing-geth,https://geth.ethereum.org/docs/getting_started/install-geth,src/pages/docs/getting_started/backup-restore.md,n/a -https://geth.ethereum.org/docs/install-and-build/backup-restore,https://geth.ethereum.org/docs/getting_started/backup-restore,src/pages/docs/getting_started/installing-geth.md,n/a -https://geth.ethereum.org/docs/install-and-build/cross-compile,page removed,page removed,n/a -https://geth.ethereum.org/docs/interface/command-line-options,https://geth.ethereum.org/fundamentals/command-line-options,src/pages/docs/fundamentals/command-line-options.md,n/a -https://geth.ethereum.org/docs/interface/pruning,https://geth.ethereum.org/docs/fundamentals/pruning,src/pages/docs/fundamentals/pruning.md,n/a -https://geth.ethereum.org/docs/interface/merge,page removed,page removed,n/a -https://geth.ethereum.org/docs/interface/consensus-clients,https://geth.ethereum.org/docs/getting_started/consensus-client,src/pages/docs/getting_started/consensus-clients.md,n/a -https://geth.ethereum.org/docs/interface/peer-to-peer,https://geth.ethereum.org/docs/fundamentals/peer-to-peer,src/pages/docs/fundamentals/peer-to-peer.md,n/a -https://geth.ethereum.org/docs/interface/les,https://geth.ethereum.org/docs/fundamentals/les,src/pages/docs/fundamentals/les.md,n/a -https://geth.ethereum.org/docs/interface/managing-your-accounts,https://geth.ethereum.org/docs/fundamentals/account-management,src/pages/docs/fundamentals/account-management.md,n/a -https://geth.ethereum.org/docs/faq,https://geth.ethereum.org/docs/faq,src/pages/docs/faq.md,n/a -https://geth.ethereum.org/docs/interface/javascript-console,https://geth.ethereum.org/docs/interacting-with-geth/javascript-console,src/pages/docs/interacting-with-geth/javascript-console.md,n/a -https://geth.ethereum.org/docs/interface/private-network,https://geth.ethereum.org/docs/developers/geth-developer/private-network,src/pages/docs/developers/geth-developer/private-network.md,n/a -https://geth.ethereum.org/docs/interface/mining,page removed,page removed,n/a -https://geth.ethereum.org/docs/interface/metrics,https://geth.ethereum.org/docs/monitoring/metrics,src/pages/docs/monitoring/metrics.md,n/a -https://geth.ethereum.org/docs/dapp/native,https://geth.ethereum.org/docs/developers/dapp-developer/native,src/pages/docs/developers/dapp-developer/native.md,n/a -https://geth.ethereum.org/docs/dapp/tracing,https://geth.ethereum.org/docs/developers/dapp-developer/tracing,src/pages/docs/developers/dapp-developer/tracing.md,n/a -https://geth.ethereum.org/docs/dapp/custom-tracer,https://geth.ethereum.org/docs/developers/dapp-developer/custom-tracer,src/pages/docs/developers/dapp-developer/custom-tracer.md,n/a -https://geth.ethereum.org/docs/dapp/builtin-tracers,https://geth.ethereum.org/docs/developers/dapp-developer/built-in-tracer,src/pages/docs/developers/dapp-developer/built-in-tracers.md,n/a -https://geth.ethereum.org/docs/dapp/native-accounts,https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts,src/pages/docs/developers/dapp-developer/native-accounts.md,n/a -https://geth.ethereum.org/docs/dapp/native-bindings,https://geth.ethereum.org/docs/developers/dapp-developer/native-bindings,src/pages/docs/developers/dapp-developer/native-bindings.md,n/a -https://geth.ethereum.org/docs/dapp/mobile,https://geth.ethereum.org/docs/developers/dapp-developer/mobile,src/pages/docs/developers/dapp-developer/mobile.md,n/a -https://geth.ethereum.org/docs/dapp/mobile-accounts,page removed,page removed,n/a -https://geth.ethereum.org/docs/rpc/server,https://geth.ethereum.org/docs/interacting-with-geth/rpc/server,src/pages/docs/interacting-with-geth/rpc/server.md,n/a -https://geth.ethereum.org/docs/rpc/pubsub,https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub,src/pages/docs/interacting-with-geth/rpc/pubsub.md,n/a -https://geth.ethereum.org/docs/rpc/batch,https://geth.ethereum.org/docs//interacting-with-geth/rpc/batch,src/pages/docs/interacting-with-geth/rpc/batch.md,n/a -https://geth.ethereum.org/docs/rpc/graphql,https://geth.ethereum.org/docs/interacting_with_geth/rpc/graphql,src/pages/docs/interacting-with-geth/rpc/graphql.md,n/a -https://geth.ethereum.org/docs/rpc/ns-admin,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-admin,src/pages/docs/interacting-with-geth/rpc/ns-admin.md,n/a -https://geth.ethereum.org/docs/rpc/ns-clique,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-clique,src/pages/docs/interacting-with-geth/rpc/ns-clique.md,n/a -https://geth.ethereum.org/docs/rpc/ns-debug,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-debug,src/pages/docs/interacting-with-geth/rpc/ns-debug.md,n/a -https://geth.ethereum.org/docs/rpc/ns-eth,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-eth,src/pages/docs/interacting-with-geth/rpc/ns-eth.md,n/a -https://geth.ethereum.org/docs/rpc/ns-les,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-les,src/pages/docs/interacting-with-geth/rpc/ns-les.md,n/a -https://geth.ethereum.org/docs/rpc/ns-miner,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-miner,src/pages/docs/interacting-with-geth/rpc/ns-miner.md,n/a -https://geth.ethereum.org/docs/rpc/ns-net,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-net,src/pages/docs/interacting-with-geth/rpc/ns-net.md,n/a -https://geth.ethereum.org/docs/rpc/ns-personal,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-personal,src/pages/docs/interacting-with-geth/rpc/ns-personalmd,n/a -https://geth.ethereum.org/docs/rpc/ns-txpool,https://geth.ethereum.org/docs/interacting_with_geth/rpc/ns-txpool,src/pages/docs/interacting-with-geth/rpc/ns-txpool.md,n/a -https://geth.ethereum.org/docs/rpc/objects,https://geth.ethereum.org/docs/interacting_with_geth/rpc/objects,src/pages/docs/interacting-with-geth/rpc/objects.md,n/a -https://geth.ethereum.org/docs/developers/dev-guide,https://geth.ethereum.org/docs/developers/geth-developer/dev-guide,src/pages/docs/developers/geth-developer/devguide.md,n/a -https://geth.ethereum.org/docs/developers/code-review-guidelines,https://geth.ethereum.org/docs/developers/geth-developer/code-review-guidelines,src/pages/docs/developers/geth-developer/code-review-guidelines.md,n/a -https://geth.ethereum.org/docs/developers/issue-handling-workflow,https://geth.ethereum.org/docs/developers/geth-developer/code-review-guidelines,src/pages/docs/developers/geth-developer/issue-handling-workflow.md,n/a -https://geth.ethereum.org/docs/developers/dns-discovery-setup,https://geth.ethereum.org/doce/developers/geth-developer/dns-discovery-setup,src/pages/docs/developers/geth-developer/dns-discovery-workflow.md,n/a -https://geth.ethereum.org/docs/clef/introduction,https://geth.ethereum.org/docs/tools/clef/introduction,src/pages/docs/tools/clef/introduction.md,n/a -https://geth.ethereum.org/docs/clef/tutorial,https://geth.ethereum.org/docs/tools/clef/tutorial,src/pages/docs/tools/clef/tutorial.md,n/a -https://geth.ethereum.org/docs/clef/cliquesigning,https://geth.ethereum.org/docs/tools/clef/clique-signing,src/pages/docs/tools/clef/clique-signing.md,n/a -https://geth.ethereum.org/docs/clef/rules,https://geth.ethereum.org/docs/tools/clef/rules,src/pages/docs/tools/clef/rules.md,n/a -https://geth.ethereum.org/docs/clef/setup,https://geth.ethereum.org/docs/tools/clef/setup,src/pages/docs/tools/clef/setup.md,n/a -https://geth.ethereum.org/docs/clef/apis,https://geth.ethereum.org/docs/tools/clef/apis,src/pages/docs/tools/clef/apis.md,n/a -https://geth.ethereum.org/docs/clef/datatypes,https://geth.ethereum.org/docs/tools/clef/datatypes,src/pages/docs/tools/clef/datatypes.md,n/a -https://geth.ethereum.org/docs/interface/sync-modes,https://geth.ethereum.org/docs/interface/sync-modes,src/pages/docs/fundamentals/sync-modes.md,n/a -https://geth.ethereum.org/docs/interface/hardware,https://geth.ethereum.org/docs/interface/getting_started/hardware-requirements.md,, -https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json,https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json,src/pages/docs/vulnerabilities/vulnerabilities.json,must be served at original URL -https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json.minisig,https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json.minisig,src/pages/docs/vulnerabilities/vulnerabilities.json.minisig,must be served at original URL -https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.md,https://geth.ethereum.org/docs/developers/geth-developers/discloures,src/pages/docs/developers/geth-developers/disclosures,moved to /docs and renamed +OLD Geth website URLS,Equivalent NEW website URLs,,Notes +https://geth.ethereum.org/,https://geth.ethereum.org,,will be react page +https://geth.ethereum.org/downloads/,https://geth.ethereum.org/downloads,,will be react page +https://geth.ethereum.org/docs/,https://geth.ethereum.org/docs,,n/a +https://geth.ethereum.org/docs/getting-started,https://geth.ethereum.org/docs/getting-started/backup-restore,,n/a +https://geth.ethereum.org/docs/getting-started/dev-mode,https://geth.ethereum.org/docs/developers/geth-developer/dev-mode,,n/a +https://geth.ethereum.org/docs/install-and-build/installing-geth,https://geth.ethereum.org/docs/getting-started/install-geth,,n/a +https://geth.ethereum.org/docs/install-and-build/backup-restore,https://geth.ethereum.org/docs/getting-started/backup-restore,,n/a +https://geth.ethereum.org/docs/interface/command-line-options,https://geth.ethereum.org/docs/fundamentals/command-line-options,,n/a +https://geth.ethereum.org/docs/interface/pruning,https://geth.ethereum.org/docs/fundamentals/pruning,,n/a +https://geth.ethereum.org/docs/interface/consensus-clients,https://geth.ethereum.org/docs/getting-started/consensus-client,,n/a +https://geth.ethereum.org/docs/interface/peer-to-peer,https://geth.ethereum.org/docs/fundamentals/peer-to-peer,,n/a +https://geth.ethereum.org/docs/interface/les,https://geth.ethereum.org/docs/fundamentals/les,,n/a +https://geth.ethereum.org/docs/interface/managing-your-accounts,https://geth.ethereum.org/docs/fundamentals/account-management,,n/a +https://geth.ethereum.org/docs/faq,https://geth.ethereum.org/docs/faq,,n/a +https://geth.ethereum.org/docs/interface/javascript-console,https://geth.ethereum.org/docs/interacting-with-geth/javascript-console,,n/a +https://geth.ethereum.org/docs/interface/private-network,https://geth.ethereum.org/docs/developers/geth-developer/private-network,,n/a +https://geth.ethereum.org/docs/interface/mining,https://geth.ethereum.org/docs/fundamentals/mining,,n/a +https://geth.ethereum.org/docs/interface/metrics,https://geth.ethereum.org/docs/monitoring/metrics,,n/a +https://geth.ethereum.org/docs/dapp/native,https://geth.ethereum.org/docs/developers/dapp-developer/native,,n/a +https://geth.ethereum.org/docs/dapp/tracing,https://geth.ethereum.org/docs/developers/evm-tracing,,n/a +https://geth.ethereum.org/docs/dapp/custom-tracer,https://geth.ethereum.org/docs/developers/evm-tracing/custom-tracer,,n/a +https://geth.ethereum.org/docs/dapp/builtin-tracers,https://geth.ethereum.org/docs/developers/evm-tracing/built-in-tracers,,n/a +https://geth.ethereum.org/docs/dapp/native-accounts,https://geth.ethereum.org/docs/docs/developers/dapp-developer/native-accounts,,n/a +https://geth.ethereum.org/docs/dapp/native-bindings,https://geth.ethereum.org/docs/developers/dapp-developer/native-bindings,,n/a +https://geth.ethereum.org/docs/dapp/mobile,https://geth.ethereum.org/docs/developers/dapp-developer/mobile,,n/a +https://geth.ethereum.org/docs/dapp/mobile-accounts,https://geth.ethereum.org/docs/developers/dapp-developer/mobile,,n/a +https://geth.ethereum.org/docs/rpc/server,https://geth.ethereum.org/docs/interacting-with-geth/rpc,,n/a +https://geth.ethereum.org/docs/rpc/pubsub,https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub,,n/a +https://geth.ethereum.org/docs/rpc/batch,https://geth.ethereum.org/docs/interacting-with-geth/rpc/batch,,n/a +https://geth.ethereum.org/docs/rpc/graphql,https://geth.ethereum.org/docs/interacting-with-geth/rpc/graphql,,n/a +https://geth.ethereum.org/docs/rpc/ns-admin,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-admin,,n/a +https://geth.ethereum.org/docs/rpc/ns-clique,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-clique,,n/a +https://geth.ethereum.org/docs/rpc/ns-debug,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug,,n/a +https://geth.ethereum.org/docs/rpc/ns-eth,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth,,n/a +https://geth.ethereum.org/docs/rpc/ns-les,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-les,,n/a +https://geth.ethereum.org/docs/rpc/ns-miner,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-miner,,n/a +https://geth.ethereum.org/docs/rpc/ns-net,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-net,,n/a +https://geth.ethereum.org/docs/rpc/ns-personal,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-personal,,n/a +https://geth.ethereum.org/docs/rpc/ns-txpool,https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-txpool,,n/a +https://geth.ethereum.org/docs/rpc/objects,https://geth.ethereum.org/docs/interacting-with-geth/rpc/objects,,n/a +https://geth.ethereum.org/docs/developers/dev-guide,https://geth.ethereum.org/docs/developers/geth-developer/dev-guide,,n/a +https://geth.ethereum.org/docs/developers/code-review-guidelines,https://geth.ethereum.org/docs/developers/geth-developer/code-review-guidelines,,n/a +https://geth.ethereum.org/docs/developers/issue-handling-workflow,https://geth.ethereum.org/docs/developers/geth-developer/issue-handling-workflow,,n/a +https://geth.ethereum.org/docs/developers/dns-discovery-setup,https://geth.ethereum.org/doce/developers/geth-developer/dns-discovery-setup,,n/a +https://geth.ethereum.org/docs/clef/introduction,https://geth.ethereum.org/docs/tools/clef/introduction,,n/a +https://geth.ethereum.org/docs/clef/tutorial,https://geth.ethereum.org/docs/tools/clef/tutorial,,n/a +https://geth.ethereum.org/docs/clef/cliquesigning,https://geth.ethereum.org/docs/tools/clef/clique-signing,,n/a +https://geth.ethereum.org/docs/clef/rules,https://geth.ethereum.org/docs/tools/clef/rules,,n/a +https://geth.ethereum.org/docs/clef/setup,https://geth.ethereum.org/docs/tools/clef/setup,,n/a +https://geth.ethereum.org/docs/clef/apis,https://geth.ethereum.org/docs/tools/clef/apis,,n/a +https://geth.ethereum.org/docs/clef/datatypes,https://geth.ethereum.org/docs/tools/clef/datatypes,,n/a +https://geth.ethereum.org/docs/interface/sync-modes,https://geth.ethereum.org/docs/fundamentals/sync-modes,,n/a +https://geth.ethereum.org/docs/interface/hardware,https://geth.ethereum.org/docs/getting-started/hardware-requirements,, +https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json,https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json,,must be served at original URL +https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json.minisig,https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.json.minisig,,must be served at original URL +https://github.com/ethereum/go-ethereum/tree/gh-pages/docs/_vulnerabilities/vulnerabilities.md,https://geth.ethereum.org/docs/developers/geth-developer/disclosures,,moved to /docs and renamed From bbd4a31bad0c0d6134d4e7a6ed2928c15b97da98 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:35:53 +0100 Subject: [PATCH 17/65] add max width of 100% to md content on mobile (#130) --- src/components/UI/docs/MDComponents.tsx | 2 +- src/pages/[...slug].tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index ff1217b126..dab3a440d1 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -101,7 +101,7 @@ const MDComponents = { }, // tables table: ({ children }: any) => ( - + = ({ frontmatter, content, navLinks, lastModified - + Date: Tue, 6 Dec 2022 14:43:12 +0100 Subject: [PATCH 18/65] Use long month formatting for last edit date [Fixes #86] (#121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use long month formatting for last edit date * last -> Last * Update src/pages/[...slug].tsx Co-authored-by: Nicolás Quiroz Co-authored-by: Corwin Smith Co-authored-by: Nicolás Quiroz --- src/pages/[...slug].tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index b68760f344..1d24e72165 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -63,7 +63,7 @@ export const getStaticProps: GetStaticProps = async context => { content, navLinks, lastModified: getParsedDate(lastModified.mtime, { - month: 'numeric', + month: 'long', day: 'numeric', year: 'numeric' }) @@ -111,7 +111,7 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified {frontmatter.title} - last edited {lastModified} + Last edited on {lastModified} From 9bbcd7107843204d4552150df6d043c785d73139 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:46:18 +0100 Subject: [PATCH 19/65] Fix hover for DocumentNav links [Fixes #73] (#107) * fix hover for DocumentNav links [Fixes #73] * use Box instead of flex Stack Allows vertical margins of children to collapse into each other * Revert "use Box instead of flex Stack" This reverts commit a4811127ccd7424da8f51e2a056aee447fc5db08. * add :focus and :active states --- src/components/UI/docs/DocumentNav.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index 25663a720b..b8ed1b1135 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -28,10 +28,27 @@ export const DocumentNav: FC = ({ content }) => { {parsedHeadings.map((heading, idx) => { return ( - + {heading?.title} From 9107cf39881c97d733a334ed55ff34d5b776cd41 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Tue, 6 Dec 2022 10:35:44 -0700 Subject: [PATCH 20/65] Update src/components/UI/docs/Breadcrumbs.tsx Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> --- src/components/UI/docs/Breadcrumbs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UI/docs/Breadcrumbs.tsx b/src/components/UI/docs/Breadcrumbs.tsx index 217b9c524e..2a23848177 100644 --- a/src/components/UI/docs/Breadcrumbs.tsx +++ b/src/components/UI/docs/Breadcrumbs.tsx @@ -6,7 +6,7 @@ import { FC } from 'react'; export const Breadcrumbs: FC = () => { const router = useRouter(); - let pathSplit = router.asPath.split('/'); + let pathSplit = router.asPath.split('#')[0].split('/'); pathSplit = pathSplit.splice(1, pathSplit.length) .map((path) => path.includes('#') ? path.split('#')[0] : path); From 5186a1f74fab326e2358302ade6143deb7e36648 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Tue, 6 Dec 2022 10:35:48 -0700 Subject: [PATCH 21/65] Update src/components/UI/docs/Breadcrumbs.tsx Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> --- src/components/UI/docs/Breadcrumbs.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/UI/docs/Breadcrumbs.tsx b/src/components/UI/docs/Breadcrumbs.tsx index 2a23848177..c451bb78fd 100644 --- a/src/components/UI/docs/Breadcrumbs.tsx +++ b/src/components/UI/docs/Breadcrumbs.tsx @@ -7,8 +7,7 @@ export const Breadcrumbs: FC = () => { const router = useRouter(); let pathSplit = router.asPath.split('#')[0].split('/'); - pathSplit = pathSplit.splice(1, pathSplit.length) - .map((path) => path.includes('#') ? path.split('#')[0] : path); + pathSplit = pathSplit.splice(1, pathSplit.length); return ( <> From d93e4373e2b32c5e7772bb89e4c2d9d3717f5a61 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Tue, 6 Dec 2022 10:53:11 -0700 Subject: [PATCH 22/65] Update src/components/UI/docs/DocumentNav.tsx Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> --- src/components/UI/docs/DocumentNav.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index 21c6f89a08..07adf63ad3 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -32,7 +32,7 @@ export const DocumentNav: FC = ({ content }) => { {heading?.title} From 7e9e22a6712aff5ad02809f41e4488a0b41552e4 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Tue, 6 Dec 2022 10:54:50 -0700 Subject: [PATCH 23/65] remove margin styles for document-nav-link in textStyles.ts --- src/theme/foundations/textStyles.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index df2c9e9d70..1badd62db0 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -191,7 +191,6 @@ export const textStyles = { fontSize: '13px', lineHeight: 5, letterSpacing: '1%', - mb: 4 }, 'note-text': { fontFamily: 'body', From 332e972397e6171127b573a79a3bf6ef5f507a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Tue, 6 Dec 2022 17:02:55 -0300 Subject: [PATCH 24/65] fix: external links (#133) * fix: footer external links * fix: ButtonLinkSecondary external links * fix: docs external links --- src/components/UI/ButtonLinkSecondary.tsx | 13 +++++++--- src/components/UI/docs/MDComponents.tsx | 15 ++++++----- src/components/layouts/Footer.tsx | 31 ++++++++--------------- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/components/UI/ButtonLinkSecondary.tsx b/src/components/UI/ButtonLinkSecondary.tsx index 94ff6ff629..3cea28fd7f 100644 --- a/src/components/UI/ButtonLinkSecondary.tsx +++ b/src/components/UI/ButtonLinkSecondary.tsx @@ -9,14 +9,21 @@ interface Props extends LinkProps { export const ButtonLinkSecondary: React.FC = ({ href, children, ...restProps }) => { const isExternal: boolean = href.toString().startsWith('http'); + const variant = LinkTheme.variants['button-link-secondary']; return ( - - + {isExternal ? ( + {children} - + ) : ( + + + {children} + + + )} ); }; diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index dab3a440d1..2e7f88122c 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -28,14 +28,15 @@ const MDComponents = { }, // links a: ({ children, href }: any) => { - return ( + const isExternal = href.startsWith('http') && !href.includes('geth.ethereum.org'); + + return isExternal ? ( + + {children} + + ) : ( - - {children} - + {children} ); }, diff --git a/src/components/layouts/Footer.tsx b/src/components/layouts/Footer.tsx index cd9802ca11..f539477147 100644 --- a/src/components/layouts/Footer.tsx +++ b/src/components/layouts/Footer.tsx @@ -82,11 +82,9 @@ export const Footer: FC = () => { _hover={hoverStyles} p={4} > - - - - - + + +
{ borderColor='primary' p={4} > - - - - - + + +
-
- - - - - +
+ + +
From 56b9963afd6024a75a19aed7d7d1ec882868f4fe Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Tue, 6 Dec 2022 21:04:09 +0100 Subject: [PATCH 25/65] Markdown header margin fix [Fixes #83] (#120) * expand parseHeadingId Will produce a kebab-case heading ID from string if none explicitly declared in the markdown. Always returns an object with the children, title and headingId. * remove redundant code from MDComponents.tsx parseHeadingIds now always returns an object with an ID, removing need for conditionals here * Use Box instead of flex Stack for MDX content Allows stacked vertical margins to properly collapse into each other * fix: h2 top margin to 3rem on mobile * remove unneeded line * extract and rename getKebabCaseFromName util fn * Update src/pages/[...slug].tsx * Update src/utils/parseHeadingId.ts Co-authored-by: Corwin Smith * move constant inside function make variable name all caps as a string constant * clean up utils/index.ts to abc order Co-authored-by: Corwin Smith --- src/components/UI/docs/MDComponents.tsx | 56 +++++++------------------ src/pages/[...slug].tsx | 11 +++-- src/utils/getKebabCaseFromName.ts | 7 ++++ src/utils/index.ts | 3 +- src/utils/parseHeadingId.ts | 26 +++++++----- 5 files changed, 47 insertions(+), 56 deletions(-) create mode 100644 src/utils/getKebabCaseFromName.ts diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 2e7f88122c..994809ca89 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -42,61 +42,37 @@ const MDComponents = { }, // headings h1: ({ children }: any) => { - const heading = parseHeadingId(children); + const { children: parsedChildren, headingId} = parseHeadingId(children); - return heading ? ( - - {heading.children} - - ) : ( - - {children} + return ( + + {parsedChildren} ); }, h2: ({ children }: any) => { - const heading = parseHeadingId(children); + const { children: parsedChildren, headingId} = parseHeadingId(children); - return heading ? ( - - {heading.children} - - ) : ( - - {children} + return ( + + {parsedChildren} ); }, h3: ({ children }: any) => { - const heading = parseHeadingId(children); - - return heading ? ( - - {heading.children} - - ) : ( - - {children} + const { children: parsedChildren, headingId} = parseHeadingId(children); + return ( + + {parsedChildren} ); }, h4: ({ children }: any) => { - const heading = parseHeadingId(children); + const { children: parsedChildren, headingId} = parseHeadingId(children); - return heading ? ( - - {heading.children} - - ) : ( - - {children} + return ( + + {parsedChildren} ); }, diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index 1d24e72165..1d1eab5cd0 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -1,7 +1,7 @@ import fs from 'fs'; import matter from 'gray-matter'; import yaml from 'js-yaml'; -import { Flex, Stack, Heading, Text } from '@chakra-ui/react'; +import { Box, Flex, Stack, Heading, Text } from '@chakra-ui/react'; import ChakraUIRenderer from 'chakra-ui-markdown-renderer'; import ReactMarkdown from 'react-markdown'; import { useRouter } from 'next/router'; @@ -116,7 +116,7 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - + = ({ frontmatter, content, navLinks, lastModified > {content} - + - + diff --git a/src/utils/getKebabCaseFromName.ts b/src/utils/getKebabCaseFromName.ts new file mode 100644 index 0000000000..10ce621144 --- /dev/null +++ b/src/utils/getKebabCaseFromName.ts @@ -0,0 +1,7 @@ +export const getKebabCaseFromName = (name: string): string => + name + .replace(/[#]/g, '') + .trim() + .toLowerCase() + .replace(/ /g, '-') + .replace(/[^a-z0-9-]/g, ''); diff --git a/src/utils/index.ts b/src/utils/index.ts index dcc6c5caa4..206b319fe8 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -2,8 +2,9 @@ export { compareReleasesFn } from './compareReleasesFn'; export { fetchLatestReleaseCommit } from './fetchLatestReleaseCommit'; export { fetchLatestReleaseVersionAndName } from './fetchLatestReleaseVersionAndName'; export { fetchXMLData } from './fetchXMLData'; -export { getLatestBinaryURL } from './getLatestBinaryURL'; export { getChecksum } from './getChecksum'; +export { getKebabCaseFromName } from './getKebabCaseFromName'; +export { getLatestBinaryURL } from './getLatestBinaryURL'; export { getParsedDate } from './getParsedDate'; export { getProgrammingLanguageName } from './getProgrammingLanguageName'; export { getReleaseArch } from './getReleaseArch'; diff --git a/src/utils/parseHeadingId.ts b/src/utils/parseHeadingId.ts index 75d56bf5de..1e0b93e0ec 100644 --- a/src/utils/parseHeadingId.ts +++ b/src/utils/parseHeadingId.ts @@ -1,18 +1,22 @@ -const check = '{#'; +import { getKebabCaseFromName } from './'; export const parseHeadingId = (children: string[]) => { - if (children[children.length - 1].includes(check)) { - const temp = children[children.length - 1].split(check); - const headingId = temp[temp.length - 1].split('}')[0]; - - children[children.length - 1] = temp[0]; - + const CHECK = '{#'; + const lastChild = children[children.length - 1]; + const split = lastChild.split(CHECK); + if (lastChild.includes(CHECK)) { + const headingId = split[split.length - 1].split('}')[0]; + const newChildren = [...children]; + newChildren[newChildren.length - 1] = split[0]; return { - children, - title: temp[0].replaceAll('#', ''), + children: newChildren, + title: split[0].replaceAll('#', ''), headingId }; } - - return null; + return { + children, + title: split[0].replaceAll('#', ''), + headingId: getKebabCaseFromName(split[0]) + }; }; From 1b5195908c23208db2a056f8a0d7b8b4132c3dce Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Tue, 6 Dec 2022 16:19:55 -0700 Subject: [PATCH 26/65] close mobile docs dropdown when page is selected --- src/components/UI/docs/DocsLinks.tsx | 7 ++++--- src/components/UI/docs/DocsNav.tsx | 16 ++++++++++++---- src/components/UI/docs/LinksList.tsx | 9 +++++---- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index ab77e803ae..1eb9d48bf3 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -19,9 +19,10 @@ import { NavLink } from '../../../types'; interface Props { navLinks: NavLink[]; + updateMobileAccordionState: () => void; } -export const DocsLinks: FC = ({ navLinks }) => { +export const DocsLinks: FC = ({ navLinks, updateMobileAccordionState }) => { const router = useRouter(); const { slug } = router.query; return ( @@ -52,7 +53,7 @@ export const DocsLinks: FC = ({ navLinks }) => { _groupHover={{ background: 'primary', color: 'bg', textDecoration: 'none' }} > {to ? ( - + = ({ navLinks }) => { {items && ( - + )} diff --git a/src/components/UI/docs/DocsNav.tsx b/src/components/UI/docs/DocsNav.tsx index 3dcb661d4e..e086db3748 100644 --- a/src/components/UI/docs/DocsNav.tsx +++ b/src/components/UI/docs/DocsNav.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import { FC, useState } from 'react'; import { Accordion, AccordionButton, @@ -17,14 +17,22 @@ interface Props { } export const DocsNav: FC = ({ navLinks }) => { + const OPEN = 0; + const CLOSED = -1; + const [mobileAccordionState, setMobileAccordionState] = useState(CLOSED) + + const updateMobileAccordionState = () => { + setMobileAccordionState(mobileAccordionState === OPEN ? CLOSED : OPEN) + } + return ( - + - + = ({ navLinks }) => { - + diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx index 6c9d838e1d..ed2674204b 100644 --- a/src/components/UI/docs/LinksList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -7,9 +7,10 @@ import { NavLink } from '../../../types'; interface LinksListProps { links: NavLink[]; + updateMobileAccordionState: () => void; } -export const LinksList: FC = ({ links }) => { +export const LinksList: FC = ({ links, updateMobileAccordionState }) => { const router = useRouter(); const { slug } = router.query; return ( @@ -19,7 +20,7 @@ export const LinksList: FC = ({ links }) => { const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return to ? ( - + = ({ links }) => { - {items && } + {items && } ) : ( {id} - {items && } + {items && } ); })} From 871f55587e3a6bced1529c7e52edd4c7510a13a1 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Tue, 6 Dec 2022 21:09:09 -0800 Subject: [PATCH 27/65] search input directs query to google --- src/components/UI/search/Search.tsx | 42 +++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/components/UI/search/Search.tsx b/src/components/UI/search/Search.tsx index 27913e5e51..075de7cf37 100644 --- a/src/components/UI/search/Search.tsx +++ b/src/components/UI/search/Search.tsx @@ -1,29 +1,55 @@ -import { FC } from 'react'; -import { Input, InputGroup, Stack } from '@chakra-ui/react'; +import { FC, useState } from 'react'; +import { Input, InputGroup, Link, Stack } from '@chakra-ui/react'; import { BORDER_WIDTH } from '../../../constants'; import { LensIcon } from '../icons'; export const Search: FC = () => { + const [query, setQuery] = useState(''); + + // Handlers + const handleSubmit = (e: React.FormEvent): void => { + document.getElementById('search-link')?.click(); + }; + const handleKeyPress = (e: React.KeyboardEvent): void => { + if (e.key === 'Enter') handleSubmit(e); + }; + const handleChange = (e: React.ChangeEvent): void => { + setQuery(e.target.value); + }; + return ( + > - - - + + + ); From faa0640465ec9f0746024598b38d12eff6918242 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Wed, 7 Dec 2022 15:57:25 +0100 Subject: [PATCH 28/65] update green.900 value (#135) used for button background; increases contrast ratio --- src/theme/foundations/colors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/foundations/colors.ts b/src/theme/foundations/colors.ts index ed3fef3533..16477ffa52 100644 --- a/src/theme/foundations/colors.ts +++ b/src/theme/foundations/colors.ts @@ -9,7 +9,7 @@ export const colors = { 600: '#11866f', 700: '#08715C', 800: '#25453f', - 900: '#02211B' + 900: '#01100D' }, gray: { 800: '#1d242c' From 11035bf0c4f179f0c416dcca224cd6ac6dfab14b Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Wed, 7 Dec 2022 18:26:23 +0100 Subject: [PATCH 29/65] adjusts light primary to green.700 for contrast (#137) Improves contrast ratio when paired with yellow.50 and removes browser a11y warnings --- src/theme/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/index.ts b/src/theme/index.ts index 4900f4df0e..0b2c3bfafe 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -27,7 +27,7 @@ const overrides = { textStyles, semanticTokens: { colors: { - primary: { _light: 'green.600', _dark: 'green.200' }, + primary: { _light: 'green.700', _dark: 'green.200' }, secondary: { _light: 'green.800', _dark: 'green.600' }, 'button-bg': { _light: 'green.50', _dark: 'green.900' }, body: { _light: 'gray.800', _dark: 'yellow.50' }, From af86168c2f73665f60295c4f5159634b006f9d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Wed, 7 Dec 2022 14:30:09 -0300 Subject: [PATCH 30/65] feat: add empty state for platforms without releases --- src/components/UI/DataTable.tsx | 58 +++++++++++++------ .../UI/downloads/DownloadsTable.tsx | 2 +- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/components/UI/DataTable.tsx b/src/components/UI/DataTable.tsx index 1aa5341ce9..810d92813a 100644 --- a/src/components/UI/DataTable.tsx +++ b/src/components/UI/DataTable.tsx @@ -1,4 +1,15 @@ -import { Link, Table, Thead, Tr, Th, TableContainer, Text, Tbody, Td } from '@chakra-ui/react'; +import { + Link, + Table, + Thead, + Tr, + Th, + TableContainer, + Text, + Tbody, + Td, + Stack +} from '@chakra-ui/react'; import { FC } from 'react'; import { OpenPGPSignaturesData, ReleaseData } from '../../types'; import { getParsedDate } from '../../utils'; @@ -20,6 +31,7 @@ export const DataTable: FC = ({ columnHeaders, data }) => { css={{ '&::-webkit-scrollbar': { borderTop: '2px solid var(--chakra-colors-primary)', + borderBottom: '2px solid var(--chakra-colors-primary)', height: 18 }, '&::-webkit-scrollbar-thumb': { @@ -30,26 +42,34 @@ export const DataTable: FC = ({ columnHeaders, data }) => { pb={4} >
- - - {columnHeaders.map((columnHeader, idx) => { - return ( - - ); - })} - - + {data.length > 0 && ( + + + {columnHeaders.map((columnHeader, idx) => { + return ( + + ); + })} + + + )} + {data.length === 0 && ( + + No builds found + + )} + {dataType === 'Releases' && data.map((r: ReleaseData, idx: number) => { return ( diff --git a/src/components/UI/downloads/DownloadsTable.tsx b/src/components/UI/downloads/DownloadsTable.tsx index 7b3263313c..a5feab18c0 100644 --- a/src/components/UI/downloads/DownloadsTable.tsx +++ b/src/components/UI/downloads/DownloadsTable.tsx @@ -36,7 +36,7 @@ export const DownloadsTable: FC = ({ const LAST_2_LINUX_RELEASES = amountOfReleasesToShow + 12; return ( - + setTotalReleases(totalReleases[idx])}> {DOWNLOADS_TABLE_TABS.map((tab, idx) => { From 527dad36352b602df28a66bab5dd321e2f15139b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Wed, 7 Dec 2022 16:59:44 -0300 Subject: [PATCH 31/65] fix: borderBottom on DownloadsTable --- src/components/UI/DataTable.tsx | 3 +-- src/components/UI/downloads/DownloadsTable.tsx | 11 ++++++++++- src/pages/downloads.tsx | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/UI/DataTable.tsx b/src/components/UI/DataTable.tsx index 810d92813a..55df07c493 100644 --- a/src/components/UI/DataTable.tsx +++ b/src/components/UI/DataTable.tsx @@ -31,7 +31,6 @@ export const DataTable: FC = ({ columnHeaders, data }) => { css={{ '&::-webkit-scrollbar': { borderTop: '2px solid var(--chakra-colors-primary)', - borderBottom: '2px solid var(--chakra-colors-primary)', height: 18 }, '&::-webkit-scrollbar-thumb': { @@ -52,7 +51,7 @@ export const DataTable: FC = ({ columnHeaders, data }) => { fontFamily='"JetBrains Mono", monospace' fontWeight={700} fontSize='md' - color='#868b87' //? Use theme color? Or add to theme? + color='#868b87' // TODO: Use theme color? Or add to theme? > {columnHeader} diff --git a/src/components/UI/downloads/DownloadsTable.tsx b/src/components/UI/downloads/DownloadsTable.tsx index a5feab18c0..b8a45207c6 100644 --- a/src/components/UI/downloads/DownloadsTable.tsx +++ b/src/components/UI/downloads/DownloadsTable.tsx @@ -12,6 +12,7 @@ interface Props { windowsData: ReleaseData[]; iOSData: ReleaseData[]; androidData: ReleaseData[]; + totalReleasesNumber: number; amountOfReleasesToShow: number; setTotalReleases: (idx: number) => void; } @@ -22,6 +23,7 @@ export const DownloadsTable: FC = ({ windowsData, iOSData, androidData, + totalReleasesNumber, amountOfReleasesToShow, setTotalReleases }) => { @@ -36,7 +38,14 @@ export const DownloadsTable: FC = ({ const LAST_2_LINUX_RELEASES = amountOfReleasesToShow + 12; return ( - + setTotalReleases(totalReleases[idx])}> {DOWNLOADS_TABLE_TABS.map((tab, idx) => { diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 06f546df22..720f3020ed 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -368,6 +368,7 @@ const DownloadsPage: NextPage = ({ data }) => { windowsData={ALL_WINDOWS_STABLE_RELEASES} iOSData={ALL_IOS_STABLE_RELEASES} androidData={ALL_ANDROID_STABLE_RELEASES} + totalReleasesNumber={totalStableReleases} amountOfReleasesToShow={amountStableReleases} setTotalReleases={setTotalStableReleases} /> @@ -423,6 +424,7 @@ const DownloadsPage: NextPage = ({ data }) => { windowsData={ALL_WINDOWS_DEV_BUILDS} iOSData={ALL_IOS_DEV_BUILDS} androidData={ALL_ANDROID_DEV_BUILDS} + totalReleasesNumber={totalDevBuilds} amountOfReleasesToShow={amountDevBuilds} setTotalReleases={setTotalDevBuilds} /> From d8996d1c950e16bc8037f66a7b573e3d7732c279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Wed, 7 Dec 2022 17:09:43 -0300 Subject: [PATCH 32/65] fix: adds missing legacyBehavior prop --- src/components/UI/ButtonLinkSecondary.tsx | 2 +- src/components/UI/Header.tsx | 6 ++++-- src/components/UI/HeaderButtons.tsx | 4 ++-- src/components/UI/docs/Breadcrumbs.tsx | 6 +++++- src/components/UI/docs/DocsLinks.tsx | 10 +++++----- src/components/UI/docs/DocumentNav.tsx | 8 ++++---- src/components/UI/docs/LinksList.tsx | 16 ++++++++++------ src/components/UI/docs/MDComponents.tsx | 19 +++++++++++++------ src/components/UI/downloads/DownloadsHero.tsx | 2 +- src/components/UI/homepage/HomeHero.tsx | 4 ++-- src/components/UI/homepage/QuickLinks.tsx | 6 +++--- src/components/layouts/Footer.tsx | 4 ++-- 12 files changed, 52 insertions(+), 35 deletions(-) diff --git a/src/components/UI/ButtonLinkSecondary.tsx b/src/components/UI/ButtonLinkSecondary.tsx index 3cea28fd7f..509cdc2c4f 100644 --- a/src/components/UI/ButtonLinkSecondary.tsx +++ b/src/components/UI/ButtonLinkSecondary.tsx @@ -18,7 +18,7 @@ export const ButtonLinkSecondary: React.FC = ({ href, children, ...restPr {children} ) : ( - + {children} diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index 18cac9ca19..2ff2b515b2 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -27,9 +27,11 @@ export const Header: FC = () => { borderColor='primary' flexGrow={2} > - + - go-ethereum + + go-ethereum + diff --git a/src/components/UI/HeaderButtons.tsx b/src/components/UI/HeaderButtons.tsx index 1c1d7f2cde..89f033dca4 100644 --- a/src/components/UI/HeaderButtons.tsx +++ b/src/components/UI/HeaderButtons.tsx @@ -25,7 +25,7 @@ export const HeaderButtons: FC = ({ close }) => { return ( {/* DOWNLOADS */} - + downloads @@ -34,7 +34,7 @@ export const HeaderButtons: FC = ({ close }) => { {/* DOCUMENTATION */} - + diff --git a/src/components/UI/docs/Breadcrumbs.tsx b/src/components/UI/docs/Breadcrumbs.tsx index c451bb78fd..f1fa912500 100644 --- a/src/components/UI/docs/Breadcrumbs.tsx +++ b/src/components/UI/docs/Breadcrumbs.tsx @@ -16,7 +16,11 @@ export const Breadcrumbs: FC = () => { {pathSplit.map((path: string, idx: number) => { return ( - + {path} diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index ab77e803ae..3f8ab35759 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -9,7 +9,7 @@ import { Stack, Text } from '@chakra-ui/react'; -import { AddIcon, MinusIcon } from '../svgs/' +import { AddIcon, MinusIcon } from '../svgs/'; import NextLink from 'next/link'; import { useRouter } from 'next/router'; @@ -27,7 +27,7 @@ export const DocsLinks: FC = ({ navLinks }) => { return ( {navLinks.map(({ id, to, items }, idx) => { - const split = to?.split('/') + const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return ( @@ -52,7 +52,7 @@ export const DocsLinks: FC = ({ navLinks }) => { _groupHover={{ background: 'primary', color: 'bg', textDecoration: 'none' }} > {to ? ( - + = ({ navLinks }) => { verticalAlign: '-1.25px', marginInlineEnd: 2, fontSize: 'lg', - display: isActive ? 'unset' : 'none', + display: isActive ? 'unset' : 'none' }} _groupHover={{ color: 'bg' }} > @@ -100,4 +100,4 @@ export const DocsLinks: FC = ({ navLinks }) => { })} ); -} +}; diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index e5d0c39877..564e2ad8df 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -27,7 +27,7 @@ export const DocumentNav: FC = ({ content }) => { {parsedHeadings.map((heading, idx) => { return ( - + = ({ content }) => { _hover={{ background: 'primary', boxShadow: '0 0 0 6px var(--chakra-colors-primary)', - color: 'bg', + color: 'bg' }} _focus={{ background: 'primary', boxShadow: '0 0 0 6px var(--chakra-colors-primary) !important', color: 'bg', outline: '2px solid var(--chakra-colors-secondary) !important', - outlineOffset: '4px', + outlineOffset: '4px' }} _active={{ background: 'secondary', boxShadow: '0 0 0 6px var(--chakra-colors-secondary)', - color: 'bg', + color: 'bg' }} > {heading?.title} diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx index 6c9d838e1d..e9b6f02653 100644 --- a/src/components/UI/docs/LinksList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -15,11 +15,16 @@ export const LinksList: FC = ({ links }) => { return ( {links.map(({ id, to, items }) => { - const split = to?.split('/') + const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return to ? ( - - + + = ({ links }) => { verticalAlign: '-1.25px', marginInlineEnd: 2, fontSize: 'lg', - display: isActive ? 'unset' : 'none', + display: isActive ? 'unset' : 'none' }} _groupHover={{ color: 'bg', - boxShadow: '0 0 0 var(--chakra-space-2) var(--chakra-colors-primary)', - + boxShadow: '0 0 0 var(--chakra-space-2) var(--chakra-colors-primary)' }} > {id} diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 994809ca89..4a9625f968 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -35,14 +35,14 @@ const MDComponents = { {children} ) : ( - + {children} ); }, // headings h1: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( @@ -51,16 +51,23 @@ const MDComponents = { ); }, h2: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( - + {parsedChildren} ); }, h3: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( {parsedChildren} @@ -68,7 +75,7 @@ const MDComponents = { ); }, h4: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( diff --git a/src/components/UI/downloads/DownloadsHero.tsx b/src/components/UI/downloads/DownloadsHero.tsx index 3792864f71..6d9cfa7b99 100644 --- a/src/components/UI/downloads/DownloadsHero.tsx +++ b/src/components/UI/downloads/DownloadsHero.tsx @@ -81,7 +81,7 @@ export const DownloadsHero: FC = ({ {Object.keys(DOWNLOAD_HEADER_BUTTONS).map((key: string) => { const { name, buildURL, Svg, ariaLabel } = DOWNLOAD_HEADER_BUTTONS[key]; return ( - + @@ -48,7 +48,7 @@ export const HomeHero: FC = () => { - + diff --git a/src/components/UI/homepage/QuickLinks.tsx b/src/components/UI/homepage/QuickLinks.tsx index 34307c5ff2..61e90988a6 100644 --- a/src/components/UI/homepage/QuickLinks.tsx +++ b/src/components/UI/homepage/QuickLinks.tsx @@ -28,7 +28,7 @@ export const QuickLinks: FC = () => { - + { - + { - + { borderColor='primary' p={4} > - + DOWNLOADS @@ -61,7 +61,7 @@ export const Footer: FC = () => { borderColor='primary' p={4} > - + DOCUMENTATION From 640b72abc699251cf2e7d4f2888bcb83aee85103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Wed, 7 Dec 2022 18:40:13 -0300 Subject: [PATCH 33/65] fix: add :hover color for hero buttons on dark mode --- src/components/UI/downloads/DownloadsHero.tsx | 9 +++++++-- src/components/UI/homepage/HomeHero.tsx | 4 ++-- src/theme/foundations/textStyles.ts | 11 +++++++---- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/UI/downloads/DownloadsHero.tsx b/src/components/UI/downloads/DownloadsHero.tsx index 3792864f71..9588bded9f 100644 --- a/src/components/UI/downloads/DownloadsHero.tsx +++ b/src/components/UI/downloads/DownloadsHero.tsx @@ -80,12 +80,17 @@ export const DownloadsHero: FC = ({ {Object.keys(DOWNLOAD_HEADER_BUTTONS).map((key: string) => { const { name, buildURL, Svg, ariaLabel } = DOWNLOAD_HEADER_BUTTONS[key]; + return ( - @@ -49,7 +49,7 @@ export const HomeHero: FC = () => { - diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index ade07a1901..64d1949408 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -77,7 +77,8 @@ export const textStyles = { fontFamily: 'heading', color: 'bg', fontWeight: 700, - textTransform: 'uppercase' + textTransform: 'uppercase', + _groupHover: { color: 'yellow.50' } }, 'home-section-link-label': { fontFamily: 'heading', @@ -124,13 +125,15 @@ export const textStyles = { fontFamily: 'heading', color: 'bg', fontSize: { base: 'md', lg: 'xl' }, - textTransform: 'uppercase' + textTransform: 'uppercase', + _groupHover: { color: 'yellow.50' } }, 'downloads-button-sublabel': { fontFamily: 'heading', color: 'bg', fontSize: { base: 'xs', lg: 'sm' }, - textTransform: 'uppercase' + textTransform: 'uppercase', + _groupHover: { color: 'yellow.50' } }, 'download-tab-label': { fontFamily: 'heading', @@ -190,7 +193,7 @@ export const textStyles = { fontWeight: 400, fontSize: '13px', lineHeight: 5, - letterSpacing: '1%', + letterSpacing: '1%' }, 'note-text': { fontFamily: 'body', From 026757a5dbc47d652d1022a8db4fdebbf4644e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Wed, 7 Dec 2022 18:41:50 -0300 Subject: [PATCH 34/65] chore: prettier --- src/components/UI/Header.tsx | 4 +++- src/components/UI/docs/DocsLinks.tsx | 8 ++++---- src/components/UI/docs/DocumentNav.tsx | 6 +++--- src/components/UI/docs/LinksList.tsx | 14 +++++++++----- src/components/UI/docs/MDComponents.tsx | 17 ++++++++++++----- src/components/UI/svgs/AddIcon.tsx | 6 +++--- src/components/UI/svgs/MinusIcon.tsx | 4 ++-- src/pages/[...slug].tsx | 5 ++++- 8 files changed, 40 insertions(+), 24 deletions(-) diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index 18cac9ca19..8cb57d07c3 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -29,7 +29,9 @@ export const Header: FC = () => { > - go-ethereum + + go-ethereum + diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index ab77e803ae..167ed00ffe 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -9,7 +9,7 @@ import { Stack, Text } from '@chakra-ui/react'; -import { AddIcon, MinusIcon } from '../svgs/' +import { AddIcon, MinusIcon } from '../svgs/'; import NextLink from 'next/link'; import { useRouter } from 'next/router'; @@ -27,7 +27,7 @@ export const DocsLinks: FC = ({ navLinks }) => { return ( {navLinks.map(({ id, to, items }, idx) => { - const split = to?.split('/') + const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return ( @@ -62,7 +62,7 @@ export const DocsLinks: FC = ({ navLinks }) => { verticalAlign: '-1.25px', marginInlineEnd: 2, fontSize: 'lg', - display: isActive ? 'unset' : 'none', + display: isActive ? 'unset' : 'none' }} _groupHover={{ color: 'bg' }} > @@ -100,4 +100,4 @@ export const DocsLinks: FC = ({ navLinks }) => { })} ); -} +}; diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index e5d0c39877..25dc3e2d19 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -36,19 +36,19 @@ export const DocumentNav: FC = ({ content }) => { _hover={{ background: 'primary', boxShadow: '0 0 0 6px var(--chakra-colors-primary)', - color: 'bg', + color: 'bg' }} _focus={{ background: 'primary', boxShadow: '0 0 0 6px var(--chakra-colors-primary) !important', color: 'bg', outline: '2px solid var(--chakra-colors-secondary) !important', - outlineOffset: '4px', + outlineOffset: '4px' }} _active={{ background: 'secondary', boxShadow: '0 0 0 6px var(--chakra-colors-secondary)', - color: 'bg', + color: 'bg' }} > {heading?.title} diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx index 6c9d838e1d..a7b870615a 100644 --- a/src/components/UI/docs/LinksList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -15,10 +15,15 @@ export const LinksList: FC = ({ links }) => { return ( {links.map(({ id, to, items }) => { - const split = to?.split('/') + const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return to ? ( - + = ({ links }) => { verticalAlign: '-1.25px', marginInlineEnd: 2, fontSize: 'lg', - display: isActive ? 'unset' : 'none', + display: isActive ? 'unset' : 'none' }} _groupHover={{ color: 'bg', - boxShadow: '0 0 0 var(--chakra-space-2) var(--chakra-colors-primary)', - + boxShadow: '0 0 0 var(--chakra-space-2) var(--chakra-colors-primary)' }} > {id} diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 994809ca89..8fb2278bcc 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -42,7 +42,7 @@ const MDComponents = { }, // headings h1: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( @@ -51,16 +51,23 @@ const MDComponents = { ); }, h2: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( - + {parsedChildren} ); }, h3: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( {parsedChildren} @@ -68,7 +75,7 @@ const MDComponents = { ); }, h4: ({ children }: any) => { - const { children: parsedChildren, headingId} = parseHeadingId(children); + const { children: parsedChildren, headingId } = parseHeadingId(children); return ( diff --git a/src/components/UI/svgs/AddIcon.tsx b/src/components/UI/svgs/AddIcon.tsx index fe8f3016c9..c4ddec18af 100644 --- a/src/components/UI/svgs/AddIcon.tsx +++ b/src/components/UI/svgs/AddIcon.tsx @@ -8,9 +8,9 @@ const Icon = createIcon({ viewBox: `0 0 ${w} ${h}`, path: ( - - - + + + ) diff --git a/src/components/UI/svgs/MinusIcon.tsx b/src/components/UI/svgs/MinusIcon.tsx index 689f611370..71a72d1b92 100644 --- a/src/components/UI/svgs/MinusIcon.tsx +++ b/src/components/UI/svgs/MinusIcon.tsx @@ -8,8 +8,8 @@ const Icon = createIcon({ viewBox: `0 0 ${w} ${h}`, path: ( - - + + ) diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index 1d1eab5cd0..86380e3a38 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -116,7 +116,10 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - + Date: Wed, 7 Dec 2022 15:47:35 -0800 Subject: [PATCH 35/65] update search to form get request similar to existing site, using duckduckgo using the get method of a form element. Converted magnifying class wrapped in anchor tag to be a submit button instead --- src/components/UI/search/Search.tsx | 70 +++++++++++++++-------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/src/components/UI/search/Search.tsx b/src/components/UI/search/Search.tsx index 075de7cf37..7b8ad0c3c1 100644 --- a/src/components/UI/search/Search.tsx +++ b/src/components/UI/search/Search.tsx @@ -1,5 +1,5 @@ import { FC, useState } from 'react'; -import { Input, InputGroup, Link, Stack } from '@chakra-ui/react'; +import { Button, Input, InputGroup, Stack } from '@chakra-ui/react'; import { BORDER_WIDTH } from '../../../constants'; import { LensIcon } from '../icons'; @@ -8,12 +8,6 @@ export const Search: FC = () => { const [query, setQuery] = useState(''); // Handlers - const handleSubmit = (e: React.FormEvent): void => { - document.getElementById('search-link')?.click(); - }; - const handleKeyPress = (e: React.KeyboardEvent): void => { - if (e.key === 'Enter') handleSubmit(e); - }; const handleChange = (e: React.ChangeEvent): void => { setQuery(e.target.value); }; @@ -24,33 +18,41 @@ export const Search: FC = () => { borderRight={{ base: 'none', md: BORDER_WIDTH }} borderColor={{ base: 'bg', md: 'primary' }} _hover={{ base: { bg: 'primary' }, md: { bg: 'none' } }} - > - - - - - - + > +
+ + + + + +
); }; From 4ca9d121933fa0ffc6624cf1efde0084aa22f72c Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Thu, 8 Dec 2022 22:52:04 -0700 Subject: [PATCH 36/65] update fontSize for h1 --- src/components/UI/docs/MDComponents.tsx | 4 ++-- src/pages/[...slug].tsx | 2 +- src/theme/foundations/textStyles.ts | 11 ++--------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 4a9625f968..e7d09ff17a 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -15,7 +15,7 @@ import { Code, Note } from '.'; import { textStyles } from '../../../theme/foundations'; import { parseHeadingId } from '../../../utils/parseHeadingId'; -const { header1, header2, header3, header4 } = textStyles; +const { h1, header2, header3, header4 } = textStyles; const MDComponents = { // paragraphs @@ -45,7 +45,7 @@ const MDComponents = { const { children: parsedChildren, headingId } = parseHeadingId(children); return ( - + {parsedChildren} ); diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index 86380e3a38..31dc39f9d8 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -107,7 +107,7 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - + {frontmatter.title} diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index 64d1949408..9ed116e70e 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -2,7 +2,7 @@ export const textStyles = { h1: { fontFamily: 'heading', fontWeight: 700, - fontSize: '2.75rem', + fontSize: { base: '2.175rem', md: '2.875rem' }, lineHeight: '3.375rem', letterSpacing: { base: '0.03rem', md: '0.04rem' }, color: 'body' @@ -15,14 +15,7 @@ export const textStyles = { letterSpacing: { base: '0.03rem', md: '0.04rem' }, color: 'body' }, - header1: { - fontFamily: 'heading', - fontWeight: 700, - fontSize: { base: '1.875rem', md: '2.125rem' }, - letterSpacing: { base: '0.03rem', md: '0.04rem' }, - lineHeight: 'normal', - color: 'body' - }, + header2: { fontFamily: 'heading', fontSize: { base: '1.5rem', md: '1.75rem' }, From 35db2a490669417547dca482050b7b3425a6d3b3 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Fri, 9 Dec 2022 00:22:16 -0700 Subject: [PATCH 37/65] add redirects structure --- next.config.js | 6 +++++- redirects.js | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 redirects.js diff --git a/next.config.js b/next.config.js index 403aed7493..19d31a9cc8 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,5 @@ /** @type {import('next').NextConfig} */ +const { redirects: redirectsList } = require('./redirects'); const withMDX = require('@next/mdx')({ extension: /\.mdx?$/, @@ -14,5 +15,8 @@ module.exports = withMDX({ reactStrictMode: true, swcMinify: true, // Append the default value with md extensions - pageExtensions: ['ts', 'tsx', 'md', 'mdx'] + pageExtensions: ['ts', 'tsx', 'md', 'mdx'], + async redirects() { + return redirectsList + }, }); diff --git a/redirects.js b/redirects.js new file mode 100644 index 0000000000..e91dc06e26 --- /dev/null +++ b/redirects.js @@ -0,0 +1,11 @@ +const redirects = [ + { + source: '/about', + destination: '/', + permanent: true, + } +]; + +module.exports = { + redirects +} \ No newline at end of file From c9ef66acbf27e895ff0abe0b3850ea4b4e4f0c7e Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Fri, 9 Dec 2022 13:29:14 -0800 Subject: [PATCH 38/65] add submit type to search button --- src/components/UI/search/Search.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/UI/search/Search.tsx b/src/components/UI/search/Search.tsx index 7b8ad0c3c1..41a6b364cf 100644 --- a/src/components/UI/search/Search.tsx +++ b/src/components/UI/search/Search.tsx @@ -36,6 +36,7 @@ export const Search: FC = () => { outlineOffset={4} />
{Object.entries(r).map((item, idx) => { const objectItems = ['release', 'commit', 'signature']; From e6c2d7f2595a2590f8d8cb92170e27724075c261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 12 Dec 2022 14:01:52 -0300 Subject: [PATCH 46/65] chore: update wip --- src/components/UI/DataTable.tsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/UI/DataTable.tsx b/src/components/UI/DataTable.tsx index 60c702055b..3798a4b08d 100644 --- a/src/components/UI/DataTable.tsx +++ b/src/components/UI/DataTable.tsx @@ -82,18 +82,18 @@ export const DataTable: FC = ({ columnHeaders, data }) => { ? 'android' : 'ios'; - // const isLatestStableLinuxRelease = - // os === 'linux' && - // data - // .filter( - // (e: ReleaseData) => e.arch === '64-bit' && !e.release.url.includes('unstable') - // ) - // .every((elem: ReleaseData) => { - // console.log('release:', r); - // console.log('elem:', elem); + const isLatestStableLinuxRelease = + os === 'linux' && + data + .filter( + (e: ReleaseData) => e.arch === '64-bit' && !e.release.url.includes('unstable') + ) + .every((elem: ReleaseData) => { + console.log('release:', r); + console.log('elem:', elem); - // return new Date(r.published) >= new Date(elem.published); - // }); + return new Date(r.published) >= new Date(elem.published); + }); const x = data.filter((e: ReleaseData, _: any, array: any) => { const maxDate = array @@ -125,7 +125,7 @@ export const DataTable: FC = ({ columnHeaders, data }) => { // console.log({ latest }); const isPrimaryRelease = - 'isLatestStableLinuxRelease' || + isLatestStableLinuxRelease || latestDarwinRelease || latestWindowsRelease || latestAndroidRelease || @@ -136,7 +136,7 @@ export const DataTable: FC = ({ columnHeaders, data }) => { key={idx} transition={'all 0.5s'} _hover={{ background: 'button-bg', transition: 'all 0.5s' }} - fontWeight={false ? 700 : 400} + fontWeight={isLatestStableLinuxRelease ? 700 : 400} > {Object.entries(r).map((item, idx) => { const objectItems = ['release', 'commit', 'signature']; From 80e455812a27cd00f319c9d9d2cb632e750284c9 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 18:20:49 +0100 Subject: [PATCH 47/65] Remove defaultIndex from Accordion to have them default closed (#144) --- src/components/UI/docs/DocsLinks.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index 3f8ab35759..10ae276192 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -30,7 +30,7 @@ export const DocsLinks: FC = ({ navLinks }) => { const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; return ( - + {({ isExpanded }) => ( <> From 7dc30590368276aa95a1465d6ec920bf298972d0 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 18:21:22 +0100 Subject: [PATCH 48/65] [UI/UX bug] - Footer buttons are only partially clickable and [Perf] - Optimise SVGs (#143) * Make whole footer button area clickable * optimize svgs --- src/components/UI/icons/DiscordIcon.tsx | 7 +- src/components/UI/icons/GitHubIcon.tsx | 7 +- src/components/UI/icons/HamburgerIcon.tsx | 9 +- src/components/UI/icons/LensIcon.tsx | 7 +- src/components/UI/icons/LinuxPenguin.tsx | 7 +- src/components/UI/icons/MacosLogo.tsx | 7 +- src/components/UI/icons/MoonIcon.tsx | 7 +- src/components/UI/icons/SourceBranch.tsx | 7 +- src/components/UI/icons/SunIcon.tsx | 27 +- src/components/UI/icons/TwitterIcon.tsx | 7 +- src/components/UI/icons/WindowsLogo.tsx | 7 +- src/components/UI/svgs/AddIcon.tsx | 7 +- src/components/UI/svgs/GlyphHome.tsx | 39 +- src/components/UI/svgs/GopherDownloads.tsx | 2931 +------------------- src/components/UI/svgs/GopherHomeFront.tsx | 2709 +----------------- src/components/UI/svgs/GopherHomeLinks.tsx | 2493 +---------------- src/components/UI/svgs/GopherHomeNodes.tsx | 1779 +----------- src/components/UI/svgs/MinusIcon.tsx | 6 +- src/components/layouts/Footer.tsx | 16 +- 19 files changed, 24 insertions(+), 10055 deletions(-) diff --git a/src/components/UI/icons/DiscordIcon.tsx b/src/components/UI/icons/DiscordIcon.tsx index dd068036b5..ca1f8f400b 100644 --- a/src/components/UI/icons/DiscordIcon.tsx +++ b/src/components/UI/icons/DiscordIcon.tsx @@ -4,11 +4,6 @@ export const DiscordIcon = createIcon({ displayName: 'DiscordIcon', viewBox: '0 0 32 24', path: ( - - - + ) }); diff --git a/src/components/UI/icons/GitHubIcon.tsx b/src/components/UI/icons/GitHubIcon.tsx index a7954f782a..a74f788c78 100644 --- a/src/components/UI/icons/GitHubIcon.tsx +++ b/src/components/UI/icons/GitHubIcon.tsx @@ -4,11 +4,6 @@ export const GitHubIcon = createIcon({ displayName: 'GitHubIcon', viewBox: '0 0 26 24', path: ( - - - + ) }); diff --git a/src/components/UI/icons/HamburgerIcon.tsx b/src/components/UI/icons/HamburgerIcon.tsx index 954b9f57c9..879fb072d0 100644 --- a/src/components/UI/icons/HamburgerIcon.tsx +++ b/src/components/UI/icons/HamburgerIcon.tsx @@ -4,13 +4,6 @@ export const HamburgerIcon = createIcon({ displayName: 'HamburgerIcon', viewBox: '0 0 22 14', path: ( - - - + ) }); diff --git a/src/components/UI/icons/LensIcon.tsx b/src/components/UI/icons/LensIcon.tsx index d13c13776d..9ab332e067 100644 --- a/src/components/UI/icons/LensIcon.tsx +++ b/src/components/UI/icons/LensIcon.tsx @@ -4,11 +4,6 @@ export const LensIcon = createIcon({ displayName: 'LensIcon', viewBox: '0 0 17 18', path: ( - - - + ) }); diff --git a/src/components/UI/icons/LinuxPenguin.tsx b/src/components/UI/icons/LinuxPenguin.tsx index 377fb62376..2a6d36d1f6 100644 --- a/src/components/UI/icons/LinuxPenguin.tsx +++ b/src/components/UI/icons/LinuxPenguin.tsx @@ -7,12 +7,7 @@ const Icon = createIcon({ displayName: 'LinuxPenguin', viewBox: `0 0 ${w} ${h}`, path: ( - - - + ) }); diff --git a/src/components/UI/icons/MacosLogo.tsx b/src/components/UI/icons/MacosLogo.tsx index 622ad91f71..89a4a6f79e 100644 --- a/src/components/UI/icons/MacosLogo.tsx +++ b/src/components/UI/icons/MacosLogo.tsx @@ -7,12 +7,7 @@ const Icon = createIcon({ displayName: 'MacosLogo', viewBox: `0 0 ${w} ${h}`, path: ( - - - + ) }); diff --git a/src/components/UI/icons/MoonIcon.tsx b/src/components/UI/icons/MoonIcon.tsx index aa5db596a5..765625acb8 100644 --- a/src/components/UI/icons/MoonIcon.tsx +++ b/src/components/UI/icons/MoonIcon.tsx @@ -4,11 +4,6 @@ export const MoonIcon = createIcon({ displayName: 'MoonIcon', viewBox: '0 0 22 22', path: ( - - - + ) }); diff --git a/src/components/UI/icons/SourceBranch.tsx b/src/components/UI/icons/SourceBranch.tsx index e616360af1..8c352e1cd3 100644 --- a/src/components/UI/icons/SourceBranch.tsx +++ b/src/components/UI/icons/SourceBranch.tsx @@ -7,12 +7,7 @@ const Icon = createIcon({ displayName: 'SourceBranch', viewBox: `0 0 ${w} ${h}`, path: ( - - - + ) }); diff --git a/src/components/UI/icons/SunIcon.tsx b/src/components/UI/icons/SunIcon.tsx index 4a69f77fa5..2555a5c128 100644 --- a/src/components/UI/icons/SunIcon.tsx +++ b/src/components/UI/icons/SunIcon.tsx @@ -4,31 +4,6 @@ export const SunIcon = createIcon({ displayName: 'SunIcon', viewBox: '0 0 44 44', path: ( - - - - - - - - - - - + ) }); diff --git a/src/components/UI/icons/TwitterIcon.tsx b/src/components/UI/icons/TwitterIcon.tsx index 61f6f73283..be4aff8ef6 100644 --- a/src/components/UI/icons/TwitterIcon.tsx +++ b/src/components/UI/icons/TwitterIcon.tsx @@ -4,11 +4,6 @@ export const TwitterIcon = createIcon({ displayName: 'TwitterIcon', viewBox: '0 0 28 22', path: ( - - - + ) }); diff --git a/src/components/UI/icons/WindowsLogo.tsx b/src/components/UI/icons/WindowsLogo.tsx index a447ebbffe..aa94ebeb0b 100644 --- a/src/components/UI/icons/WindowsLogo.tsx +++ b/src/components/UI/icons/WindowsLogo.tsx @@ -7,12 +7,7 @@ const Icon = createIcon({ displayName: 'WindowsLogo', viewBox: `0 0 ${w} ${h}`, path: ( - - - + ) }); diff --git a/src/components/UI/svgs/AddIcon.tsx b/src/components/UI/svgs/AddIcon.tsx index c4ddec18af..906a2045af 100644 --- a/src/components/UI/svgs/AddIcon.tsx +++ b/src/components/UI/svgs/AddIcon.tsx @@ -7,12 +7,7 @@ const Icon = createIcon({ displayName: 'AddIcon', viewBox: `0 0 ${w} ${h}`, path: ( - - - - - - + ) }); diff --git a/src/components/UI/svgs/GlyphHome.tsx b/src/components/UI/svgs/GlyphHome.tsx index 4e25ad08b0..2df7b4e989 100644 --- a/src/components/UI/svgs/GlyphHome.tsx +++ b/src/components/UI/svgs/GlyphHome.tsx @@ -7,44 +7,7 @@ const Icon = createIcon({ displayName: 'GlyphHome', viewBox: `0 0 ${w} ${h}`, path: ( - - - - - - - - + ) }); diff --git a/src/components/UI/svgs/GopherDownloads.tsx b/src/components/UI/svgs/GopherDownloads.tsx index df438c2dd9..704e12da78 100644 --- a/src/components/UI/svgs/GopherDownloads.tsx +++ b/src/components/UI/svgs/GopherDownloads.tsx @@ -7,2936 +7,7 @@ const Icon = createIcon({ displayName: 'GopherDownloads', viewBox: `0 0 ${w} ${h}`, path: ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ) }); diff --git a/src/components/UI/svgs/GopherHomeFront.tsx b/src/components/UI/svgs/GopherHomeFront.tsx index c27023c3ce..551be53ec2 100644 --- a/src/components/UI/svgs/GopherHomeFront.tsx +++ b/src/components/UI/svgs/GopherHomeFront.tsx @@ -7,2714 +7,7 @@ const Icon = createIcon({ displayName: 'GopherHomeFront', viewBox: `0 0 ${w} ${h}`, path: ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ) }); diff --git a/src/components/UI/svgs/GopherHomeLinks.tsx b/src/components/UI/svgs/GopherHomeLinks.tsx index abc8883c2d..84b3ea604b 100644 --- a/src/components/UI/svgs/GopherHomeLinks.tsx +++ b/src/components/UI/svgs/GopherHomeLinks.tsx @@ -7,2498 +7,7 @@ const Icon = createIcon({ displayName: 'GopherHomeLinks', viewBox: `0 0 ${w} ${h}`, path: ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ) }); diff --git a/src/components/UI/svgs/GopherHomeNodes.tsx b/src/components/UI/svgs/GopherHomeNodes.tsx index f80517c2c7..5588dd9de2 100644 --- a/src/components/UI/svgs/GopherHomeNodes.tsx +++ b/src/components/UI/svgs/GopherHomeNodes.tsx @@ -7,1784 +7,7 @@ const Icon = createIcon({ displayName: 'GopherHomeNodes', viewBox: `0 0 ${w} ${h}`, path: ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + ) }); diff --git a/src/components/UI/svgs/MinusIcon.tsx b/src/components/UI/svgs/MinusIcon.tsx index 71a72d1b92..9f789e2eea 100644 --- a/src/components/UI/svgs/MinusIcon.tsx +++ b/src/components/UI/svgs/MinusIcon.tsx @@ -7,11 +7,7 @@ const Icon = createIcon({ displayName: 'MinusIcon', viewBox: `0 0 ${w} ${h}`, path: ( - - - - - + ) }); diff --git a/src/components/layouts/Footer.tsx b/src/components/layouts/Footer.tsx index 42c394c2fe..e230636cba 100644 --- a/src/components/layouts/Footer.tsx +++ b/src/components/layouts/Footer.tsx @@ -41,10 +41,9 @@ export const Footer: FC = () => { _hover={hoverStyles} borderRight='2px solid' borderColor='primary' - p={4} > - + DOWNLOADS @@ -59,10 +58,9 @@ export const Footer: FC = () => { md: '2px solid' }} borderColor='primary' - p={4} > - + DOCUMENTATION @@ -80,9 +78,8 @@ export const Footer: FC = () => { }} borderColor='primary !important' _hover={hoverStyles} - p={4} > - + @@ -94,15 +91,14 @@ export const Footer: FC = () => { borderWidth='2px' borderStyle='none solid' borderColor='primary' - p={4} > - + -
- +
+
From 64ae7579bd36305bd16c05a693087def7646b920 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 11:45:08 -0700 Subject: [PATCH 49/65] update header styles --- src/components/UI/docs/MDComponents.tsx | 8 ++++---- src/theme/foundations/textStyles.ts | 16 ++++------------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index e7d09ff17a..852ee781a3 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -15,7 +15,7 @@ import { Code, Note } from '.'; import { textStyles } from '../../../theme/foundations'; import { parseHeadingId } from '../../../utils/parseHeadingId'; -const { h1, header2, header3, header4 } = textStyles; +const { h1, h2, h3, h4 } = textStyles; const MDComponents = { // paragraphs @@ -59,7 +59,7 @@ const MDComponents = { textAlign='start' mt={{ base: '12 !important', md: '16 !important' }} mb='4 !important' - {...header2} + {...h2} id={headingId} > {parsedChildren} @@ -69,7 +69,7 @@ const MDComponents = { h3: ({ children }: any) => { const { children: parsedChildren, headingId } = parseHeadingId(children); return ( - + {parsedChildren} ); @@ -78,7 +78,7 @@ const MDComponents = { const { children: parsedChildren, headingId } = parseHeadingId(children); return ( - + {parsedChildren} ); diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index 9ed116e70e..0cd8bff7ed 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -15,36 +15,28 @@ export const textStyles = { letterSpacing: { base: '0.03rem', md: '0.04rem' }, color: 'body' }, - - header2: { - fontFamily: 'heading', - fontSize: { base: '1.5rem', md: '1.75rem' }, - letterSpacing: { base: '0.03rem', md: '0.04rem' }, - lineHeight: 'normal', - color: 'body' - }, - header3: { + h3: { fontFamily: 'heading', fontSize: { base: '1.25rem', md: '1.375rem' }, letterSpacing: { base: '0.03rem', md: '0.04rem' }, lineHeight: 'normal', color: 'body' }, - header4: { + h4: { fontFamily: 'heading', fontSize: '1.125rem', letterSpacing: { base: '0.03rem', md: '0.04rem' }, lineHeight: 'normal', color: 'body' }, - header5: { + h5: { fontFamily: 'heading', fontSize: '1rem', letterSpacing: '0.02rem', lineHeight: 'normal', color: 'body' }, - header6: { + h6: { fontFamily: 'heading', fontSize: '0.875rem', letterSpacing: '0.02rem', From 62aff31a2e987fb53cda7764910107cd99f6761a Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 11:58:30 -0700 Subject: [PATCH 50/65] Update src/components/UI/docs/DocsNav.tsx Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> --- src/components/UI/docs/DocsNav.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/UI/docs/DocsNav.tsx b/src/components/UI/docs/DocsNav.tsx index e086db3748..5bccc680c4 100644 --- a/src/components/UI/docs/DocsNav.tsx +++ b/src/components/UI/docs/DocsNav.tsx @@ -17,12 +17,10 @@ interface Props { } export const DocsNav: FC = ({ navLinks }) => { - const OPEN = 0; - const CLOSED = -1; - const [mobileAccordionState, setMobileAccordionState] = useState(CLOSED) + const [isMobileAccordionOpen, setIsMobileAccordionOpen] = useState(false) - const updateMobileAccordionState = () => { - setMobileAccordionState(mobileAccordionState === OPEN ? CLOSED : OPEN) + const toggleMobileAccordion = () => { + setMobileAccordionState(prev => !prev) } return ( From 657083d7f28b4671ee99016d4fde3a88319cb5e2 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 12:03:22 -0700 Subject: [PATCH 51/65] change requests --- src/components/UI/docs/DocsLinks.tsx | 8 ++++---- src/components/UI/docs/DocsNav.tsx | 8 ++++---- src/components/UI/docs/LinksList.tsx | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index dcb8d1e3b9..fefa420555 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -19,10 +19,10 @@ import { NavLink } from '../../../types'; interface Props { navLinks: NavLink[]; - updateMobileAccordionState: () => void; + toggleMobileAccordion: () => void; } -export const DocsLinks: FC = ({ navLinks, updateMobileAccordionState }) => { +export const DocsLinks: FC = ({ navLinks, toggleMobileAccordion }) => { const router = useRouter(); const { slug } = router.query; return ( @@ -53,7 +53,7 @@ export const DocsLinks: FC = ({ navLinks, updateMobileAccordionState }) = _groupHover={{ background: 'primary', color: 'bg', textDecoration: 'none' }} > {to ? ( - + = ({ navLinks, updateMobileAccordionState }) = {items && ( - + )} diff --git a/src/components/UI/docs/DocsNav.tsx b/src/components/UI/docs/DocsNav.tsx index 5bccc680c4..91f8d37ce3 100644 --- a/src/components/UI/docs/DocsNav.tsx +++ b/src/components/UI/docs/DocsNav.tsx @@ -17,7 +17,7 @@ interface Props { } export const DocsNav: FC = ({ navLinks }) => { - const [isMobileAccordionOpen, setIsMobileAccordionOpen] = useState(false) + const [isMobileAccordionOpen, setMobileAccordionState] = useState(false) const toggleMobileAccordion = () => { setMobileAccordionState(prev => !prev) @@ -26,11 +26,11 @@ export const DocsNav: FC = ({ navLinks }) => { return ( - + - + = ({ navLinks }) => { - + diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx index 152f720b11..ef6f027770 100644 --- a/src/components/UI/docs/LinksList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -7,10 +7,10 @@ import { NavLink } from '../../../types'; interface LinksListProps { links: NavLink[]; - updateMobileAccordionState: () => void; + toggleMobileAccordion: () => void; } -export const LinksList: FC = ({ links, updateMobileAccordionState }) => { +export const LinksList: FC = ({ links, toggleMobileAccordion }) => { const router = useRouter(); const { slug } = router.query; return ( @@ -25,7 +25,7 @@ export const LinksList: FC = ({ links, updateMobileAccordionStat _hover={{ background: 'primary', color: 'bg' }} data-group > - + = ({ links, updateMobileAccordionStat - {items && } + {items && } ) : ( {id} - {items && } + {items && } ); })} From 5a23b89c064cf44a6a18e13d388ea75011968890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 12 Dec 2022 16:10:15 -0300 Subject: [PATCH 52/65] chore: remove MDX dependencies and Provider --- next.config.js | 16 +- package.json | 3 - src/pages/_app.tsx | 11 +- yarn.lock | 388 +-------------------------------------------- 4 files changed, 9 insertions(+), 409 deletions(-) diff --git a/next.config.js b/next.config.js index e4c09dd39c..1285e663dd 100644 --- a/next.config.js +++ b/next.config.js @@ -1,22 +1,12 @@ /** @type {import('next').NextConfig} */ const { redirects: redirectsList } = require('./redirects'); -const withMDX = require('@next/mdx')({ - extension: /\.mdx?$/, - options: { - remarkPlugins: [], - rehypePlugins: [] - // If you use `MDXProvider`, uncomment the following line. - // providerImportSource: "@mdx-js/react", - } -}); - -module.exports = withMDX({ +module.exports = { reactStrictMode: true, swcMinify: true, // Append the default value with md extensions - pageExtensions: ['ts', 'tsx', 'md', 'mdx'], + pageExtensions: ['ts', 'tsx', 'md'], async redirects() { return redirectsList; } -}); +}; diff --git a/package.json b/package.json index 03d17beada..124a93d3d1 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,6 @@ "@chakra-ui/react": "^2.3.2", "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", - "@mdx-js/loader": "^2.1.3", - "@mdx-js/react": "^2.1.3", - "@next/mdx": "^12.3.0", "chakra-ui-markdown-renderer": "^4.1.0", "fast-xml-parser": "^4.0.12", "focus-visible": "^5.2.0", diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index c2e8daec60..3647775531 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,22 +1,17 @@ import { ChakraProvider } from '@chakra-ui/react'; import { AppProps } from 'next/app'; -import { MDXProvider } from '@mdx-js/react'; import { Layout } from '../components/layouts'; -import MDComponents from '../components/UI/docs'; - import 'focus-visible/dist/focus-visible'; import theme from '../theme'; export default function App({ Component, pageProps }: AppProps) { return ( - - - - - + + + ); } diff --git a/yarn.lock b/yarn.lock index 743c2805cf..070259b380 100644 --- a/yarn.lock +++ b/yarn.lock @@ -970,45 +970,6 @@ resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@mdx-js/loader@^2.1.3": - version "2.1.3" - resolved "https://registry.npmjs.org/@mdx-js/loader/-/loader-2.1.3.tgz" - integrity sha512-7LtklcfzZC9aWWFREop0ivemhwcp/cke2tICHEhnDyGn+hTg7LIbWCfSos68kJv9w7Z47KYfNcg9/8zBD+8eXA== - dependencies: - "@mdx-js/mdx" "^2.0.0" - source-map "^0.7.0" - -"@mdx-js/mdx@^2.0.0": - version "2.1.3" - resolved "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-2.1.3.tgz" - integrity sha512-ahbb47HJIJ4xnifaL06tDJiSyLEy1EhFAStO7RZIm3GTa7yGW3NGhZaj+GUCveFgl5oI54pY4BgiLmYm97y+zg== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/mdx" "^2.0.0" - estree-util-build-jsx "^2.0.0" - estree-util-is-identifier-name "^2.0.0" - estree-util-to-js "^1.1.0" - estree-walker "^3.0.0" - hast-util-to-estree "^2.0.0" - markdown-extensions "^1.0.0" - periscopic "^3.0.0" - remark-mdx "^2.0.0" - remark-parse "^10.0.0" - remark-rehype "^10.0.0" - unified "^10.0.0" - unist-util-position-from-estree "^1.0.0" - unist-util-stringify-position "^3.0.0" - unist-util-visit "^4.0.0" - vfile "^5.0.0" - -"@mdx-js/react@^2.1.3": - version "2.1.3" - resolved "https://registry.npmjs.org/@mdx-js/react/-/react-2.1.3.tgz" - integrity sha512-11n4lTvvRyxq3OYbWJwEYM+7q6PE0GxKbk0AwYIIQmrRkxDeljIsjDQkKOgdr/orgRRbYy5zi+iERdnwe01CHQ== - dependencies: - "@types/mdx" "^2.0.0" - "@types/react" ">=16" - "@motionone/animation@^10.13.1": version "10.14.0" resolved "https://registry.npmjs.org/@motionone/animation/-/animation-10.14.0.tgz" @@ -1074,11 +1035,6 @@ dependencies: glob "7.1.7" -"@next/mdx@^12.3.0": - version "12.3.0" - resolved "https://registry.npmjs.org/@next/mdx/-/mdx-12.3.0.tgz" - integrity sha512-XyzLhgsKa4lKb3dw8HFtj4MM0jilDStKtosFrkt8AX44zEwxPoJPaIvMCWNsRwq72YTzQLqh1gjepIe9zCKZwQ== - "@next/swc-android-arm-eabi@13.0.2": version "13.0.2" resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.0.2.tgz#66669b8aab5062f554b8e9905d855679aabf0342" @@ -1182,13 +1138,6 @@ dependencies: tslib "^2.4.0" -"@types/acorn@^4.0.0": - version "4.0.6" - resolved "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz" - integrity sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ== - dependencies: - "@types/estree" "*" - "@types/debug@^4.0.0": version "4.1.7" resolved "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz" @@ -1196,18 +1145,6 @@ dependencies: "@types/ms" "*" -"@types/estree-jsx@^1.0.0": - version "1.0.0" - resolved "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.0.tgz" - integrity sha512-3qvGd0z8F2ENTGr/GG1yViqfiKmRfrXVx5sJyHGFu3z7m5g5utCQtGp/g29JnjflhtQJBv1WDQukHiT58xPcYQ== - dependencies: - "@types/estree" "*" - -"@types/estree@*", "@types/estree@^1.0.0": - version "1.0.0" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - "@types/hast@^2.0.0": version "2.3.4" resolved "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz" @@ -1249,11 +1186,6 @@ resolved "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.2.tgz" integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== -"@types/mdx@^2.0.0": - version "2.0.2" - resolved "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.2.tgz" - integrity sha512-mJGfgj4aWpiKb8C0nnJJchs1sHBHn0HugkVfqqyQi7Wn6mBRksLeQsPOFvih/Pu8L1vlDzfe/LidhVHBeUk3aQ== - "@types/ms@*": version "0.7.31" resolved "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz" @@ -1293,7 +1225,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@18.0.18", "@types/react@>=16": +"@types/react@*", "@types/react@18.0.18": version "18.0.18" resolved "https://registry.npmjs.org/@types/react/-/react-18.0.18.tgz" integrity sha512-6hI08umYs6NaiHFEEGioXnxJ+oEhY3eRz8VCUaudZmGdtvPviCJB8mgaMxaDWAdPSYd4eFavrPk2QIolwbLYrg== @@ -1366,12 +1298,12 @@ resolved "https://registry.npmjs.org/@zag-js/focus-visible/-/focus-visible-0.1.0.tgz" integrity sha512-PeaBcTmdZWcFf7n1aM+oiOdZc+sy14qi0emPIeUuGMTjbP0xLGrZu43kdpHnWSXy7/r4Ubp/vlg50MCV8+9Isg== -acorn-jsx@^5.0.0, acorn-jsx@^5.3.2: +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.0.0, acorn@^8.8.0: +acorn@^8.8.0: version "8.8.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== @@ -1473,11 +1405,6 @@ ast-types-flow@^0.0.7: resolved "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz" integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== -astring@^1.8.0: - version "1.8.3" - resolved "https://registry.npmjs.org/astring/-/astring-1.8.3.tgz" - integrity sha512-sRpyiNrx2dEYIMmUXprS8nlpRg2Drs8m9ElX9vVEXaCB4XEAJhKfs7IcX0IwShjuOAjLR6wzIrgoptz1n19i1A== - axe-core@^4.4.3: version "4.4.3" resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz" @@ -1569,21 +1496,11 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -character-entities-html4@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz" - integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== - character-entities-legacy@^1.0.0: version "1.1.4" resolved "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz" integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== -character-entities-legacy@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz" - integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== - character-entities@^1.0.0: version "1.2.4" resolved "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz" @@ -1599,11 +1516,6 @@ character-reference-invalid@^1.0.0: resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz" integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== -character-reference-invalid@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz" - integrity sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw== - client-only@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" @@ -2075,49 +1987,6 @@ estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -estree-util-attach-comments@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/estree-util-attach-comments/-/estree-util-attach-comments-2.1.0.tgz" - integrity sha512-rJz6I4L0GaXYtHpoMScgDIwM0/Vwbu5shbMeER596rB2D1EWF6+Gj0e0UKzJPZrpoOc87+Q2kgVFHfjAymIqmw== - dependencies: - "@types/estree" "^1.0.0" - -estree-util-build-jsx@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/estree-util-build-jsx/-/estree-util-build-jsx-2.2.0.tgz" - integrity sha512-apsfRxF9uLrqosApvHVtYZjISPvTJ+lBiIydpC+9wE6cF6ssbhnjyQLqaIjgzGxvC2Hbmec1M7g91PoBayYoQQ== - dependencies: - "@types/estree-jsx" "^1.0.0" - estree-util-is-identifier-name "^2.0.0" - estree-walker "^3.0.0" - -estree-util-is-identifier-name@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/estree-util-is-identifier-name/-/estree-util-is-identifier-name-2.0.1.tgz" - integrity sha512-rxZj1GkQhY4x1j/CSnybK9cGuMFQYFPLq0iNyopqf14aOVLFtMv7Esika+ObJWPWiOHuMOAHz3YkWoLYYRnzWQ== - -estree-util-to-js@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/estree-util-to-js/-/estree-util-to-js-1.1.0.tgz" - integrity sha512-490lbfCcpLk+ofK6HCgqDfYs4KAfq6QVvDw3+Bm1YoKRgiOjKiKYGAVQE1uwh7zVxBgWhqp4FDtp5SqunpUk1A== - dependencies: - "@types/estree-jsx" "^1.0.0" - astring "^1.8.0" - source-map "^0.7.0" - -estree-util-visit@^1.0.0: - version "1.2.0" - resolved "https://registry.npmjs.org/estree-util-visit/-/estree-util-visit-1.2.0.tgz" - integrity sha512-wdsoqhWueuJKsh5hqLw3j8lwFqNStm92VcwtAOAny8g/KS/l5Y8RISjR4k5W6skCj3Nirag/WUCMS0Nfy3sgsg== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/unist" "^2.0.0" - -estree-walker@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.1.tgz" - integrity sha512-woY0RUD87WzMBUiZLx8NsYr23N5BKsOMZHhu2hoNRVh6NXGfoiT1KOL8G3UHlJAnEDGmfa5ubNA/AacfG+Kb0g== - esutils@^2.0.2: version "2.0.3" resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" @@ -2488,27 +2357,6 @@ hast-util-raw@^7.2.0: web-namespaces "^2.0.0" zwitch "^2.0.0" -hast-util-to-estree@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-2.1.0.tgz" - integrity sha512-Vwch1etMRmm89xGgz+voWXvVHba2iiMdGMKmaMfYt35rbVtFDq8JNwwAIvi8zHMkO6Gvqo9oTMwJTmzVRfXh4g== - dependencies: - "@types/estree" "^1.0.0" - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/unist" "^2.0.0" - comma-separated-tokens "^2.0.0" - estree-util-attach-comments "^2.0.0" - estree-util-is-identifier-name "^2.0.0" - hast-util-whitespace "^2.0.0" - mdast-util-mdx-expression "^1.0.0" - mdast-util-mdxjs-esm "^1.0.0" - property-information "^6.0.0" - space-separated-tokens "^2.0.0" - style-to-object "^0.3.0" - unist-util-position "^4.0.0" - zwitch "^2.0.0" - hast-util-to-parse5@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/hast-util-to-parse5/-/hast-util-to-parse5-7.0.0.tgz#a39808e69005d10afeed1866029a1fb137df3f7c" @@ -2627,11 +2475,6 @@ is-alphabetical@^1.0.0: resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz" integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== -is-alphabetical@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz" - integrity sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ== - is-alphanumerical@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz" @@ -2640,14 +2483,6 @@ is-alphanumerical@^1.0.0: is-alphabetical "^1.0.0" is-decimal "^1.0.0" -is-alphanumerical@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz" - integrity sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw== - dependencies: - is-alphabetical "^2.0.0" - is-decimal "^2.0.0" - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" @@ -2697,11 +2532,6 @@ is-decimal@^1.0.0: resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz" integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== -is-decimal@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz" - integrity sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A== - is-extendable@^0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" @@ -2724,11 +2554,6 @@ is-hexadecimal@^1.0.0: resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== -is-hexadecimal@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz" - integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg== - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" @@ -2751,13 +2576,6 @@ is-plain-obj@^4.0.0: resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz" integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== -is-reference@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-reference/-/is-reference-3.0.0.tgz" - integrity sha512-Eo1W3wUoHWoCoVM4GVl/a+K0IgiqE5aIo4kJABFyMum1ZORlPkC+UC357sSQUL5w5QCE5kCC9upl75b7+7CY/Q== - dependencies: - "@types/estree" "*" - is-regex@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" @@ -2928,11 +2746,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -markdown-extensions@^1.0.0: - version "1.1.1" - resolved "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-1.1.1.tgz" - integrity sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q== - markdown-table@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.2.tgz#9b59eb2c1b22fe71954a65ff512887065a7bb57c" @@ -3032,53 +2845,6 @@ mdast-util-gfm@^2.0.0: mdast-util-gfm-task-list-item "^1.0.0" mdast-util-to-markdown "^1.0.0" -mdast-util-mdx-expression@^1.0.0: - version "1.3.0" - resolved "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-1.3.0.tgz" - integrity sha512-9kTO13HaL/ChfzVCIEfDRdp1m5hsvsm6+R8yr67mH+KS2ikzZ0ISGLPTbTswOFpLLlgVHO9id3cul4ajutCvCA== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-from-markdown "^1.0.0" - mdast-util-to-markdown "^1.0.0" - -mdast-util-mdx-jsx@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mdast-util-mdx-jsx/-/mdast-util-mdx-jsx-2.1.0.tgz" - integrity sha512-KzgzfWMhdteDkrY4mQtyvTU5bc/W4ppxhe9SzelO6QUUiwLAM+Et2Dnjjprik74a336kHdo0zKm7Tp+n6FFeRg== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - ccount "^2.0.0" - mdast-util-to-markdown "^1.3.0" - parse-entities "^4.0.0" - stringify-entities "^4.0.0" - unist-util-remove-position "^4.0.0" - unist-util-stringify-position "^3.0.0" - vfile-message "^3.0.0" - -mdast-util-mdx@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/mdast-util-mdx/-/mdast-util-mdx-2.0.0.tgz" - integrity sha512-M09lW0CcBT1VrJUaF/PYxemxxHa7SLDHdSn94Q9FhxjCQfuW7nMAWKWimTmA3OyDMSTH981NN1csW1X+HPSluw== - dependencies: - mdast-util-mdx-expression "^1.0.0" - mdast-util-mdx-jsx "^2.0.0" - mdast-util-mdxjs-esm "^1.0.0" - -mdast-util-mdxjs-esm@^1.0.0: - version "1.3.0" - resolved "https://registry.npmjs.org/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-1.3.0.tgz" - integrity sha512-7N5ihsOkAEGjFotIX9p/YPdl4TqUoMxL4ajNz7PbT89BqsdWJuBC9rvgt6wpbwTZqWWR0jKWqQbwsOWDBUZv4g== - dependencies: - "@types/estree-jsx" "^1.0.0" - "@types/hast" "^2.0.0" - "@types/mdast" "^3.0.0" - mdast-util-from-markdown "^1.0.0" - mdast-util-to-markdown "^1.0.0" - mdast-util-to-hast@^12.1.0: version "12.2.1" resolved "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-12.2.1.tgz" @@ -3226,69 +2992,6 @@ micromark-extension-gfm@^2.0.0: micromark-util-combine-extensions "^1.0.0" micromark-util-types "^1.0.0" -micromark-extension-mdx-expression@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/micromark-extension-mdx-expression/-/micromark-extension-mdx-expression-1.0.3.tgz" - integrity sha512-TjYtjEMszWze51NJCZmhv7MEBcgYRgb3tJeMAJ+HQCAaZHHRBaDCccqQzGizR/H4ODefP44wRTgOn2vE5I6nZA== - dependencies: - micromark-factory-mdx-expression "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-events-to-acorn "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - -micromark-extension-mdx-jsx@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/micromark-extension-mdx-jsx/-/micromark-extension-mdx-jsx-1.0.3.tgz" - integrity sha512-VfA369RdqUISF0qGgv2FfV7gGjHDfn9+Qfiv5hEwpyr1xscRj/CiVRkU7rywGFCO7JwJ5L0e7CJz60lY52+qOA== - dependencies: - "@types/acorn" "^4.0.0" - estree-util-is-identifier-name "^2.0.0" - micromark-factory-mdx-expression "^1.0.0" - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - vfile-message "^3.0.0" - -micromark-extension-mdx-md@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-extension-mdx-md/-/micromark-extension-mdx-md-1.0.0.tgz" - integrity sha512-xaRAMoSkKdqZXDAoSgp20Azm0aRQKGOl0RrS81yGu8Hr/JhMsBmfs4wR7m9kgVUIO36cMUQjNyiyDKPrsv8gOw== - dependencies: - micromark-util-types "^1.0.0" - -micromark-extension-mdxjs-esm@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/micromark-extension-mdxjs-esm/-/micromark-extension-mdxjs-esm-1.0.3.tgz" - integrity sha512-2N13ol4KMoxb85rdDwTAC6uzs8lMX0zeqpcyx7FhS7PxXomOnLactu8WI8iBNXW8AVyea3KIJd/1CKnUmwrK9A== - dependencies: - micromark-core-commonmark "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-events-to-acorn "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - unist-util-position-from-estree "^1.1.0" - uvu "^0.5.0" - vfile-message "^3.0.0" - -micromark-extension-mdxjs@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/micromark-extension-mdxjs/-/micromark-extension-mdxjs-1.0.0.tgz" - integrity sha512-TZZRZgeHvtgm+IhtgC2+uDMR7h8eTKF0QUX9YsgoL9+bADBpBY6SiLvWqnBlLbCEevITmTqmEuY3FoxMKVs1rQ== - dependencies: - acorn "^8.0.0" - acorn-jsx "^5.0.0" - micromark-extension-mdx-expression "^1.0.0" - micromark-extension-mdx-jsx "^1.0.0" - micromark-extension-mdx-md "^1.0.0" - micromark-extension-mdxjs-esm "^1.0.0" - micromark-util-combine-extensions "^1.0.0" - micromark-util-types "^1.0.0" - micromark-factory-destination@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-1.0.0.tgz" @@ -3308,20 +3011,6 @@ micromark-factory-label@^1.0.0: micromark-util-types "^1.0.0" uvu "^0.5.0" -micromark-factory-mdx-expression@^1.0.0: - version "1.0.6" - resolved "https://registry.npmjs.org/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-1.0.6.tgz" - integrity sha512-WRQIc78FV7KrCfjsEf/sETopbYjElh3xAmNpLkd1ODPqxEngP42eVRGbiPEQWpRV27LzqW+XVTvQAMIIRLPnNA== - dependencies: - micromark-factory-space "^1.0.0" - micromark-util-character "^1.0.0" - micromark-util-events-to-acorn "^1.0.0" - micromark-util-symbol "^1.0.0" - micromark-util-types "^1.0.0" - unist-util-position-from-estree "^1.0.0" - uvu "^0.5.0" - vfile-message "^3.0.0" - micromark-factory-space@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/micromark-factory-space/-/micromark-factory-space-1.0.0.tgz" @@ -3405,19 +3094,6 @@ micromark-util-encode@^1.0.0: resolved "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-1.0.1.tgz" integrity sha512-U2s5YdnAYexjKDel31SVMPbfi+eF8y1U4pfiRW/Y8EFVCy/vgxk/2wWTxzcqE71LHtCuCzlBDRU2a5CQ5j+mQA== -micromark-util-events-to-acorn@^1.0.0: - version "1.2.0" - resolved "https://registry.npmjs.org/micromark-util-events-to-acorn/-/micromark-util-events-to-acorn-1.2.0.tgz" - integrity sha512-WWp3bf7xT9MppNuw3yPjpnOxa8cj5ACivEzXJKu0WwnjBYfzaBvIAT9KfeyI0Qkll+bfQtfftSwdgTH6QhTOKw== - dependencies: - "@types/acorn" "^4.0.0" - "@types/estree" "^1.0.0" - estree-util-visit "^1.0.0" - micromark-util-types "^1.0.0" - uvu "^0.5.0" - vfile-location "^4.0.0" - vfile-message "^3.0.0" - micromark-util-html-tag-name@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/micromark-util-html-tag-name/-/micromark-util-html-tag-name-1.1.0.tgz" @@ -3677,20 +3353,6 @@ parse-entities@^2.0.0: is-decimal "^1.0.0" is-hexadecimal "^1.0.0" -parse-entities@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.0.tgz" - integrity sha512-5nk9Fn03x3rEhGaX1FU6IDwG/k+GxLXlFAkgrbM1asuAFl3BhdQWvASaIsmwWypRNcZKHPYnIuOSfIWEyEQnPQ== - dependencies: - "@types/unist" "^2.0.0" - character-entities "^2.0.0" - character-entities-legacy "^3.0.0" - character-reference-invalid "^2.0.0" - decode-named-character-reference "^1.0.0" - is-alphanumerical "^2.0.0" - is-decimal "^2.0.0" - is-hexadecimal "^2.0.0" - parse-json@^5.0.0: version "5.2.0" resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" @@ -3731,14 +3393,6 @@ path-type@^4.0.0: resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -periscopic@^3.0.0: - version "3.0.4" - resolved "https://registry.npmjs.org/periscopic/-/periscopic-3.0.4.tgz" - integrity sha512-SFx68DxCv0Iyo6APZuw/AKewkkThGwssmU0QWtTlvov3VAtPX+QJ4CadwSaz8nrT5jPIuxdvJWB4PnD2KNDxQg== - dependencies: - estree-walker "^3.0.0" - is-reference "^3.0.0" - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" @@ -3975,14 +3629,6 @@ remark-gfm@^3.0.1: micromark-extension-gfm "^2.0.0" unified "^10.0.0" -remark-mdx@^2.0.0: - version "2.1.3" - resolved "https://registry.npmjs.org/remark-mdx/-/remark-mdx-2.1.3.tgz" - integrity sha512-3SmtXOy9+jIaVctL8Cs3VAQInjRLGOwNXfrBB9KCT+EpJpKD3PQiy0x8hUNGyjQmdyOs40BqgPU7kYtH9uoR6w== - dependencies: - mdast-util-mdx "^2.0.0" - micromark-extension-mdxjs "^1.0.0" - remark-parse@^10.0.0: version "10.0.1" resolved "https://registry.npmjs.org/remark-parse/-/remark-parse-10.0.1.tgz" @@ -4119,11 +3765,6 @@ source-map@^0.5.7: resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== -source-map@^0.7.0: - version "0.7.4" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - space-separated-tokens@^1.0.0: version "1.1.5" resolved "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz" @@ -4171,14 +3812,6 @@ string.prototype.trimstart@^1.0.5: define-properties "^1.1.4" es-abstract "^1.19.5" -stringify-entities@^4.0.0: - version "4.0.3" - resolved "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz" - integrity sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g== - dependencies: - character-entities-html4 "^2.0.0" - character-entities-legacy "^3.0.0" - strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -4378,13 +4011,6 @@ unist-util-is@^5.0.0: resolved "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.1.1.tgz" integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ== -unist-util-position-from-estree@^1.0.0, unist-util-position-from-estree@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-1.1.1.tgz" - integrity sha512-xtoY50b5+7IH8tFbkw64gisG9tMSpxDjhX9TmaJJae/XuxQ9R/Kc8Nv1eOsf43Gt4KV/LkriMy9mptDr7XLcaw== - dependencies: - "@types/unist" "^2.0.0" - unist-util-position@^4.0.0: version "4.0.3" resolved "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.3.tgz" @@ -4392,14 +4018,6 @@ unist-util-position@^4.0.0: dependencies: "@types/unist" "^2.0.0" -unist-util-remove-position@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-4.0.1.tgz" - integrity sha512-0yDkppiIhDlPrfHELgB+NLQD5mfjup3a8UYclHruTJWmY74je8g+CIFr79x5f6AkmzSwlvKLbs63hC0meOMowQ== - dependencies: - "@types/unist" "^2.0.0" - unist-util-visit "^4.0.0" - unist-util-stringify-position@^3.0.0: version "3.0.2" resolved "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.2.tgz" From 8241aefcb47a38501cd71c445c4017c37b70ef83 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 20:16:59 +0100 Subject: [PATCH 53/65] update colors (#154) --- src/theme/foundations/colors.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/theme/foundations/colors.ts b/src/theme/foundations/colors.ts index 16477ffa52..cf74a0e6ca 100644 --- a/src/theme/foundations/colors.ts +++ b/src/theme/foundations/colors.ts @@ -7,14 +7,14 @@ export const colors = { 400: '#1FD3B0', 500: '#2EBDA1', 600: '#11866f', - 700: '#08715C', - 800: '#25453f', + 700: '#25534A', + 800: '#173C35', 900: '#01100D' }, gray: { 800: '#1d242c' }, yellow: { - 50: '#f0f2e2' + 50: '#FBFDEF' } }; From fbd09362f2a0d401fe0b93d20316a9110fb07fe3 Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Mon, 12 Dec 2022 20:26:54 +0100 Subject: [PATCH 54/65] add legacyBehavior prop --- src/components/UI/docs/LinksList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx index ef6f027770..aec85947c6 100644 --- a/src/components/UI/docs/LinksList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -25,7 +25,7 @@ export const LinksList: FC = ({ links, toggleMobileAccordion }) _hover={{ background: 'primary', color: 'bg' }} data-group > - + Date: Mon, 12 Dec 2022 12:01:20 -0800 Subject: [PATCH 55/65] fix onClick vs legacyBehavior adds missing legacyBehavior attribute to NextLink tags to prevent nesting anchor elements which was causing hydration warnings. Also fixes 'The legacy behavior requires onClick be set on the child of next/link' --- src/components/UI/docs/DocsLinks.tsx | 4 ++-- src/components/UI/docs/LinksList.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index fefa420555..509236f7d9 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -53,8 +53,8 @@ export const DocsLinks: FC = ({ navLinks, toggleMobileAccordion }) => { _groupHover={{ background: 'primary', color: 'bg', textDecoration: 'none' }} > {to ? ( - - + + = ({ links, toggleMobileAccordion }) _hover={{ background: 'primary', color: 'bg' }} data-group > - - + + Date: Mon, 12 Dec 2022 13:46:11 -0700 Subject: [PATCH 56/65] linux stables build --- src/components/UI/DataTable.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/UI/DataTable.tsx b/src/components/UI/DataTable.tsx index 3798a4b08d..bc0452b96b 100644 --- a/src/components/UI/DataTable.tsx +++ b/src/components/UI/DataTable.tsx @@ -85,15 +85,10 @@ export const DataTable: FC = ({ columnHeaders, data }) => { const isLatestStableLinuxRelease = os === 'linux' && data + .slice(0, 12) // get latest build to filter on .filter( (e: ReleaseData) => e.arch === '64-bit' && !e.release.url.includes('unstable') - ) - .every((elem: ReleaseData) => { - console.log('release:', r); - console.log('elem:', elem); - - return new Date(r.published) >= new Date(elem.published); - }); + ).includes(r) const x = data.filter((e: ReleaseData, _: any, array: any) => { const maxDate = array From 776616f45db1be98a94f9e786679fd253d26cb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 12 Dec 2022 19:44:42 -0300 Subject: [PATCH 57/65] chore: update utils --- src/utils/getOS.ts | 11 +++++++++++ src/utils/index.ts | 5 +++++ src/utils/isDarwinPrimaryRelease.ts | 8 ++++++++ src/utils/isLinuxPrimaryRelease.ts | 8 ++++++++ src/utils/isMobilePrimaryRelease.ts | 8 ++++++++ src/utils/isWindowsPrimaryRelease.ts | 8 ++++++++ 6 files changed, 48 insertions(+) create mode 100644 src/utils/getOS.ts create mode 100644 src/utils/isDarwinPrimaryRelease.ts create mode 100644 src/utils/isLinuxPrimaryRelease.ts create mode 100644 src/utils/isMobilePrimaryRelease.ts create mode 100644 src/utils/isWindowsPrimaryRelease.ts diff --git a/src/utils/getOS.ts b/src/utils/getOS.ts new file mode 100644 index 0000000000..b2a3c61a1d --- /dev/null +++ b/src/utils/getOS.ts @@ -0,0 +1,11 @@ +import { OS } from '../types'; + +// slice to get the last part of the url that includes the os +export const getOS = (url: string): OS => + url?.slice(46).includes('darwin') + ? 'darwin' + : url?.slice(46).includes('linux') + ? 'linux' + : url?.slice(46).includes('windows') + ? 'windows' + : 'mobile'; diff --git a/src/utils/index.ts b/src/utils/index.ts index 206b319fe8..f950ec7d46 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -5,6 +5,7 @@ export { fetchXMLData } from './fetchXMLData'; export { getChecksum } from './getChecksum'; export { getKebabCaseFromName } from './getKebabCaseFromName'; export { getLatestBinaryURL } from './getLatestBinaryURL'; +export { getOS } from './getOS'; export { getParsedDate } from './getParsedDate'; export { getProgrammingLanguageName } from './getProgrammingLanguageName'; export { getReleaseArch } from './getReleaseArch'; @@ -16,4 +17,8 @@ export { getReleaseSize } from './getReleaseSize'; export { getReleaseURL } from './getReleaseURL'; export { getSignatureURL } from './getSignatureURL'; export { getSortedReleases } from './getSortedReleases'; +export { isDarwinPrimaryRelease } from './isDarwinPrimaryRelease'; +export { isLinuxPrimaryRelease } from './isLinuxPrimaryRelease'; +export { isMobilePrimaryRelease } from './isMobilePrimaryRelease'; +export { isWindowsPrimaryRelease } from './isWindowsPrimaryRelease'; export { mapReleasesData } from './mapReleasesData'; diff --git a/src/utils/isDarwinPrimaryRelease.ts b/src/utils/isDarwinPrimaryRelease.ts new file mode 100644 index 0000000000..1b4f0327e3 --- /dev/null +++ b/src/utils/isDarwinPrimaryRelease.ts @@ -0,0 +1,8 @@ +import { OS, ReleaseData } from '../types'; + +export const isDarwinPrimaryRelease = (r: ReleaseData, os: OS, data: ReleaseData[]) => + os === 'darwin' && + data + .slice(0, 2) // get latest build to filter on + .filter((e: ReleaseData) => e.arch === '64-bit') + .includes(r); diff --git a/src/utils/isLinuxPrimaryRelease.ts b/src/utils/isLinuxPrimaryRelease.ts new file mode 100644 index 0000000000..e2c9437e11 --- /dev/null +++ b/src/utils/isLinuxPrimaryRelease.ts @@ -0,0 +1,8 @@ +import { OS, ReleaseData } from '../types'; + +export const isLinuxPrimaryRelease = (r: ReleaseData, os: OS, data: ReleaseData[]) => + os === 'linux' && + data + .slice(0, 12) // get latest build to filter on + .filter((e: ReleaseData) => e.arch === '64-bit') + .includes(r); diff --git a/src/utils/isMobilePrimaryRelease.ts b/src/utils/isMobilePrimaryRelease.ts new file mode 100644 index 0000000000..fcbdcdc7dc --- /dev/null +++ b/src/utils/isMobilePrimaryRelease.ts @@ -0,0 +1,8 @@ +import { OS, ReleaseData } from '../types'; + +export const isMobilePrimaryRelease = (r: ReleaseData, os: OS, data: ReleaseData[]) => + os === 'mobile' && + data + .filter((e: ReleaseData) => e.arch === 'all') + .slice(0, 1) // get latest build + .includes(r); diff --git a/src/utils/isWindowsPrimaryRelease.ts b/src/utils/isWindowsPrimaryRelease.ts new file mode 100644 index 0000000000..d197232838 --- /dev/null +++ b/src/utils/isWindowsPrimaryRelease.ts @@ -0,0 +1,8 @@ +import { OS, ReleaseData } from '../types'; + +export const isWindowsPrimaryRelease = (r: ReleaseData, os: OS, data: ReleaseData[]) => + os === 'windows' && + data + .slice(0, 6) // get latest build to filter on + .filter((e: ReleaseData) => e.kind === 'Installer' && e.arch === '64-bit') + .includes(r); From 8566e5bb1f8958c4a4c7e40c589688eaa59b28c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 12 Dec 2022 19:44:52 -0300 Subject: [PATCH 58/65] chore: update types --- src/types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types.ts b/src/types.ts index 5104fe71fd..4a93eed9aa 100644 --- a/src/types.ts +++ b/src/types.ts @@ -50,3 +50,5 @@ export interface OpenPGPSignaturesData { }; fingerprint: string; } + +export type OS = 'linux' | 'darwin' | 'windows' | 'mobile'; From dfdf95639ed966c3ec5cc6a8aeb39cd2643d2af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 12 Dec 2022 19:45:26 -0300 Subject: [PATCH 59/65] feat: check if it's primary release --- src/components/UI/DataTable.tsx | 71 +++++++++------------------------ 1 file changed, 19 insertions(+), 52 deletions(-) diff --git a/src/components/UI/DataTable.tsx b/src/components/UI/DataTable.tsx index bc0452b96b..9d51e45178 100644 --- a/src/components/UI/DataTable.tsx +++ b/src/components/UI/DataTable.tsx @@ -11,8 +11,16 @@ import { Stack } from '@chakra-ui/react'; import { FC } from 'react'; + +import { + getOS, + getParsedDate, + isDarwinPrimaryRelease, + isLinuxPrimaryRelease, + isMobilePrimaryRelease, + isWindowsPrimaryRelease +} from '../../utils'; import { OpenPGPSignaturesData, ReleaseData } from '../../types'; -import { getParsedDate } from '../../utils'; interface Props { columnHeaders: string[]; @@ -72,66 +80,25 @@ export const DataTable: FC = ({ columnHeaders, data }) => { {dataType === 'Releases' && data.map((r: ReleaseData, idx: number) => { const url = r?.release?.url; - const os = url?.includes('darwin') - ? 'darwin' - : url?.includes('linux') - ? 'linux' - : url?.includes('windows') - ? 'windows' - : url?.includes('android') - ? 'android' - : 'ios'; + const os = getOS(url); - const isLatestStableLinuxRelease = - os === 'linux' && - data - .slice(0, 12) // get latest build to filter on - .filter( - (e: ReleaseData) => e.arch === '64-bit' && !e.release.url.includes('unstable') - ).includes(r) - - const x = data.filter((e: ReleaseData, _: any, array: any) => { - const maxDate = array - .map((e: ReleaseData) => new Date(e.published)) - .filter((f: Date, _: any, array: any) => - array.every((f: Date) => f <= new Date(e.published)) - ); - - return ( - e.arch === '64-bit' && - !e.release.url.includes('unstable') && - new Date(e.published) === new Date(maxDate) - ); - }); - - console.log(x); - - const latestDarwinRelease = os === 'darwin' && r.arch === '64-bit'; - const latestWindowsRelease = os === 'darwin' && r.kind === 'Installer'; - const latestAndroidRelease = os === 'android' && r.arch === 'all'; - const latestiOSRelease = os === 'ios' && r.arch === 'all'; - - // const latest = data.filter( - // (rel: ReleaseData) => - // os === 'linux' && rel.arch === '64-bit' && !rel.release.url.includes('unstable') - // ); - // .every((otherRelease: ReleaseData) => r.published > otherRelease.published); - - // console.log({ latest }); + const _isLinuxPrimaryRelease = isLinuxPrimaryRelease(r, os, data); + const _isDarwinPrimaryRelease = isDarwinPrimaryRelease(r, os, data); + const _isWindowsPrimaryRelease = isWindowsPrimaryRelease(r, os, data); + const _isMobilePrimaryRelease = isMobilePrimaryRelease(r, os, data); const isPrimaryRelease = - isLatestStableLinuxRelease || - latestDarwinRelease || - latestWindowsRelease || - latestAndroidRelease || - latestiOSRelease; + _isLinuxPrimaryRelease || + _isDarwinPrimaryRelease || + _isWindowsPrimaryRelease || + _isMobilePrimaryRelease; return (
{Object.entries(r).map((item, idx) => { const objectItems = ['release', 'commit', 'signature']; From 266b4a3ec4e421c16468f88ef6baa0054e1d0c1a Mon Sep 17 00:00:00 2001 From: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Date: Tue, 13 Dec 2022 00:34:10 +0100 Subject: [PATCH 60/65] Accessibility (a11y) clean up (#138) * Add hidden skip to content for keyboard a11y * update green.900 value used for button background; increases contrast ratio * adjusts light primary to green.700 for contrast Improves contrast ratio when paired with yellow.50 and removes browser a11y warnings * add aria-labels * add lang to html element * fix improperly ordered headers We should not be using headers (h4/h5) for these aside navigations. Updated to remove browser warnings. * add remaining aria-label * add aria-label for mobile menu --- src/components/UI/Header.tsx | 27 +++++++++++++++++++++----- src/components/UI/docs/DocsNav.tsx | 4 ++-- src/components/UI/docs/DocumentNav.tsx | 4 ++-- src/components/UI/search/Search.tsx | 1 + src/components/layouts/Footer.tsx | 6 +++--- src/components/layouts/MobileMenu.tsx | 1 + src/pages/[...slug].tsx | 2 +- src/pages/_document.tsx | 2 +- src/pages/downloads.tsx | 2 +- src/pages/index.tsx | 4 ++-- 10 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index 2ff2b515b2..02cac559d6 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -19,13 +19,14 @@ export const Header: FC = () => { justifyContent='space-between' position='relative' > - @@ -34,7 +35,22 @@ export const Header: FC = () => { - + + + skip to content + + + {/* HEADER BUTTONS */} @@ -58,6 +74,7 @@ export const Header: FC = () => { bg: 'primary', svg: { color: 'bg' } }} + aria-label={`Toggle ${isDark ? 'light' : 'dark'} mode`} > {isDark ? : } diff --git a/src/components/UI/docs/DocsNav.tsx b/src/components/UI/docs/DocsNav.tsx index 91f8d37ce3..9e83404844 100644 --- a/src/components/UI/docs/DocsNav.tsx +++ b/src/components/UI/docs/DocsNav.tsx @@ -24,7 +24,7 @@ export const DocsNav: FC = ({ navLinks }) => { } return ( - + @@ -49,7 +49,7 @@ export const DocsNav: FC = ({ navLinks }) => { color: 'bg' }} > - + Documentation diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index 564e2ad8df..167d147c4f 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -20,8 +20,8 @@ export const DocumentNav: FC = ({ content }) => { const activeHash = useActiveHash(parsedHeadings.map(heading => heading!.headingId)); return ( - - + + on this page diff --git a/src/components/UI/search/Search.tsx b/src/components/UI/search/Search.tsx index 41a6b364cf..c3aa1f1892 100644 --- a/src/components/UI/search/Search.tsx +++ b/src/components/UI/search/Search.tsx @@ -49,6 +49,7 @@ export const Search: FC = () => { bg: 'primary', svg: { color: 'bg' } }} + aria-label="Search" > diff --git a/src/components/layouts/Footer.tsx b/src/components/layouts/Footer.tsx index e230636cba..9410a43939 100644 --- a/src/components/layouts/Footer.tsx +++ b/src/components/layouts/Footer.tsx @@ -80,7 +80,7 @@ export const Footer: FC = () => { _hover={hoverStyles} > - + @@ -93,13 +93,13 @@ export const Footer: FC = () => { borderColor='primary' > - +
- +
diff --git a/src/components/layouts/MobileMenu.tsx b/src/components/layouts/MobileMenu.tsx index 8dbc08e324..ca52635532 100644 --- a/src/components/layouts/MobileMenu.tsx +++ b/src/components/layouts/MobileMenu.tsx @@ -20,6 +20,7 @@ export const MobileMenu: React.FC = () => { color='primary' _hover={{ bg: 'primary', color: 'bg' }} onClick={onOpen} + aria-label="Open mobile menu" > diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index 86380e3a38..87047ee0ad 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -104,7 +104,7 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - + diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 9a0ff9aa9e..83030e64c9 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -2,7 +2,7 @@ import { Html, Head, Main, NextScript } from 'next/document'; export default function Document() { return ( - + {/* fonts are being loaded here to enable optimization (https://nextjs.org/docs/basic-features/font-optimization) */} {/* JetBrains Mono */} diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index 720f3020ed..a688abf8b5 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -298,7 +298,7 @@ const DownloadsPage: NextPage = ({ data }) => { <> -
+
{ <> -
+
@@ -44,7 +44,7 @@ const HomePage: NextPage = ({}) => { > Geth (go-ethereum) is a{' '} - + Go {' '} implementation of{' '} From 3d722a3ee5a7f56b34971199dddabe3d80d3ef49 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 18:36:54 -0700 Subject: [PATCH 61/65] h2 fontWeight --- src/theme/foundations/textStyles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/foundations/textStyles.ts b/src/theme/foundations/textStyles.ts index 0cd8bff7ed..e2e3b4e7f6 100644 --- a/src/theme/foundations/textStyles.ts +++ b/src/theme/foundations/textStyles.ts @@ -9,7 +9,7 @@ export const textStyles = { }, h2: { fontFamily: 'heading', - fontWeight: 400, + fontWeight: 700, fontSize: { base: '1.5rem', md: '1.75rem' }, lineHeight: 'normal', letterSpacing: { base: '0.03rem', md: '0.04rem' }, From 31233f143375af1b36c8225a1573b1c4ec8e6161 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Mon, 12 Dec 2022 18:57:57 -0700 Subject: [PATCH 62/65] prettier --- src/components/UI/docs/DocsNav.tsx | 16 +- src/components/UI/docs/DocumentNav.tsx | 4 +- src/components/UI/docs/LinksList.tsx | 2 +- src/components/UI/icons/DiscordIcon.tsx | 7 +- src/components/UI/icons/GitHubIcon.tsx | 7 +- src/components/UI/icons/HamburgerIcon.tsx | 7 +- src/components/UI/icons/LensIcon.tsx | 7 +- src/components/UI/icons/LinuxPenguin.tsx | 7 +- src/components/UI/icons/MacosLogo.tsx | 7 +- src/components/UI/icons/MoonIcon.tsx | 7 +- src/components/UI/icons/SourceBranch.tsx | 7 +- src/components/UI/icons/SunIcon.tsx | 7 +- src/components/UI/icons/TwitterIcon.tsx | 7 +- src/components/UI/icons/WindowsLogo.tsx | 7 +- src/components/UI/search/Search.tsx | 10 +- src/components/UI/svgs/AddIcon.tsx | 7 +- src/components/UI/svgs/GlyphHome.tsx | 7 +- src/components/UI/svgs/GopherDownloads.tsx | 346 ++++++++++++++++++++- src/components/UI/svgs/GopherHomeFront.tsx | 317 ++++++++++++++++++- src/components/UI/svgs/GopherHomeLinks.tsx | 243 ++++++++++++++- src/components/UI/svgs/GopherHomeNodes.tsx | 209 ++++++++++++- src/components/UI/svgs/MinusIcon.tsx | 4 +- src/components/layouts/Footer.tsx | 24 +- src/components/layouts/MobileMenu.tsx | 2 +- src/pages/[...slug].tsx | 2 +- src/pages/downloads.tsx | 2 +- src/pages/index.tsx | 2 +- 27 files changed, 1233 insertions(+), 41 deletions(-) diff --git a/src/components/UI/docs/DocsNav.tsx b/src/components/UI/docs/DocsNav.tsx index 9e83404844..34874108c4 100644 --- a/src/components/UI/docs/DocsNav.tsx +++ b/src/components/UI/docs/DocsNav.tsx @@ -17,11 +17,11 @@ interface Props { } export const DocsNav: FC = ({ navLinks }) => { - const [isMobileAccordionOpen, setMobileAccordionState] = useState(false) + const [isMobileAccordionOpen, setMobileAccordionState] = useState(false); const toggleMobileAccordion = () => { - setMobileAccordionState(prev => !prev) - } + setMobileAccordionState(prev => !prev); + }; return ( @@ -30,7 +30,11 @@ export const DocsNav: FC = ({ navLinks }) => { - + = ({ navLinks }) => { color: 'bg' }} > - - Documentation - + Documentation diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index 167d147c4f..cc999dd8be 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -21,9 +21,7 @@ export const DocumentNav: FC = ({ content }) => { return ( - - on this page - + on this page {parsedHeadings.map((heading, idx) => { return ( diff --git a/src/components/UI/docs/LinksList.tsx b/src/components/UI/docs/LinksList.tsx index a86af010b4..72b9d15ea6 100644 --- a/src/components/UI/docs/LinksList.tsx +++ b/src/components/UI/docs/LinksList.tsx @@ -46,7 +46,7 @@ export const LinksList: FC = ({ links, toggleMobileAccordion }) - {items && } + {items && } ) : ( diff --git a/src/components/UI/icons/DiscordIcon.tsx b/src/components/UI/icons/DiscordIcon.tsx index ca1f8f400b..4b0d88f6d6 100644 --- a/src/components/UI/icons/DiscordIcon.tsx +++ b/src/components/UI/icons/DiscordIcon.tsx @@ -4,6 +4,11 @@ export const DiscordIcon = createIcon({ displayName: 'DiscordIcon', viewBox: '0 0 32 24', path: ( - + + + ) }); diff --git a/src/components/UI/icons/GitHubIcon.tsx b/src/components/UI/icons/GitHubIcon.tsx index a74f788c78..f93c60a1a1 100644 --- a/src/components/UI/icons/GitHubIcon.tsx +++ b/src/components/UI/icons/GitHubIcon.tsx @@ -4,6 +4,11 @@ export const GitHubIcon = createIcon({ displayName: 'GitHubIcon', viewBox: '0 0 26 24', path: ( - + + + ) }); diff --git a/src/components/UI/icons/HamburgerIcon.tsx b/src/components/UI/icons/HamburgerIcon.tsx index 879fb072d0..404f1f0c5c 100644 --- a/src/components/UI/icons/HamburgerIcon.tsx +++ b/src/components/UI/icons/HamburgerIcon.tsx @@ -4,6 +4,11 @@ export const HamburgerIcon = createIcon({ displayName: 'HamburgerIcon', viewBox: '0 0 22 14', path: ( - + + + ) }); diff --git a/src/components/UI/icons/LensIcon.tsx b/src/components/UI/icons/LensIcon.tsx index 9ab332e067..f6ef12008c 100644 --- a/src/components/UI/icons/LensIcon.tsx +++ b/src/components/UI/icons/LensIcon.tsx @@ -4,6 +4,11 @@ export const LensIcon = createIcon({ displayName: 'LensIcon', viewBox: '0 0 17 18', path: ( - + + + ) }); diff --git a/src/components/UI/icons/LinuxPenguin.tsx b/src/components/UI/icons/LinuxPenguin.tsx index 2a6d36d1f6..26c85989fc 100644 --- a/src/components/UI/icons/LinuxPenguin.tsx +++ b/src/components/UI/icons/LinuxPenguin.tsx @@ -7,7 +7,12 @@ const Icon = createIcon({ displayName: 'LinuxPenguin', viewBox: `0 0 ${w} ${h}`, path: ( - + + + ) }); diff --git a/src/components/UI/icons/MacosLogo.tsx b/src/components/UI/icons/MacosLogo.tsx index 89a4a6f79e..57d59091da 100644 --- a/src/components/UI/icons/MacosLogo.tsx +++ b/src/components/UI/icons/MacosLogo.tsx @@ -7,7 +7,12 @@ const Icon = createIcon({ displayName: 'MacosLogo', viewBox: `0 0 ${w} ${h}`, path: ( - + + + ) }); diff --git a/src/components/UI/icons/MoonIcon.tsx b/src/components/UI/icons/MoonIcon.tsx index 765625acb8..bdc27c9247 100644 --- a/src/components/UI/icons/MoonIcon.tsx +++ b/src/components/UI/icons/MoonIcon.tsx @@ -4,6 +4,11 @@ export const MoonIcon = createIcon({ displayName: 'MoonIcon', viewBox: '0 0 22 22', path: ( - + + + ) }); diff --git a/src/components/UI/icons/SourceBranch.tsx b/src/components/UI/icons/SourceBranch.tsx index 8c352e1cd3..ea73ad0b7a 100644 --- a/src/components/UI/icons/SourceBranch.tsx +++ b/src/components/UI/icons/SourceBranch.tsx @@ -7,7 +7,12 @@ const Icon = createIcon({ displayName: 'SourceBranch', viewBox: `0 0 ${w} ${h}`, path: ( - + + + ) }); diff --git a/src/components/UI/icons/SunIcon.tsx b/src/components/UI/icons/SunIcon.tsx index 2555a5c128..bda950137d 100644 --- a/src/components/UI/icons/SunIcon.tsx +++ b/src/components/UI/icons/SunIcon.tsx @@ -4,6 +4,11 @@ export const SunIcon = createIcon({ displayName: 'SunIcon', viewBox: '0 0 44 44', path: ( - + + + ) }); diff --git a/src/components/UI/icons/TwitterIcon.tsx b/src/components/UI/icons/TwitterIcon.tsx index be4aff8ef6..dfd5126416 100644 --- a/src/components/UI/icons/TwitterIcon.tsx +++ b/src/components/UI/icons/TwitterIcon.tsx @@ -4,6 +4,11 @@ export const TwitterIcon = createIcon({ displayName: 'TwitterIcon', viewBox: '0 0 28 22', path: ( - + + + ) }); diff --git a/src/components/UI/icons/WindowsLogo.tsx b/src/components/UI/icons/WindowsLogo.tsx index aa94ebeb0b..844528f775 100644 --- a/src/components/UI/icons/WindowsLogo.tsx +++ b/src/components/UI/icons/WindowsLogo.tsx @@ -7,7 +7,12 @@ const Icon = createIcon({ displayName: 'WindowsLogo', viewBox: `0 0 ${w} ${h}`, path: ( - + + + ) }); diff --git a/src/components/UI/search/Search.tsx b/src/components/UI/search/Search.tsx index c3aa1f1892..c6a7b3d9f3 100644 --- a/src/components/UI/search/Search.tsx +++ b/src/components/UI/search/Search.tsx @@ -21,10 +21,10 @@ export const Search: FC = () => { >
- + { outlineOffset={4} /> diff --git a/src/components/UI/svgs/AddIcon.tsx b/src/components/UI/svgs/AddIcon.tsx index 906a2045af..6504dcda23 100644 --- a/src/components/UI/svgs/AddIcon.tsx +++ b/src/components/UI/svgs/AddIcon.tsx @@ -7,7 +7,12 @@ const Icon = createIcon({ displayName: 'AddIcon', viewBox: `0 0 ${w} ${h}`, path: ( - + + + + + + ) }); diff --git a/src/components/UI/svgs/GlyphHome.tsx b/src/components/UI/svgs/GlyphHome.tsx index 2df7b4e989..fc61324277 100644 --- a/src/components/UI/svgs/GlyphHome.tsx +++ b/src/components/UI/svgs/GlyphHome.tsx @@ -7,7 +7,12 @@ const Icon = createIcon({ displayName: 'GlyphHome', viewBox: `0 0 ${w} ${h}`, path: ( - + + + ) }); diff --git a/src/components/UI/svgs/GopherDownloads.tsx b/src/components/UI/svgs/GopherDownloads.tsx index 704e12da78..33704b9ee7 100644 --- a/src/components/UI/svgs/GopherDownloads.tsx +++ b/src/components/UI/svgs/GopherDownloads.tsx @@ -7,7 +7,351 @@ const Icon = createIcon({ displayName: 'GopherDownloads', viewBox: `0 0 ${w} ${h}`, path: ( - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) }); diff --git a/src/components/UI/svgs/GopherHomeFront.tsx b/src/components/UI/svgs/GopherHomeFront.tsx index 551be53ec2..7a5cf11b4f 100644 --- a/src/components/UI/svgs/GopherHomeFront.tsx +++ b/src/components/UI/svgs/GopherHomeFront.tsx @@ -7,7 +7,322 @@ const Icon = createIcon({ displayName: 'GopherHomeFront', viewBox: `0 0 ${w} ${h}`, path: ( - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) }); diff --git a/src/components/UI/svgs/GopherHomeLinks.tsx b/src/components/UI/svgs/GopherHomeLinks.tsx index 84b3ea604b..325e660143 100644 --- a/src/components/UI/svgs/GopherHomeLinks.tsx +++ b/src/components/UI/svgs/GopherHomeLinks.tsx @@ -7,7 +7,248 @@ const Icon = createIcon({ displayName: 'GopherHomeLinks', viewBox: `0 0 ${w} ${h}`, path: ( - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) }); diff --git a/src/components/UI/svgs/GopherHomeNodes.tsx b/src/components/UI/svgs/GopherHomeNodes.tsx index 5588dd9de2..303ca9f3f4 100644 --- a/src/components/UI/svgs/GopherHomeNodes.tsx +++ b/src/components/UI/svgs/GopherHomeNodes.tsx @@ -7,7 +7,214 @@ const Icon = createIcon({ displayName: 'GopherHomeNodes', viewBox: `0 0 ${w} ${h}`, path: ( - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) }); diff --git a/src/components/UI/svgs/MinusIcon.tsx b/src/components/UI/svgs/MinusIcon.tsx index 9f789e2eea..5a956d6b1f 100644 --- a/src/components/UI/svgs/MinusIcon.tsx +++ b/src/components/UI/svgs/MinusIcon.tsx @@ -7,7 +7,9 @@ const Icon = createIcon({ displayName: 'MinusIcon', viewBox: `0 0 ${w} ${h}`, path: ( - + + + ) }); diff --git a/src/components/layouts/Footer.tsx b/src/components/layouts/Footer.tsx index 9410a43939..36e3f13229 100644 --- a/src/components/layouts/Footer.tsx +++ b/src/components/layouts/Footer.tsx @@ -80,7 +80,13 @@ export const Footer: FC = () => { _hover={hoverStyles} > - + @@ -93,13 +99,25 @@ export const Footer: FC = () => { borderColor='primary' > - +
- +
diff --git a/src/components/layouts/MobileMenu.tsx b/src/components/layouts/MobileMenu.tsx index ca52635532..8805c3350c 100644 --- a/src/components/layouts/MobileMenu.tsx +++ b/src/components/layouts/MobileMenu.tsx @@ -20,7 +20,7 @@ export const MobileMenu: React.FC = () => { color='primary' _hover={{ bg: 'primary', color: 'bg' }} onClick={onOpen} - aria-label="Open mobile menu" + aria-label='Open mobile menu' > diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index 4917144991..e6026ae500 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -104,7 +104,7 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified
- + diff --git a/src/pages/downloads.tsx b/src/pages/downloads.tsx index a688abf8b5..b77f2e6749 100644 --- a/src/pages/downloads.tsx +++ b/src/pages/downloads.tsx @@ -298,7 +298,7 @@ const DownloadsPage: NextPage = ({ data }) => { <> -
+
{ <> -
+
From 9e3789e31f92d5151f2ba08317623623177e9ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Tue, 13 Dec 2022 00:07:38 -0300 Subject: [PATCH 63/65] chore: import correct font weight --- src/pages/_document.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 9a0ff9aa9e..63b82cdf35 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -15,7 +15,7 @@ export default function Document() { {/* Inter */} From 42248dcedf157ed24d1ad5e42d07dfd659254098 Mon Sep 17 00:00:00 2001 From: Corwin Smith Date: Tue, 13 Dec 2022 06:23:26 -0700 Subject: [PATCH 64/65] [bug] right side navigation menu is not being rendered ok in some cases (#146) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dont render DocumentNav if there are no headings on a page * Fix layout of elements in [...slug].tsx * fix header * fix span overflow * prettier * fix: missing white-space on pre tags * fix: parsedHeadings bug Co-authored-by: Nicolás Quiroz --- .../rpc/ns-personal-deprecation.md | 2 +- src/components/UI/Header.tsx | 2 ++ src/components/UI/docs/DocumentNav.tsx | 6 ++--- src/components/UI/docs/MDComponents.tsx | 4 ++-- src/pages/[...slug].tsx | 24 +++++++++++-------- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/docs/interacting-with-geth/rpc/ns-personal-deprecation.md b/docs/interacting-with-geth/rpc/ns-personal-deprecation.md index 4f2137ccd0..e06845290c 100644 --- a/docs/interacting-with-geth/rpc/ns-personal-deprecation.md +++ b/docs/interacting-with-geth/rpc/ns-personal-deprecation.md @@ -23,7 +23,7 @@ Unpair deletes a pairing between some specific types of smartcard wallet and Get InitializeWallet is for initializing some specific types of smartcard wallet at a provided URL. There is not yet a corresponding method in Clef. -## Methods with replacements: +## Methods with replacements ### personal_listAccounts diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index 02cac559d6..541d7dcc22 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -39,10 +39,12 @@ export const Header: FC = () => { as='a' href='#main-content' pointerEvents='none' + w='0px' opacity={0} transition='opacity 200ms ease-in-out' _focus={{ opacity: 1, + w: 'auto', transition: 'opacity 200ms ease-in-out' }} > diff --git a/src/components/UI/docs/DocumentNav.tsx b/src/components/UI/docs/DocumentNav.tsx index cc999dd8be..66cbcfa1fd 100644 --- a/src/components/UI/docs/DocumentNav.tsx +++ b/src/components/UI/docs/DocumentNav.tsx @@ -13,13 +13,13 @@ export const DocumentNav: FC = ({ content }) => { const parsedHeadings = content .split('\n\n') .map(item => item.replace(/[\n\r]/g, '')) - .filter(item => item.startsWith('#')) + .filter(item => item.startsWith('##')) .map(item => parseHeadingId([item])) .filter(item => item); const activeHash = useActiveHash(parsedHeadings.map(heading => heading!.headingId)); - return ( + return parsedHeadings.length ? ( on this page @@ -56,5 +56,5 @@ export const DocumentNav: FC = ({ content }) => { ); })} - ); + ) : null; }; diff --git a/src/components/UI/docs/MDComponents.tsx b/src/components/UI/docs/MDComponents.tsx index 852ee781a3..94612e36eb 100644 --- a/src/components/UI/docs/MDComponents.tsx +++ b/src/components/UI/docs/MDComponents.tsx @@ -101,8 +101,8 @@ const MDComponents = { ), // pre pre: ({ children }: any) => ( - -
{children}
+ + {children} ), // code diff --git a/src/pages/[...slug].tsx b/src/pages/[...slug].tsx index e6026ae500..a8f00430eb 100644 --- a/src/pages/[...slug].tsx +++ b/src/pages/[...slug].tsx @@ -1,7 +1,7 @@ import fs from 'fs'; import matter from 'gray-matter'; import yaml from 'js-yaml'; -import { Box, Flex, Stack, Heading, Text } from '@chakra-ui/react'; +import { Box, Grid, Stack, Heading, Text } from '@chakra-ui/react'; import ChakraUIRenderer from 'chakra-ui-markdown-renderer'; import ReactMarkdown from 'react-markdown'; import { useRouter } from 'next/router'; @@ -99,7 +99,10 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified
- + @@ -115,10 +118,14 @@ const DocPage: NextPage = ({ frontmatter, content, navLinks, lastModified - + = ({ frontmatter, content, navLinks, lastModified - + - + - +
); From 362b58bd8a0dd67d6dc281a4e0531862325a5148 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 13 Dec 2022 13:30:30 +0000 Subject: [PATCH 65/65] minor formatting fixes --- docs/monitoring/metrics.md | 4 ++-- docs/tools/puppeth.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/monitoring/metrics.md b/docs/monitoring/metrics.md index 87ce5aecbf..63db533a57 100644 --- a/docs/monitoring/metrics.md +++ b/docs/monitoring/metrics.md @@ -30,11 +30,11 @@ Timers are extensions of _meters_, the _duration_ of an event is collected along - Percentile 80: general performance (these should be optimised) - Percentile 95: worst case outliers (rare, just handle gracefully) -### Counters: {#counters} +### Counters {#counters} A counter is a single int64 value that can be incremented and decremented. The current value of the counter can be queried. -### Gauges: {#guages} +### Gauges {#guages} A gauge is a single int64 value. Its value can increment and decrement - as with a counter - but can also be set arbitrarily. diff --git a/docs/tools/puppeth.md b/docs/tools/puppeth.md index 6c91e6df9b..f70fa7214a 100644 --- a/docs/tools/puppeth.md +++ b/docs/tools/puppeth.md @@ -1,5 +1,5 @@ --- -title: puppeth +title: Puppeth description: introduction to the private-network boot-strapping tool, Puppeth ---
- - {columnHeader} - -
+ + {columnHeader} + +