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

8720 contributor links #9101

Merged
merged 12 commits into from
Feb 5, 2025
Merged

8720 contributor links #9101

merged 12 commits into from
Feb 5, 2025

Conversation

stevector
Copy link
Contributor

@stevector stevector commented Jul 15, 2024

working on #8720

@stevector stevector added the Site: Site Structure Issue or PR with the docs app stack and/or live site label Jul 15, 2024
@stevector stevector self-assigned this Jul 15, 2024
@stevector stevector requested a review from a team as a code owner July 15, 2024 22:56
Copy link

⚡ Deployed with Pantheon Decoupled

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

👀 Preview: https://pr-9101-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-9101-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-9101-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

@stevector stevector marked this pull request as draft July 24, 2024 15:35
@rachelwhitton
Copy link
Member

Alternative feature: link to github contributions instead

Copy link

Hi from your friendly robot! 🤖

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

src/templates/contributor.js

The full diff is below. Please review the changes.

Click to expand
diff --git a/src/templates/contributor.js b/src/templates/contributor.js
index da8b03598..8d9ea82ae 100644
--- a/src/templates/contributor.js
+++ b/src/templates/contributor.js
@@ -1,50 +1,50 @@
-import React from "react"
-import { graphql, Link } from "gatsby"
-import Layout from "../layout/layout"
-import SEO from "../layout/seo"
-import ContributorLink from "../components/ContributorLink"
+import React from 'react';
+import { graphql, Link } from 'gatsby';
+import Layout from '../layout/layout';
+import SEO from '../layout/seo';
+import ContributorLink from '../components/ContributorLink';
 
-import { Container, TwoItemLayout } from "@pantheon-systems/pds-toolkit-react"
+import { Container, TwoItemLayout } from '@pantheon-systems/pds-toolkit-react';
 
 const links = [
   {
-    property: "url",
-    icon: "user",
+    property: 'url',
+    icon: 'user',
   },
   {
-    property: "github",
-    icon: "github",
+    property: 'github',
+    icon: 'github',
   },
   {
-    property: "drupal",
-    icon: "drupal",
+    property: 'drupal',
+    icon: 'drupal',
   },
   {
-    property: "wordpress",
-    icon: "wordpress",
+    property: 'wordpress',
+    icon: 'wordpress',
   },
   {
-    property: "twitter",
-    icon: "twitter",
+    property: 'twitter',
+    icon: 'twitter',
   },
   {
-    property: "linkedin",
-    icon: "linkedin",
+    property: 'linkedin',
+    icon: 'linkedin',
   },
-]
+];
 
 // Set container width for search and main content.
-const containerWidth = "standard"
+const containerWidth = 'standard';
 
 class ContributorTemplate extends React.Component {
   render() {
-    const contributor = this.props.data.contributorYaml
+    const contributor = this.props.data.contributorYaml;
     const docs =
-      this.props.data.allDocs != null ? this.props.data.allDocs.edges : []
-    let printedGuides = []
-    let printedOverview = []
+      this.props.data.allDocs != null ? this.props.data.allDocs.edges : [];
+    let printedGuides = [];
+    let printedOverview = [];
 
-    console.log(contributor)
+    console.log(contributor);
 
     return (
       <Layout containerWidth={containerWidth} footerBorder>
@@ -70,11 +70,11 @@ class ContributorTemplate extends React.Component {
                     {links.map((link, i) => {
                       const url = contributor.hasOwnProperty(link.property)
                         ? contributor[link.property]
-                        : null
+                        : null;
                       if (url !== null) {
                         return (
                           <ContributorLink key={i} url={url} icon={link.icon} />
-                        )
+                        );
                       }
                     })}
                   </div>
@@ -87,21 +87,18 @@ class ContributorTemplate extends React.Component {
                   <h2>Contributions</h2>
                   <ul className="docs-contributor__list">
                     {docs.map(({ node }) => {
-
                       var linkPath = '';
                       if (node.frontmatter.permalink) {
-                        linkPath = "/" + node.frontmatter.permalink;
-                      }else {
-                        linkPath = "/" + node.id;
+                        linkPath = '/' + node.frontmatter.permalink;
+                      } else {
+                        linkPath = '/' + node.id;
                       }
 
                       return (
                         <li key={node.id}>
-                          <Link to={linkPath}>
-                            {node.frontmatter.title}
-                          </Link>
+                          <Link to={linkPath}>{node.frontmatter.title}</Link>
                         </li>
-                      )
+                      );
                     })}
                   </ul>
                 </div>
@@ -110,11 +107,11 @@ class ContributorTemplate extends React.Component {
           </Container>
         </main>
       </Layout>
-    )
+    );
   }
 }
 
-export default ContributorTemplate
+export default ContributorTemplate;
 
 export const pageQuery = graphql`
   query ContributorById($id: String!) {
@@ -160,4 +157,4 @@ export const pageQuery = graphql`
       }
     }
   }
-`
+`;

Copy link

Hi from your friendly robot! 🤖

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

src/templates/contributor.js

The full diff is below. Please review the changes.

Click to expand
diff --git a/src/templates/contributor.js b/src/templates/contributor.js
index 26f2c9123..d81187dda 100644
--- a/src/templates/contributor.js
+++ b/src/templates/contributor.js
@@ -38,7 +38,7 @@ const containerWidth = 'standard';
 
 class ContributorTemplate extends React.Component {
   render() {
-    const contributor = this.props.data.contributorYaml
+    const contributor = this.props.data.contributorYaml;
 
     // console.log(contributor)
 
@@ -80,13 +80,13 @@ class ContributorTemplate extends React.Component {
                   slot="second-item"
                   className="docs-contributor__contributions"
                 >
-
                   <h2>
-                    <a href={`https://github.com/pantheon-systems/documentation/commits?author=${contributor.yamlId}`}>
+                    <a
+                      href={`https://github.com/pantheon-systems/documentation/commits?author=${contributor.yamlId}`}
+                    >
                       See contributions on GitHub
                     </a>
                   </h2>
-
                 </div>
               </TwoItemLayout>
             </div>

@stevector stevector marked this pull request as ready for review January 29, 2025 18:03
@stevector stevector assigned jazzsequence and unassigned stevector Jan 29, 2025
Copy link

⚡ Deployed with Pantheon Decoupled

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

👀 Preview: https://pr-9101-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-9101-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-9101-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-9101-documentation.appa.pantheon.site
🛠️ Manage in Pantheon: https://dashboard.pantheon.io/site/2b30153f-e8b1-4427-b076-6109e704ba5d/overview

@stevector stevector changed the title WIP: 8720 contributor links 8720 contributor links Jan 29, 2025
@rachelwhitton rachelwhitton merged commit 6838844 into main Feb 5, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Site: Site Structure Issue or PR with the docs app stack and/or live site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants