Skip to content

feat(footer): apply appropriate GitHub labels #5027

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

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 38 additions & 5 deletions site/src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const Language = {
return `Coder ${buildInfo.version}`
},
copyrightText: `Copyright \u00a9 ${new Date().getFullYear()} Coder Technologies, Inc.`,
reportBugLink: "Report an issue or share feedback",
reportBugLink: "Report a bug encountered while using Coder",
enhancementLink: "Request an enhancement to Coder",
shareFeedbackLink: "Share your experience with Coder",
discordLink: "Join Coder on Discord",
}

Expand All @@ -24,10 +26,22 @@ export const Footer: React.FC<React.PropsWithChildren<FooterProps>> = ({
}) => {
const styles = useFooterStyles()

const githubUrl = `https://github.com/coder/coder/issues/new?labels=needs+grooming&body=${encodeURIComponent(`Version: [\`${buildInfo?.version}\`](${buildInfo?.external_url})
const buildURL = (label: string): URL => {
const githubURL = new URL("https://github.com/coder/coder/issues/new")
githubURL.searchParams.append("labels", label)
githubURL.searchParams.append(
"body",
`Version: [\`${buildInfo?.version}\`](${buildInfo?.external_url})`,
)
return githubURL
}

<!--- Ask a question or leave feedback! -->`)}`
const discordUrl = `https://coder.com/chat?utm_source=coder&utm_medium=coder&utm_campaign=server-footer`
const reportBugUrl = buildURL("bug")
const enhancementUrl = buildURL("enhancement")
const shareFeedbackUrl = buildURL("feedback")

const discordUrl =
"https://coder.com/chat?utm_source=coder&utm_medium=coder&utm_campaign=server-footer"

return (
<div className={styles.root}>
Expand All @@ -48,11 +62,30 @@ export const Footer: React.FC<React.PropsWithChildren<FooterProps>> = ({
className={styles.link}
variant="caption"
target="_blank"
href={githubUrl}
href={reportBugUrl}
>
<AssistantIcon className={styles.icon} /> {Language.reportBugLink}
</Link>
&nbsp;|&nbsp;
<Link
className={styles.link}
variant="caption"
target="_blank"
href={enhancementUrl}
>
<AssistantIcon className={styles.icon} /> {Language.enhancementLink}
</Link>
&nbsp;|&nbsp;
<Link
className={styles.link}
variant="caption"
target="_blank"
href={shareFeedbackUrl}
>
<AssistantIcon className={styles.icon} />{" "}
{Language.shareFeedbackLink}
</Link>
&nbsp;|&nbsp;
<Link
className={styles.link}
variant="caption"
Expand Down