From 4a5272d7079d82ec7afeb21ed50d16b755116357 Mon Sep 17 00:00:00 2001 From: Geoffrey Wilson Date: Fri, 3 Nov 2023 19:32:16 -0400 Subject: [PATCH] Add Slack invite links to website (Contact Us, Header, Footer) (#444) * Use permanent slack invite URI * Adjust contact us to have slack join button * Move the slack invite info below the contact us form * Tweaking the contact us slack section * fix whitespace and link icon in footer * Suggestions from PR --- website/docusaurus.config.js | 14 +++++++++++-- .../ContactUsSection.view.tsx | 20 ++++++------------- .../Index/HeroSection/HeroSection.view.tsx | 2 +- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 09d12fc6d..87509e7ca 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -16,6 +16,7 @@ module.exports = async function configCreatorAsync() { ); const releaseVersion = data.tag_name.substring(1); const releaseUrl = data.html_url; + const slackUrl = 'https://join.slack.com/t/mlops-community/shared_invite/zt-258yl6ifq-zZNzBaddwlhifj56yt7ONg'; /** @type {import('@docusaurus/types').Config} */ return { @@ -38,7 +39,7 @@ module.exports = async function configCreatorAsync() { customFields: { email: 'fasttrackml@gr-oss.io', - newIssueUrl: 'https://github.com/G-Research/fasttrackml/issues/new', + slackInviteUrl: slackUrl, }, presets: [ @@ -89,6 +90,11 @@ module.exports = async function configCreatorAsync() { label: 'GitHub', position: 'right', }, + { + href: slackUrl, + label: 'Join our Slack', + position: 'right', + }, { href: 'https://twitter.com/oss_gr', label: 'Twitter', @@ -126,6 +132,10 @@ module.exports = async function configCreatorAsync() { label: 'GitHub', href: 'https://github.com/G-Research/fasttrackml', }, + { + label: 'Join our Slack', + href: slackUrl, + }, { label: 'Twitter', href: 'https://twitter.com/oss_gr', @@ -173,4 +183,4 @@ module.exports = async function configCreatorAsync() { ], }), }; -}; \ No newline at end of file +}; diff --git a/website/src/components/Index/ContactUsSection/ContactUsSection.view.tsx b/website/src/components/Index/ContactUsSection/ContactUsSection.view.tsx index 70196cf48..ebc7862e0 100644 --- a/website/src/components/Index/ContactUsSection/ContactUsSection.view.tsx +++ b/website/src/components/Index/ContactUsSection/ContactUsSection.view.tsx @@ -2,7 +2,7 @@ import React from 'react'; import clsx from 'clsx'; import {useForm, SubmitHandler} from "react-hook-form"; import styles from './ContactUsSection.module.css'; -import {openNewIssue, openNewEmail} from "@site/src/core/utils"; +import {openNewEmail} from "@site/src/core/utils"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; @@ -30,11 +30,7 @@ export default function ContactUsSection(): React.JSX.Element { siteConfig: {customFields} } = useDocusaurusContext(); const email = customFields?.email; - const newIssueUrl = customFields?.newIssueUrl; - - const onUsingGitHub: SubmitHandler = data => { - openNewIssue(newIssueUrl as string, data.subject, getMessage(data.name, data.company, data.message)); - }; + const slackInviteUrl = customFields?.slackInviteUrl const onSendEmail: SubmitHandler = data => { openNewEmail(email as string, data.subject, getMessage(data.name, data.company, data.message)); @@ -44,7 +40,7 @@ export default function ContactUsSection(): React.JSX.Element {

Contact Us

We would love to hear from you! FastTrackML is a brand new project and any contribution would make a difference!

-
+
@@ -82,19 +78,15 @@ export default function ContactUsSection(): React.JSX.Element {
- -
+

Or, join the #fasttrackml channel on the MLOps.community Slack!

; } diff --git a/website/src/components/Index/HeroSection/HeroSection.view.tsx b/website/src/components/Index/HeroSection/HeroSection.view.tsx index c7f2bb79e..1157e1cf1 100644 --- a/website/src/components/Index/HeroSection/HeroSection.view.tsx +++ b/website/src/components/Index/HeroSection/HeroSection.view.tsx @@ -24,7 +24,7 @@ export default function HeroSection(): React.JSX.Element { - {`💬 Talk to Us`} + {`💬 Contact Us`}