Skip to content

feat: add discord support#149

Merged
kpj2006 merged 3 commits into
AOSSIE-Org:mainfrom
hiranya25:feature/add-discord-support
Jun 16, 2026
Merged

feat: add discord support#149
kpj2006 merged 3 commits into
AOSSIE-Org:mainfrom
hiranya25:feature/add-discord-support

Conversation

@hiranya25

@hiranya25 hiranya25 commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Addressed Issue

Fixes #135

Summary

Added Discord as a supported platform in SocialShareButton.

Changes

  • Added Discord button with official brand color (#5865F2) and SVG icon
  • Updated getPlatformsHTML() to render Discord
  • Updated share() to:
  • Updated demo/example to include Discord

Behavior

Before

  • Passing "discord" in platforms array rendered nothing

After

  • Discord button is rendered
  • Clicking:
    • Copies URL to clipboard
    • Opens Discord web app in new tab

Testing

  • Verified button renders correctly
  • Verified clipboard copy works
  • Verified Discord opens in new tab
  • No console errors

Files Modified

  • [fill actual file paths]

Screenshots

image
Screencast.from.2026-04-05.20-35-07.webm

Checklist

  • My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and shared this PR with maintainers
  • I have read the Contributing Guidelines

Summary by CodeRabbit

  • New Features
    • Added Discord as a supported option for social sharing across the available integrations.
    • Updated the demo social and messaging platform selections to include Discord.
  • Documentation
    • Updated the README “Features” list to reflect Discord support in multiple platforms.

@github-actions github-actions Bot added enhancement New feature or request frontend Changes to frontend code javascript JavaScript/TypeScript code changes size/M Medium PR (51-200 lines changed) labels Apr 5, 2026
@coderabbitai

coderabbitai Bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@hiranya25, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 47 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b38e588f-405f-4941-a9d6-7ab1419a31da

📥 Commits

Reviewing files that changed from the base of the PR and between bc03ddf and 65b9b07.

📒 Files selected for processing (1)
  • README.md

Walkthrough

This pull request adds Discord as a supported sharing platform across the SocialShareButton component and all its framework wrappers (Preact, Qwik, React). The core implementation includes Discord metadata, platform configuration, and custom share behavior that copies the link and opens Discord.

Changes

Discord Platform Support

Layer / File(s) Summary
Core Discord Implementation
src/social-share-button.js
Discord is added to the default platforms list with brand metadata (color and SVG icon), URL mapping, and dedicated share behavior that copies the share URL to clipboard and opens Discord in a new tab.
Framework Wrapper Configuration
src/social-share-button-preact.jsx, src/social-share-button-react.jsx, src/social-share-button-qwik.tsx
Default platforms prop lists are extended to include "discord" in each framework wrapper's fallback configuration, with minor formatting adjustments.
Demo and Documentation Updates
index.html, README.md
Demo instances add "discord" to both social and messaging platform arrays; README features section is updated to list Discord among supported sharing platforms.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • AOSSIE-Org/SocialShareButton#97: Extends platform support using the same pattern of platform arrays and metadata in src/social-share-button.js, demonstrating consistency in feature addition approach.
  • AOSSIE-Org/SocialShareButton#91: Introduces the Preact wrapper component whose default platforms configuration is extended in this PR.
  • AOSSIE-Org/SocialShareButton#75: Introduces the Qwik wrapper component whose default platforms configuration is extended in this PR.

Suggested labels

Typescript Lang, Documentation

Suggested reviewers

  • kpj2006

Poem

🎮 A discord of code, now a symphony—
Discord joins the fold, socially!
One link, one click, communities unite,
Share and spread the word in digital flight! ✨

🚥 Pre-merge checks | ✅ 4
✅ 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 'feat: add discord support' clearly and concisely summarizes the main change in the PR: adding Discord as a supported sharing platform.
Linked Issues check ✅ Passed All coding requirements from issue #135 are met: Discord button renders with official branding, share behavior copies URL and opens Discord web app, and Discord is integrated across all applicable components and files.
Out of Scope Changes check ✅ Passed All changes are within scope of adding Discord support. However, the README.md update to document Discord as a supported platform, while included in the PR, was identified in review as a necessary documentation completion rather than an out-of-scope addition.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@github-actions github-actions Bot added first-time-contributor First PR of an external contributor needs-review labels Apr 5, 2026

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
index.html (1)

284-286: ⚠️ Potential issue | 🟡 Minor

Update the platform count and list to include Discord.

The feature card states "7+ Platforms" and lists platforms without Discord. With Discord added, this should be updated to reflect the current count (9 platforms) and include Discord in the platform list.

📝 Suggested fix
          <div class="feature-card">
            <div class="feature-icon">🌐</div>
-            <h3>7+ Platforms</h3>
-            <p>WhatsApp, Facebook, X, LinkedIn, Telegram, Reddit, Email, Pinterest</p>
+            <h3>9 Platforms</h3>
+            <p>WhatsApp, Facebook, X, LinkedIn, Telegram, Reddit, Email, Pinterest, Discord</p>
          </div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.html` around lines 284 - 286, Update the feature card header and
platform list to include Discord: change the <h3> text from "7+ Platforms" to "9
Platforms" (or "9+ Platforms" if you prefer the plus) and add "Discord" into the
<p> platform list (the element currently reading "WhatsApp, Facebook, X,
LinkedIn, Telegram, Reddit, Email, Pinterest") so the paragraph includes
"Discord" among the entries.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@index.html`:
- Around line 284-286: Update the feature card header and platform list to
include Discord: change the <h3> text from "7+ Platforms" to "9 Platforms" (or
"9+ Platforms" if you prefer the plus) and add "Discord" into the <p> platform
list (the element currently reading "WhatsApp, Facebook, X, LinkedIn, Telegram,
Reddit, Email, Pinterest") so the paragraph includes "Discord" among the
entries.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dfee602a-3797-4a3e-8d80-f3bb96b3c9b0

📥 Commits

Reviewing files that changed from the base of the PR and between d0686c4 and 2b1df59.

📒 Files selected for processing (5)
  • index.html
  • src/social-share-button-preact.jsx
  • src/social-share-button-qwik.tsx
  • src/social-share-button-react.jsx
  • src/social-share-button.js

@hiranya25

Copy link
Copy Markdown
Contributor Author

Dear Maintainer,

I have submitted a PR addressing this issue.

The implementation includes:

  • Adding Discord as a supported platform
  • Rendering the Discord button with appropriate styling and icon
  • Implementing share behavior (copy URL to clipboard + open Discord web)

All changes have been tested locally and align with the expected behavior described in the issue.
All required checks have been successfully passed.

Please review when convenient.

@github-actions

Copy link
Copy Markdown

Hello 👋 This PR has had no activity for more than 2 weeks. If you are still working on it, please push an update or leave a comment. Ping a maintainer if you believe it is ready for review or merge! This PR will be automatically closed in 7 days if there is no further activity.

@github-actions github-actions Bot added the Stale label Apr 21, 2026
@hiranya25

Copy link
Copy Markdown
Contributor Author

@kpj2006 Please review my pr and direct me if any changes are needed.

@github-actions github-actions Bot removed the Stale label Apr 22, 2026
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Hello 👋 This PR has had no activity for more than 2 weeks. If you are still working on it, please push an update or leave a comment. Ping a maintainer if you believe it is ready for review or merge! This PR will be automatically closed in 7 days if there is no further activity.

@github-actions github-actions Bot added the Stale label May 6, 2026
@kpj2006

kpj2006 commented May 6, 2026

Copy link
Copy Markdown
Member

@Aarya-Chaudhari i told you about this issue, let me know what i have told i don't remember correctly.

@github-actions github-actions Bot removed the Stale label May 7, 2026
@hiranya25

Copy link
Copy Markdown
Contributor Author

@kpj2006 Please review my pr, Sir.

@kpj2006

kpj2006 commented May 10, 2026

Copy link
Copy Markdown
Member

@hiranya25 can you check discord? i have write something about my reviewing timeline

@hiranya25

Copy link
Copy Markdown
Contributor Author

@kpj2006 I hope you can review my pr now. Please review whenever convinient.

@kpj2006

kpj2006 commented Jun 3, 2026

Copy link
Copy Markdown
Member

@CodeRabbit does this pr add discord in all required file?

ig this pr have not include content in readme.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check README for Discord mention
echo "=== README.md Discord mentions ==="
grep -in "discord" README.md || echo "NO Discord mention in README.md"

# List all wrapper/component files
echo ""
echo "=== All src files ==="
fd . src/ --type f

# Check if there's a Vue wrapper
echo ""
echo "=== Vue wrapper Discord check ==="
fd "vue" src/ --type f | xargs grep -li "discord" 2>/dev/null || echo "No Vue file or no Discord in Vue file"
fd "vue" src/ --type f | xargs grep -in "platforms" 2>/dev/null | head -30

# Check if there's an Angular wrapper
echo ""
echo "=== Angular wrapper Discord check ==="
fd "angular\|ng" src/ --type f -i | xargs grep -li "discord" 2>/dev/null || echo "No Angular file or no Discord in Angular file"

# Check Svelte
echo ""
echo "=== Svelte wrapper Discord check ==="
fd "svelte" src/ --type f | xargs grep -li "discord" 2>/dev/null || echo "No Svelte file or no Discord in Svelte file"
fd "svelte" src/ --type f | xargs grep -in "platforms" 2>/dev/null | head -30

# Check all src files for discord
echo ""
echo "=== Discord mentions across all src files ==="
rg -in "discord" src/ -l

# Check all src files for default platforms list (to find ones missing discord)
echo ""
echo "=== Default platforms lists in src files ==="
rg -in "whatsapp.*facebook|facebook.*whatsapp|platforms.*\[" src/ -A2 -B1

Length of output: 4447



@kpj2006 Here's a complete audit of what this PR covers and what's missing:


✅ Files updated with Discord support

File Status
src/social-share-button.js ✅ Discord added (icon, color, share logic)
src/social-share-button-react.jsx ✅ Discord added to default platforms
src/social-share-button-qwik.tsx ✅ Discord added to default platforms
src/social-share-button-preact.jsx ✅ Discord added to default platforms
index.html (demo) ✅ Discord added to both demo instances

No Vue, Angular, or Svelte wrappers exist in src/, so those are not applicable.


❌ What's missing

README.md — not updated as a supported platform

The README does reference Discord (lines 7, 41–43), but only as links to the project's own community Discord server, not as a documented supported sharing platform. If the README has a section listing supported platforms (e.g., WhatsApp, Facebook, Twitter, etc.), Discord needs to be added there.

@hiranya25 — please update README.md to document Discord as a supported sharing platform, wherever other platforms like WhatsApp, Facebook, Twitter, etc. are listed or described.


🧠 Learnings used
Learnt from: Aarya-Chaudhari
Repo: AOSSIE-Org/SocialShareButton PR: 0
File: :0-0
Timestamp: 2026-03-24T06:25:03.924Z
Learning: In AOSSIE-Org/SocialShareButton, Discord does not provide a public web share API endpoint (unlike WhatsApp, Telegram, Twitter, etc.). The standard approach used for Discord sharing in src/social-share-button.js is: when the Discord button is clicked, open `https://discord.com/channels/me` in a new tab (so the user lands in their DMs) and simultaneously copy the share URL to the clipboard, with a "Copied!" feedback shown on the Copy button for 2 seconds. This is handled as a special case in the `share()` method.

Learnt from: kpj2006
Repo: AOSSIE-Org/SocialShareButton PR: 0
File: :0-0
Timestamp: 2026-03-10T07:25:17.136Z
Learning: For the AOSSIE-Org/SocialShareButton repository, kpj2006 wants contributors to add proper inline comments to all methods in library source files (especially src/social-share-button.js). The preferred enforcement mechanism is CodeRabbit path-based review instructions (skills) in .coderabbit.yaml rather than scripts or workflows. Flag any newly added or modified function that lacks a descriptive comment during reviews.

Learnt from: kpj2006
Repo: AOSSIE-Org/SocialShareButton PR: 0
File: :0-0
Timestamp: 2026-03-10T07:25:17.136Z
Learning: For the AOSSIE-Org/SocialShareButton repository, kpj2006 wants contributors to add proper inline comments to all methods in library source files (especially src/social-share-button.js). The preferred enforcement mechanism is CodeRabbit path-based review instructions (skills) in .coderabbit.yaml, rather than scripts or workflows. During reviews, flag any newly added or modified function that lacks a descriptive comment explaining what it does, why it exists, and its parameters/return values.

@github-actions github-actions Bot added the documentation Changes to documentation files label Jun 16, 2026

@hiranya25 hiranya25 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated readme as asked, and I believe it was only the think left.

@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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@README.md`:
- Line 74: The feature bullet on line 74 lists Discord as a supported platform,
but the "Available Platforms" section later in the README does not include
Discord, creating contradictory information about platform support. Locate the
"Available Platforms" section in the README and add Discord to that list to
ensure all platform lists throughout the document are consistent and accurate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 66921724-8c81-4d8c-9e2d-13b65c4d98e6

📥 Commits

Reviewing files that changed from the base of the PR and between 2b1df59 and bc03ddf.

📒 Files selected for processing (1)
  • README.md

Comment thread README.md
@hiranya25

Copy link
Copy Markdown
Contributor Author

Now updated everything please review

@hiranya25

hiranya25 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@kpj2006 Please review now, I believe I've updated it everywhere.

@kpj2006 kpj2006 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@kpj2006 kpj2006 merged commit 6895348 into AOSSIE-Org:main Jun 16, 2026
4 checks passed
@kpj2006

kpj2006 commented Jun 16, 2026

Copy link
Copy Markdown
Member

thanks for contribution @hiranya25 !!

@kpj2006

kpj2006 commented Jun 16, 2026

Copy link
Copy Markdown
Member

let's complete roadmap of this project, if you are still interested in this project

@hiranya25

Copy link
Copy Markdown
Contributor Author

Yes, absolutely. I'm interested in continuing and completing the roadmap for this project. Thank you for reviewing my contributions. Having my first PR merged was a great learning experience, and I'd be happy to keep contributing and work through the remaining roadmap items.

@kpj2006

kpj2006 commented Jun 16, 2026

Copy link
Copy Markdown
Member

let's talk on discord

@hiranya25

Copy link
Copy Markdown
Contributor Author

@kpj2006 I was earlier member, but suddenly group disappeared, and now I'm not able to join the Aossie discord.
Is there any possible way you could send me invite. My username is hiranyapatil . It would be great help.

@kpj2006

kpj2006 commented Jun 18, 2026

Copy link
Copy Markdown
Member

@hiranya25 I have sended you friend request on discord

https://discord.gg/GZxDzwQpT (btw this is server invite lmk if not able to join)

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

Labels

documentation Changes to documentation files enhancement New feature or request first-time-contributor First PR of an external contributor frontend Changes to frontend code javascript JavaScript/TypeScript code changes needs-review size/M Medium PR (51-200 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add Discord Support to SocialShareButton

2 participants