Skip to content

fix: remove hardcoded promotional text from share messages#114

Open
AnshuPriya-1 wants to merge 6 commits intoAOSSIE-Org:mainfrom
AnshuPriya-1:fix/remove-hardcoded-share-copy
Open

fix: remove hardcoded promotional text from share messages#114
AnshuPriya-1 wants to merge 6 commits intoAOSSIE-Org:mainfrom
AnshuPriya-1:fix/remove-hardcoded-share-copy

Conversation

@AnshuPriya-1
Copy link
Copy Markdown

@AnshuPriya-1 AnshuPriya-1 commented Mar 16, 2026

Addressed Issues:

Fixes #100

Screenshots/Recordings:

Not applicable. This change updates share message generation logic in getShareURL(platform) and does not introduce a UI change.

Additional Notes:

This PR is focused only on issue #100.

It removes hardcoded promotional text that was being appended to generated share messages for some platforms. After this change, the generated share content is based only on the documented user-provided options such as title, description, hashtags, via, and url.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Refactor
    • Social share messages for WhatsApp, Telegram, and Email now display essential information only (title, description, and hashtags)—decorative emoji and marketing text have been removed.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 16, 2026

Walkthrough

This change simplifies the share message generation in getShareURL by removing hardcoded promotional text and emoji from WhatsApp, Telegram, and Email platforms. Messages now consist only of user-provided title, optional description, and hashtags, reducing unintended content modification.

Changes

Cohort / File(s) Summary
Share Message Simplification
src/social-share-button.js
Removed hardcoded promotional text and emoji from WhatsApp, Telegram, and Email share message construction. Messages now include only user-provided title, description, and hashtags. Eliminated unused encodedDesc variable.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

Typescript Lang

Poem

🐰 Hops of joy for cleaner shares!
Promotional fluff flies away,
Now messages reflect what users care—
Just title, description, hashtags at play,
No emoji fuss, no "worth peeking" deceit! ✨

🚥 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 PR title accurately describes the main change: removing hardcoded promotional text from share messages as reported in issue #100.
Linked Issues check ✅ Passed The PR successfully addresses issue #100 by removing hardcoded promotional text from WhatsApp, Telegram, and Email share messages, ensuring output matches only user-provided options.
Out of Scope Changes check ✅ Passed All changes are directly related to removing hardcoded promotional text from share messages as specified in issue #100; no out-of-scope modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can enable review details to help with troubleshooting, context usage and more.

Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

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)
src/social-share-button.js (1)

192-227: 🧹 Nitpick | 🔵 Trivial

Add regression tests for getShareURL message composition.

Please add targeted tests for WhatsApp, Telegram, and Email URL generation (with/without description and hashtags) so this behavior doesn’t regress.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/social-share-button.js` around lines 192 - 227, Add regression tests for
the getShareURL method to verify message composition for WhatsApp, Telegram, and
Email when options include/omit description and hashtags: instantiate the
component (or call getShareURL) with explicit options (url, title, description,
hashtags, via) and assert the generated URLs (urls.whatsapp, urls.telegram,
urls.email) contain the correctly URL-encoded message parts and ordering — e.g.,
WhatsApp should include encoded title + optional description + optional hashtags
followed by the encoded url in the text param, Telegram should include the
encoded text param with title/description/hashtags, and Email should include
subject=encodedTitle and body containing encoded title/description then encoded
url; include separate test cases for (1) no description/no hashtags, (2)
description only, (3) hashtags only, and (4) description + hashtags to prevent
regressions in getShareURL message composition.
🤖 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 `@src/social-share-button.js`:
- Around line 192-227: Add regression tests for the getShareURL method to verify
message composition for WhatsApp, Telegram, and Email when options include/omit
description and hashtags: instantiate the component (or call getShareURL) with
explicit options (url, title, description, hashtags, via) and assert the
generated URLs (urls.whatsapp, urls.telegram, urls.email) contain the correctly
URL-encoded message parts and ordering — e.g., WhatsApp should include encoded
title + optional description + optional hashtags followed by the encoded url in
the text param, Telegram should include the encoded text param with
title/description/hashtags, and Email should include subject=encodedTitle and
body containing encoded title/description then encoded url; include separate
test cases for (1) no description/no hashtags, (2) description only, (3)
hashtags only, and (4) description + hashtags to prevent regressions in
getShareURL message composition.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 24043fcd-7b31-4992-ba94-2ebc50dc8d69

📥 Commits

Reviewing files that changed from the base of the PR and between 9e7e113 and 2482330.

📒 Files selected for processing (1)
  • src/social-share-button.js

@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 Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Generated share messages include hardcoded promotional text not documented in README

1 participant