Skip to content

feat: add Join Community button to Contributors page#770

Open
GeethaBurigalla wants to merge 4 commits into
knoxiboy:mainfrom
GeethaBurigalla:feat/join-community-button
Open

feat: add Join Community button to Contributors page#770
GeethaBurigalla wants to merge 4 commits into
knoxiboy:mainfrom
GeethaBurigalla:feat/join-community-button

Conversation

@GeethaBurigalla

@GeethaBurigalla GeethaBurigalla commented Jul 5, 2026

Copy link
Copy Markdown

User description

Closes #708

Adds a "Join Community" button next to "Start Contributing" on the Contributors page CTA section, linking to the project's Discord.

  • Buttons sit side by side on desktop, stack vertically on mobile
  • Discord URL is configurable via NEXT_PUBLIC_DISCORD_INVITE_URL (falls back to a placeholder) so maintainers can update it without a code change

Note: I couldn't find an official Discord invite link anywhere in the repo/README, so I used a placeholder (https://discord.gg/doubtdesk). Please update the env var with the real invite once available — no code change needed.

Screenshots

Screenshot 2026-07-05 125208

Summary by CodeRabbit

  • New Features
    • Added a new “Join Community” Discord link on the contributors page alongside the existing “Start Contributing” button.
    • Introduced a configurable Discord invite URL for the community call-to-action, with a fallback when not set.

CodeAnt-AI Description

Add a Discord community button to the Contributors page

What Changed

  • Added a new “Join Community” button next to “Start Contributing” on the Contributors page, linking users to the community Discord
  • Kept the two buttons side by side on larger screens and stacked on smaller screens
  • Made the Discord link configurable through an environment setting, with a fallback invite when it is not set or is blank
  • Added the Discord invite setting to the example environment file for easier setup

Impact

✅ Easier access to the community Discord
✅ Clearer contributor call to action
✅ Consistent button layout on desktop and mobile

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Jul 5, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

@GeethaBurigalla is attempting to deploy a commit to the Karan Mani Tripathi 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codeant-ai

codeant-ai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions github-actions Bot added gssoc'26 GSSoC program issue level:beginner Beginner level task type:docs Documentation update need-star labels Jul 5, 2026
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4d24905f-d0b2-4786-a29c-c22b8b9c00b1

📥 Commits

Reviewing files that changed from the base of the PR and between f68e944 and 21c18a4.

📒 Files selected for processing (1)
  • src/app/contributors/page.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/app/contributors/page.tsx

Walkthrough

Adds a NEXT_PUBLIC_DISCORD_INVITE_URL environment variable with documentation to .env.example, and updates the contributors page to import a MessageCircle icon and DISCORD_INVITE_URL constant, rendering a new "Join Community" Discord CTA link alongside the existing "Start Contributing" GitHub link.

Changes

Discord Join Community CTA

Layer / File(s) Summary
Discord invite env variable and CTA rendering
.env.example, src/app/contributors/page.tsx
Adds a documented NEXT_PUBLIC_DISCORD_INVITE_URL env variable, imports MessageCircle and DISCORD_INVITE_URL, and wraps the CTA in a flex container rendering both the existing GitHub "Start Contributing" link and a new "Join Community" Discord link.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a Join Community button on the Contributors page.
Linked Issues check ✅ Passed The PR adds the Discord Join Community CTA beside Start Contributing, keeps it responsive, and makes the invite URL configurable. #708
Out of Scope Changes check ✅ Passed All changes support the Contributors page CTA and related Discord configuration; no unrelated code changes are evident.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there! 🎉 Thank you so much for your first pull request to DoubtDesk!

We really appreciate your contribution. A maintainer will review your code soon. If you are participating in GSSoC, ensure your PR is linked to an open issue. Please make sure you have followed all rules in our Contributing Guidelines. Happy coding!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ Star Required

Hi @GeethaBurigalla! Thank you for your contribution to DoubtDesk.

Before we can complete the review and merge this pull request, please star the DoubtDesk repository.

Once you have starred the repository, please drop a comment here saying "done" and we will proceed with reviewing your PR. Thank you!

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

@coderabbitai review

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Jul 5, 2026
@github-actions github-actions Bot added size/s size/m quality : needs-work and removed size:M This PR changes 30-99 lines, ignoring generated files size/m labels Jul 5, 2026
Comment thread src/lib/constants.ts Outdated
Comment on lines +5 to +6
export const DISCORD_INVITE_URL =
process.env.NEXT_PUBLIC_DISCORD_INVITE_URL ?? "https://discord.gg/doubtdesk"; No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The fallback logic only handles null/undefined; if NEXT_PUBLIC_DISCORD_INVITE_URL is set to an empty string, the Join Community link resolves to an empty href instead of the Discord default. Treat empty/whitespace-only values as invalid and fall back to the default invite URL so the CTA never becomes a broken link. [incorrect condition logic]

Severity Level: Major ⚠️
- ❌ Contributors CTA Discord link broken on empty env.
- ⚠️ Users can’t reach Discord from contributors CTA.
Steps of Reproduction ✅
1. Set environment variable `NEXT_PUBLIC_DISCORD_INVITE_URL` to an empty string (e.g.,
`NEXT_PUBLIC_DISCORD_INVITE_URL=`) in `.env.local`, so at build time
`process.env.NEXT_PUBLIC_DISCORD_INVITE_URL` resolves to `""` in
`src/lib/constants.ts:5-6`.

2. Start the Next.js app; the constant `DISCORD_INVITE_URL` is computed in
`src/lib/constants.ts:5-6` using nullish coalescing, so the empty string is preserved
instead of falling back to `"https://discord.gg/doubtdesk"`.

3. In a browser, navigate to the Contributors page route implemented in
`src/app/contributors/page.tsx:52-218`, where the CTA section renders the `Join Community`
button using `<Link href={DISCORD_INVITE_URL}>` at lines `201-205`.

4. Inspect the rendered HTML or click the `Join Community` button and observe that the
anchor `href` is `""` (navigates to the current page) instead of the Discord invite URL,
meaning the CTA link is effectively broken when the env var is set to an empty string.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** src/lib/constants.ts
**Line:** 5:6
**Comment:**
	*Incorrect Condition Logic: The fallback logic only handles `null`/`undefined`; if `NEXT_PUBLIC_DISCORD_INVITE_URL` is set to an empty string, the `Join Community` link resolves to an empty `href` instead of the Discord default. Treat empty/whitespace-only values as invalid and fall back to the default invite URL so the CTA never becomes a broken link.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@codeant-ai

codeant-ai Bot commented Jul 5, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
.env.example (1)

25-28: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Env var documentation looks good; minor key ordering nit.

Static analysis flags NEXT_PUBLIC_DISCORD_INVITE_URL as out of alphabetical order relative to NEXT_PUBLIC_SITE_URL. Purely cosmetic, but worth tidying for consistency with the rest of the file.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.env.example around lines 25 - 28, The Discord invite env var entry is out
of alphabetical order in the example env file. Move
NEXT_PUBLIC_DISCORD_INVITE_URL so it is ordered consistently relative to
NEXT_PUBLIC_SITE_URL, keeping the surrounding documentation comments intact and
preserving the existing variable names.

Source: Linters/SAST tools

src/app/contributors/page.tsx (2)

201-209: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

New-tab link should announce its behavior to assistive tech.

The new Discord Link opens in a new tab (target="_blank") but has no accessible indication of this for screen reader users; the icon alone doesn't convey it. WCAG guidance (technique G200/H83) recommends surfacing this via visible text or a visually-hidden label.

♿ Proposed fix
                 <Link
                   href={DISCORD_INVITE_URL}
                   target="_blank"
                   rel="noopener noreferrer"
                   className="inline-flex items-center gap-2 px-7 py-4 rounded-xl border border-blue-500/30 dark:border-cyan-400/30 bg-white/60 dark:bg-white/5 backdrop-blur-xl hover:scale-105 hover:border-blue-500/50 dark:hover:border-cyan-400/60 transition-all duration-300 font-semibold text-blue-700 dark:text-cyan-300"
+                  aria-label="Join Community (opens in a new tab)"
                 >
                   <MessageCircle className="w-5 h-5" />
                   Join Community
                 </Link>

