From 2f7c97f931a3499588e890e18514a91f8afd3bb8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 17 Nov 2024 13:06:06 +0200 Subject: [PATCH 1/4] chore(deps): bump vite in /packages/codemods/tanStack/codeSplitting (#1338) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.2 to 5.4.8. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.8/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.8/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../tanStack/codeSplitting/package-lock.json | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/packages/codemods/tanStack/codeSplitting/package-lock.json b/packages/codemods/tanStack/codeSplitting/package-lock.json index 23a143cf4..db6bbc6dd 100644 --- a/packages/codemods/tanStack/codeSplitting/package-lock.json +++ b/packages/codemods/tanStack/codeSplitting/package-lock.json @@ -3801,7 +3801,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -4135,10 +4134,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "license": "ISC" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -4195,9 +4193,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -4213,11 +4211,10 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -4601,11 +4598,10 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -4945,14 +4941,13 @@ "license": "MIT" }, "node_modules/vite": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.2.tgz", - "integrity": "sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==", + "version": "5.4.8", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz", + "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", "dev": true, - "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.41", + "postcss": "^8.4.43", "rollup": "^4.20.0" }, "bin": { From d609e24e69a6075adc02bc8943fc562ed1ca8955 Mon Sep 17 00:00:00 2001 From: Siamak Date: Mon, 18 Nov 2024 21:18:51 +0330 Subject: [PATCH 2/4] feat: Redesigned blog post (#1383) * feat: Redesigned blog post * chore: Removed unused code --- apps/frontend/components/shared/Icon.tsx | 39 ++- apps/frontend/components/shared/RichText.tsx | 7 +- .../shared/pt.blocks/CodeSnippet.tsx | 2 +- .../components/shared/pt.blocks/Image.tsx | 6 +- .../components/shared/pt.blocks/Quote.tsx | 16 +- .../BlogArticlePageContent.tsx | 331 +++++++----------- apps/frontend/styles/globals.css | 4 +- apps/frontend/tailwind.config.ts | 22 +- 8 files changed, 193 insertions(+), 234 deletions(-) diff --git a/apps/frontend/components/shared/Icon.tsx b/apps/frontend/components/shared/Icon.tsx index 12ef5485d..600d566ff 100644 --- a/apps/frontend/components/shared/Icon.tsx +++ b/apps/frontend/components/shared/Icon.tsx @@ -626,18 +626,24 @@ export default function Icon({ name, className }: IconProps) { case "calendar": return ( + + ); @@ -1648,6 +1654,23 @@ export default function Icon({ name, className }: IconProps) { /> ); + + case "countdown-timer": + return ( + + + + ); } } diff --git a/apps/frontend/components/shared/RichText.tsx b/apps/frontend/components/shared/RichText.tsx index 7325f2563..7ac145cd9 100644 --- a/apps/frontend/components/shared/RichText.tsx +++ b/apps/frontend/components/shared/RichText.tsx @@ -85,7 +85,7 @@ function createDefaultComponents( {...prepareProps(props)} className={cx({ uppercase: usage === "default", - "s-heading py-4": usage === "textPage", + "s-heading py-4": usage === "textPage", })} > {props.children} @@ -101,6 +101,11 @@ function createDefaultComponents( {props.children} ), + p: (props) => ( +

+ {props.children} +

+ ), normal: (props) => (

diff --git a/apps/frontend/components/shared/pt.blocks/Image.tsx b/apps/frontend/components/shared/pt.blocks/Image.tsx index de3bd559e..2c82b6171 100644 --- a/apps/frontend/components/shared/pt.blocks/Image.tsx +++ b/apps/frontend/components/shared/pt.blocks/Image.tsx @@ -4,8 +4,8 @@ import { SanityImage } from "../SanityImage"; export default function ImageBlock(props: ImageBlock) { return ( -

-
+
+
{ {props.caption && ( -

+

{props.caption}

)} diff --git a/apps/frontend/components/shared/pt.blocks/Quote.tsx b/apps/frontend/components/shared/pt.blocks/Quote.tsx index ddb75c708..02e8b71a2 100644 --- a/apps/frontend/components/shared/pt.blocks/Quote.tsx +++ b/apps/frontend/components/shared/pt.blocks/Quote.tsx @@ -3,7 +3,7 @@ import { SanityImage } from "../SanityImage"; export const Quote = (props: QuoteProps) => { return ( -
+
{props.image && ( { alt={props.authorImage?.alt} /> )} - + {props.quote} -
+
{props.authorImage && ( )} -
+
{props.authorName} @@ -40,9 +40,5 @@ export const Quote = (props: QuoteProps) => { }; export default function QuoteBlock(props: QuoteProps) { - return ( -
- -
- ); + return ; } diff --git a/apps/frontend/components/templates/BlogArticlePage/BlogArticlePageContent.tsx b/apps/frontend/components/templates/BlogArticlePage/BlogArticlePageContent.tsx index 3fe4254c0..4691f59b1 100644 --- a/apps/frontend/components/templates/BlogArticlePage/BlogArticlePageContent.tsx +++ b/apps/frontend/components/templates/BlogArticlePage/BlogArticlePageContent.tsx @@ -7,7 +7,6 @@ import { SanityImage } from "@/components/shared/SanityImage"; import { SanityLink } from "@/components/shared/SanityLink"; import Section from "@/components/shared/Section"; import TableOfContents from "@/components/shared/TableOfContents"; -import Tag from "@/components/shared/Tag"; import { CUSTOMER_STORY_TAG } from "@/constants"; import type { @@ -34,139 +33,70 @@ export default function BlogArticlePageContent(props: BlogArticlePayload) { return (
-
- {/* Link back to /blog */} -
- - - {props.globalLabels?.backToIndex || "Back to blog"} - -
- - {/* Header */} -
-
- {isCustomerStory ? ( - +
+ {/* Header */} +
+ {/* Link back to /blog */} +
+ - {CUSTOMER_STORY_TAG.label} - - ) : ( - props?.tags?.map((tag) => ( + {props.globalLabels?.backToIndex || "Back to blog"} + + + {isCustomerStory ? ( - {tag?.title} + + {CUSTOMER_STORY_TAG.label} + - )) - )} -
-

{props?.title}

-
- {props.publishedAt && ( - - )} - - ยท - - {typeof props.readTime === "number" && ( - - {Number(props.readTime)} min read - - )} -
- -
-
- {props.authors && ( - <> -
- -
- - )} - {isCustomerStory && customerStorySidebar?.features && ( - <> - - - )} - - {isCustomerStory && customerStorySidebar?.stats && ( - <> - - + ) : ( + props?.tags?.map((tag) => ( + + + {tag?.title} + + + )) )}
-
- {isCustomerStory - ? null - : articleSidebar?.showToc && - toc.length > 0 && ( + +

+ {props?.title} +

+ + +
+
+ {isCustomerStory && customerStorySidebar?.features && ( <> - -
+ )} -
-
- -
- {/* Body */} -
- {props?.body && ( - <> - -
- - )} -
- {/* Sidebar */} - -
- - {/* Footer */} -
- {props?.relatedArticles ? ( - <> - ({ - title: article?.title || "", - href: article?.pathname?.split("/")[2] || "", - }))} - /> - - ) : null} + + ) : null} - {isCustomerStory && customerStorySidebar?.articleCta && ( -
- -
-
- )} + {isCustomerStory && customerStorySidebar?.articleCta && ( +
+ +
+
+ )} +
@@ -279,48 +220,42 @@ const Features = (props: { features: CustomerStorySidebar["features"] }) => {
); }; + const ArticleAuthors = (props: { authors: BlogArticlePayload["authors"] }) => { return ( -
- - Posted By - -
    - {props?.authors?.map((author, index) => ( -
  • - - {author?.image && ( - - )} -
    - - {author?.name} +
      + {props?.authors?.map((author, index) => ( +
    • + + {author?.image && ( + + )} +
      + {author?.name} + {author?.details && ( + + {author?.details} - {author?.details && ( - - {author?.details} - - )} -
      -
      -
    • - ))} -
    -
    + )} +
+ + + ))} + ); }; diff --git a/apps/frontend/styles/globals.css b/apps/frontend/styles/globals.css index d7564a30a..7ca16a54c 100644 --- a/apps/frontend/styles/globals.css +++ b/apps/frontend/styles/globals.css @@ -80,7 +80,7 @@ } .body-l { - @apply text-bodyLgRegular; + @apply text-bodyMdRegular lg:text-bodyLgRegular; } .body-m-medium { @@ -362,4 +362,4 @@ h6[class*="heading"] a { .tab-item.input-error { border-color: red; -} \ No newline at end of file +} diff --git a/apps/frontend/tailwind.config.ts b/apps/frontend/tailwind.config.ts index d93c04fc1..11f09925a 100644 --- a/apps/frontend/tailwind.config.ts +++ b/apps/frontend/tailwind.config.ts @@ -253,11 +253,11 @@ export default { }, ], mdHeading: [ - "32px", + "28px", { fontWeight: "700", - lineHeight: "40px", - letterSpacing: "-0.96px", + lineHeight: "36px", + letterSpacing: "-1.28px", }, ], mdHeadingMobile: [ @@ -265,23 +265,23 @@ export default { { fontWeight: "700", lineHeight: "32px", - letterSpacing: "-0.72px", + letterSpacing: "-0.96px", }, ], smHeading: [ - "24px", + "20px", { fontWeight: "700", - lineHeight: "32px", - letterSpacing: "-0.72px", + lineHeight: "26px", + letterSpacing: "-0.4px", }, ], smHeadingMobile: [ - "20px", + "16px", { fontWeight: "700", - lineHeight: "28px", - letterSpacing: "-0.6px", + lineHeight: "24px", + letterSpacing: "-0.32px", }, ], xsHeading: [ @@ -302,7 +302,7 @@ export default { "18px", { fontWeight: "400", - lineHeight: "26px", + lineHeight: "27px", }, ], bodyMdMedium: [ From 782c3d9857d65c5fcbef8c1c41b445db0df6aa84 Mon Sep 17 00:00:00 2001 From: Siamak Date: Tue, 19 Nov 2024 21:56:57 +0330 Subject: [PATCH 3/4] feat: Improved Registy card and Registy page (single) (#1384) * feat: Improved Registy card and Registy page (single) * fix(ui): Fixed ui issues on header --- .../templates/CodemodPage/AuthorSection.tsx | 7 +- .../templates/CodemodPage/CodemodPageUI.tsx | 102 +++++++++--------- .../templates/Registry/RegistryCard.tsx | 34 +++--- .../templates/Registry/VerifiedBadge.tsx | 4 +- .../components/templates/Registry/helpers.ts | 10 ++ 5 files changed, 89 insertions(+), 68 deletions(-) diff --git a/apps/frontend/components/templates/CodemodPage/AuthorSection.tsx b/apps/frontend/components/templates/CodemodPage/AuthorSection.tsx index 1051e9f70..34eb0427a 100644 --- a/apps/frontend/components/templates/CodemodPage/AuthorSection.tsx +++ b/apps/frontend/components/templates/CodemodPage/AuthorSection.tsx @@ -12,9 +12,8 @@ export const AuthorSection = ({ className="rounded-sm focus:outline-none focus-visible:ring-[4px] focus-visible:ring-border-light dark:focus-visible:ring-border-dark" prefetch > -
+
by - <> {authorImage?.image.light && ( )} - {author} + + @{author} +
); diff --git a/apps/frontend/components/templates/CodemodPage/CodemodPageUI.tsx b/apps/frontend/components/templates/CodemodPage/CodemodPageUI.tsx index 66e590b8a..9030cef96 100644 --- a/apps/frontend/components/templates/CodemodPage/CodemodPageUI.tsx +++ b/apps/frontend/components/templates/CodemodPage/CodemodPageUI.tsx @@ -3,7 +3,6 @@ import Icon from "@/components/shared/Icon"; import Section from "@/components/shared/Section"; import Snippet from "@/components/shared/Snippet"; import Tag from "@/components/shared/Tag"; -import { AuthorSection } from "@/components/templates/CodemodPage/AuthorSection"; import { VCCodeShift } from "@/components/templates/CodemodPage/VCCodeShift"; import { getCodemodCard } from "@/components/templates/CodemodPage/buildYourCodemodCard"; import { getFrameworkCard } from "@/components/templates/CodemodPage/getFrameworkCard"; @@ -17,10 +16,12 @@ import { prop, uniqBy } from "ramda"; import type { ReactNode } from "react"; import VerifiedBadge from "../Registry/VerifiedBadge"; import { + extractRepoPath, getAutomationFrameworkTitles, getFilterIcon, getFilterSection, } from "../Registry/helpers"; +import { AuthorSection } from "./AuthorSection"; import InfoTooltip from "./parts/InfoTooltip"; export interface CodemodPageProps { @@ -72,6 +73,12 @@ export default function CodemodPageUI({ data, description }: CodemodPageProps) { ); const currentVersion = data?.versions[0]; + const totalRunsValue = data?.totalRuns ?? 0; + + const totalRuns = + totalRunsValue < 100 ? "< 100 runs" : totalRunsValue.toLocaleString(); + + const sourceRepo = extractRepoPath(currentVersion?.sourceRepo || ""); return (
@@ -88,7 +95,44 @@ export default function CodemodPageUI({ data, description }: CodemodPageProps) {
-
+
+ {data?.automationName && ( +

{unslugify(data?.automationName)}

+ )} +
+ +
+ {currentVersion?.version} + + {currentVersion?.updatedAt && ( + <> + + + Last update{" "} + {new Date(currentVersion?.updatedAt).toLocaleString("en-us", { + month: "short", + day: "numeric", + year: "numeric", + })} + + + )} + + {/* Attribution */} + {data?.author && ( + <> + + + + + )} +
+ +
{data?.verified && ( @@ -108,48 +152,10 @@ export default function CodemodPageUI({ data, description }: CodemodPageProps) { )}
- {/* Attribution */} - {data?.author && ( - - )}
-
- {data?.automationName && ( -

{unslugify(data?.automationName)}

- )} -
+ {/*
*/} -
- {/*{frameworks.length ? (*/} - {/* <>*/} - {/* */} - {/* */} - {/* */} - {/*) : null}*/} - {currentVersion?.updatedAt && ( - - )} -
{description ? (
{description} @@ -157,10 +163,9 @@ export default function CodemodPageUI({ data, description }: CodemodPageProps) { ) : null}
{/* Sidebar */} -