Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Terminus Changelog #9351

Merged
merged 27 commits into from
Dec 18, 2024
Merged

Conversation

jazzsequence
Copy link
Contributor

@jazzsequence jazzsequence commented Dec 17, 2024

Summary

Current Terminus Release, Changelog, and Updates - Fixes the issue that was breaking the terminus changelog <Releases> component. Turns out it was related to how we were filtering the releases in the GraphQL query. I've removed the filter and then re-added a new filter that filters releases older than a year.

@jazzsequence jazzsequence changed the title add a console log for releases WIP: Fix Terminus Changelog Dec 17, 2024
@jazzsequence jazzsequence self-assigned this Dec 17, 2024
Copy link

Hi from your friendly robot! 🤖

I've applied Prettier formatting to the following files in faa5bf0:

src/components/releases.js

The full diff is below. Please review the changes.

Click to expand
diff --git a/src/components/releases.js b/src/components/releases.js
index 03e00b2a8..f973de642 100644
--- a/src/components/releases.js
+++ b/src/components/releases.js
@@ -1,41 +1,41 @@
-import React from "react"
-import { StaticQuery, graphql } from "gatsby"
-import { MDXRenderer } from "gatsby-plugin-mdx"
-import { MDXProvider } from "@mdx-js/react"
+import React from 'react';
+import { StaticQuery, graphql } from 'gatsby';
+import { MDXRenderer } from 'gatsby-plugin-mdx';
+import { MDXProvider } from '@mdx-js/react';
 