As per path instructions, review **/*.tsx files for accessibility (aria labels, keyboard navigation).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/contributors/page.tsx` around lines 201 - 209, The Discord Link in
the contributors page opens a new tab but does not announce that behavior to
assistive tech. Update the Link usage in the contributors page so the accessible
name clearly indicates “opens in a new tab,” using the existing Link component
and its surrounding content in the contributors page, either by adding visually
hidden text or an equivalent accessible label.

Source: Path instructions


197-208: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

CTA text is hardcoded rather than pulled from constants.

"Start Contributing" and "Join Community" are inline string literals in the JSX. Per path instructions for *.tsx files, prefer sourcing user-facing strings from constants for consistency/reuse across locales.

As per path instructions, "**/*.tsx: ... No hardcoded strings (use constants)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/contributors/page.tsx` around lines 197 - 208, The CTA labels in the
contributors page are hardcoded JSX strings, so move the user-facing text for
the Link buttons into shared constants and reference those values in the
component. Update the relevant labels in the contributors page JSX (the Link
elements around the Start Contributing and Join Community CTAs) to use constants
instead of inline literals, keeping the strings centralized for reuse and
consistency.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.env.example:
- Around line 25-28: The Discord invite env var entry is out of alphabetical
order in the example env file. Move NEXT_PUBLIC_DISCORD_INVITE_URL so it is
ordered consistently relative to NEXT_PUBLIC_SITE_URL, keeping the surrounding
documentation comments intact and preserving the existing variable names.

In `@src/app/contributors/page.tsx`:
- Around line 201-209: The Discord Link in the contributors page opens a new tab
but does not announce that behavior to assistive tech. Update the Link usage in
the contributors page so the accessible name clearly indicates “opens in a new
tab,” using the existing Link component and its surrounding content in the
contributors page, either by adding visually hidden text or an equivalent
accessible label.
- Around line 197-208: The CTA labels in the contributors page are hardcoded JSX
strings, so move the user-facing text for the Link buttons into shared constants
and reference those values in the component. Update the relevant labels in the
contributors page JSX (the Link elements around the Start Contributing and Join
Community CTAs) to use constants instead of inline literals, keeping the strings
centralized for reuse and consistency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 65e9adb1-0d51-4f83-bc73-0534cabb124e

📥 Commits

Reviewing files that changed from the base of the PR and between 956018a and f68e944.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • .env.example
  • src/app/contributors/page.tsx
  • src/lib/constants.ts

@GeethaBurigalla

Copy link
Copy Markdown
Author

Done.

@github-actions github-actions Bot removed the need-star label Jul 5, 2026
@github-actions github-actions Bot added size/m and removed size/s labels Jul 5, 2026
@GeethaBurigalla

Copy link
Copy Markdown
Author

Hi @knoxiboy — noticed the Vercel preview deployment is showing "Authorization required to deploy" and hasn't run. Could someone on the Vercel team authorize it so the preview can build?

@knoxiboy

knoxiboy commented Jul 8, 2026

Copy link
Copy Markdown
Owner

@GeethaBurigalla Resolve merge conflicts and look into ci test failures and try to fix it

@github-actions github-actions Bot added the merge-conflict PR has merge conflicts that need resolution label Jul 8, 2026
@codeant-ai

codeant-ai Bot commented Jul 9, 2026

Copy link
Copy Markdown

CodeAnt AI is running Incremental review

@codeant-ai

codeant-ai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@github-actions github-actions Bot removed the merge-conflict PR has merge conflicts that need resolution label Jul 9, 2026
@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Jul 9, 2026
@github-actions github-actions Bot removed the size:M This PR changes 30-99 lines, ignoring generated files label Jul 9, 2026
@codeant-ai

codeant-ai Bot commented Jul 9, 2026

Copy link
Copy Markdown

CodeAnt AI Incremental review completed.

@GeethaBurigalla

Copy link
Copy Markdown
Author

Pulled in the main and sorted out the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc'26 GSSoC program issue level:beginner Beginner level task quality : needs-work size/m type:docs Documentation update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add a "Join Community" Button on the Contributors Page

2 participants