-import { headline1, headline2, headline3 } from "./releaseHeadlines"
+import { headline1, headline2, headline3 } from './releaseHeadlines';
 
 const shortcodes = {
   h1: headline1,
   h2: headline2,
   h3: headline3,
-}
+};
 
 const Releases = ({ data }) => {
-  console.log(data.allTerminusReleasesJson.edges)
+  console.log(data.allTerminusReleasesJson.edges);
 
-  return(
+  return (
     <>
-    {data.allTerminusReleasesJson.edges.map((release, i) => {
-      return (
-        <div key={i}>
-          <h3 className="toc-ignore" id={release.node.tag_name}>
-            {release.node.tag_name}
-          </h3>
-          <MDXProvider components={shortcodes}>
-            <MDXRenderer>
-              {release.node.fields.markdownBody.childMdx.body}
-            </MDXRenderer>
-          </MDXProvider>
-          <hr />
-        </div>
-      )
-    })}
+      {data.allTerminusReleasesJson.edges.map((release, i) => {
+        return (
+          <div key={i}>
+            <h3 className="toc-ignore" id={release.node.tag_name}>
+              {release.node.tag_name}
+            </h3>
+            <MDXProvider components={shortcodes}>
+              <MDXRenderer>
+                {release.node.fields.markdownBody.childMdx.body}
+              </MDXRenderer>
+            </MDXProvider>
+            <hr />
+          </div>
+        );
+      })}
     </>
   );
 };
 
-export default props => (
+export default (props) => (
   <StaticQuery
     query={graphql`
       query {
@@ -60,6 +60,6 @@ export default props => (
         }
       }
     `}
-    render={data => <Releases data={data} {...props} />}
+    render={(data) => <Releases data={data} {...props} />}
   />
-)
+);

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

Hi from your friendly robot! 🤖

I've applied Prettier formatting to the following files in f4b7767:

src/components/releases.js src/components/terminusVersion.js

The full diff is below. Please review the changes.

Click to expand
diff --git a/src/components/terminusVersion.js b/src/components/terminusVersion.js
index 54febec8e..52910b240 100644
--- a/src/components/terminusVersion.js
+++ b/src/components/terminusVersion.js
@@ -1,28 +1,26 @@
-import React from "react"
-import { useStaticQuery, graphql } from "gatsby"
+import React from 'react';
+import { useStaticQuery, graphql } from 'gatsby';
 
 function TerminusVersion({ text }) {
-  const { allTerminusReleasesJson } = useStaticQuery(
-    graphql`
-      query {
-        allTerminusReleasesJson(sort: { fields: [published_at], order: DESC }) {
-          edges {
-            node {
-              tag_name
-            }
+  const { allTerminusReleasesJson } = useStaticQuery(graphql`
+    query {
+      allTerminusReleasesJson(sort: { fields: [published_at], order: DESC }) {
+        edges {
+          node {
+            tag_name
           }
         }
       }
-    `
-  )
+    }
+  `);
 
-  const latestRelease = allTerminusReleasesJson.edges[0].node.tag_name
+  const latestRelease = allTerminusReleasesJson.edges[0].node.tag_name;
 
   return (
     <h2>
       {text} {latestRelease}
     </h2>
-  )
+  );
 }
 
-export default TerminusVersion
+export default TerminusVersion;

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

Hi from your friendly robot! 🤖

I've applied Prettier formatting to the following files in d5d22f2:

src/components/releases.js src/components/terminusVersion.js

The full diff is below. Please review the changes.

Click to expand
diff --git a/src/components/releases.js b/src/components/releases.js
index f818635d4..47afbf946 100644
--- a/src/components/releases.js
+++ b/src/components/releases.js
@@ -16,8 +16,12 @@ const Releases = ({ data }) => {
   const oneYearAgo = subYears(new Date(), 1);
 
   // Filter releases that are newer than one year
-  const filteredReleases = data.allTerminusReleasesJson.edges.filter((release) =>
-    isAfter(parseISO(release.node.fields.markdownBody.childMdx.body.published_at), oneYearAgo)
+  const filteredReleases = data.allTerminusReleasesJson.edges.filter(
+    (release) =>
+      isAfter(
+        parseISO(release.node.fields.markdownBody.childMdx.body.published_at),
+        oneYearAgo,
+      ),
   );
 
   return (
@@ -28,7 +32,9 @@ const Releases = ({ data }) => {
             {release.node.tag_name}
           </h3>
           <MDXProvider components={shortcodes}>
-            <MDXRenderer>{release.node.fields.markdownBody.childMdx.body}</MDXRenderer>
+            <MDXRenderer>
+              {release.node.fields.markdownBody.childMdx.body}
+            </MDXRenderer>
           </MDXProvider>
           <hr />
         </div>

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

Hi from your friendly robot! 🤖

I've applied Prettier formatting to the following files in e07b24f:

src/components/releases.js src/components/terminusVersion.js

The full diff is below. Please review the changes.

Click to expand
diff --git a/src/components/releases.js b/src/components/releases.js
index d1d27d5e0..1341c545e 100644
--- a/src/components/releases.js
+++ b/src/components/releases.js
@@ -20,7 +20,7 @@ const Releases = ({ data }) => {
     (release) => {
       const publishedDate = release.node.published_at;
       return publishedDate && isAfter(parseISO(publishedDate), oneYearAgo);
-    }
+    },
   );
 
   return (
@@ -31,7 +31,9 @@ const Releases = ({ data }) => {
             {release.node.tag_name}
           </h3>
           <MDXProvider components={shortcodes}>
-            <MDXRenderer>{release.node.fields.markdownBody.childMdx.body}</MDXRenderer>
+            <MDXRenderer>
+              {release.node.fields.markdownBody.childMdx.body}
+            </MDXRenderer>
           </MDXProvider>
           <hr />
         </div>

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

Hi from your friendly robot! 🤖

I've applied Prettier formatting to the following files in 45ede8d:

src/components/releases.js src/components/terminusVersion.js

The full diff is below. Please review the changes.

Click to expand
diff --git a/src/components/releases.js b/src/components/releases.js
index f5b857aec..e8d747472 100644
--- a/src/components/releases.js
+++ b/src/components/releases.js
@@ -20,7 +20,7 @@ const Releases = ({ data }) => {
     (release) => {
       const publishedDate = release.node.published_at;
       return publishedDate && isAfter(parseISO(publishedDate), oneYearAgo);
-    }
+    },
   );
 
   return (
@@ -32,7 +32,9 @@ const Releases = ({ data }) => {
               {release.node.tag_name}
             </h3>
             <MDXProvider components={shortcodes}>
-              <MDXRenderer>{release.node.fields.markdownBody.childMdx.body}</MDXRenderer>
+              <MDXRenderer>
+                {release.node.fields.markdownBody.childMdx.body}
+              </MDXRenderer>
             </MDXProvider>
             <hr />
           </div>

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

@jazzsequence jazzsequence marked this pull request as ready for review December 18, 2024 00:18
@jazzsequence jazzsequence requested a review from a team as a code owner December 18, 2024 00:18
Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

@rachelwhitton rachelwhitton added Site: JavaScript Pull requests that update Javascript code Topic: Terminus labels Dec 18, 2024
@jazzsequence jazzsequence changed the title WIP: Fix Terminus Changelog Fix Terminus Changelog Dec 18, 2024
Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

Copy link

⚡ Deployed with Pantheon Decoupled

This build was successfully deployed with Pantheon. You can track the build logs here.

👀 Preview: https://pr-9351-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

@rachelwhitton rachelwhitton merged commit 6387e86 into main Dec 18, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Site: JavaScript Pull requests that update Javascript code Topic: Terminus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants