Skip to content

Added custom demo configuration for SocialShareButton#138

Open
sneha-techiee wants to merge 3 commits intoAOSSIE-Org:mainfrom
sneha-techiee:add-smartnotes-tutorial
Open

Added custom demo configuration for SocialShareButton#138
sneha-techiee wants to merge 3 commits intoAOSSIE-Org:mainfrom
sneha-techiee:add-smartnotes-tutorial

Conversation

@sneha-techiee
Copy link
Copy Markdown

@sneha-techiee sneha-techiee commented Mar 31, 2026

✨ Contribution

This PR adds a custom demo example to the Button Styles section.

  • Introduced a new demo card labeled "Sneha Custom"
  • Demonstrates personalized configuration of the SocialShareButton
  • Helps developers understand how to customize the component

🎬 Demo Video

https://drive.google.com/file/d/1bxripZunfVYkqYD2aNJOejvloK-5OVDN/view?usp=sharing

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a new custom color demo tile to the demo grid showcasing additional styling options
    • Introduced a new demo section featuring a configurable share button component with preset configurations for testing and integration reference

@github-actions github-actions Bot added no-issue-linked PR is not linked to any issue frontend Changes to frontend code size/S Small PR (11-50 lines changed) first-time-contributor First PR of an external contributor needs-review labels Mar 31, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 31, 2026

Walkthrough

This PR adds a new "Sneha Custom" demo and a separate "Sneha Custom Demo" section to index.html, plus two new SocialShareButton initializations that render into #demo-sneha and #share-button with custom titles, descriptions, style, and text.

Changes

Cohort / File(s) Summary
Demo Page Updates
index.html
Added a "✨ Sneha Custom" grid tile (#demo-sneha) and a new "🧪 Sneha Custom Demo" section (#share-button). Extended DOMContentLoaded script with a snehaBaseConfig and two new SocialShareButton instances using custom title, description, buttonStyle, and buttonText.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

Typescript Lang

Suggested reviewers

  • kpj2006

Poem

🐰✨ I hopped in code with joyful cheer,
A Sneha demo now appears,
Two buttons bloom with text and light,
Sharing dreams into the night! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR does not meet the core requirement of issue #19: submitting a tutorial video demonstrating SocialShareButton integration in an external org repository, not adding demo code to the SocialShareButton repo itself. Submit a PR with a tutorial video link added to the README demo section of an external organization repository where SocialShareButton was integrated, as specified in issue #19.
Out of Scope Changes check ⚠️ Warning The PR adds demo configuration code to index.html, which is out of scope for issue #19 that explicitly requests only tutorial video links in README sections of external repos. Remove demo configuration changes from index.html and instead submit the PR against an external organization repository with only the tutorial video link in its README.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a custom demo configuration for the SocialShareButton component to the demo page.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

📋 Issue Planner

Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).

View plan for ticket: #19

✨ 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 documentation Changes to documentation files good first issue Good for newcomers and removed no-issue-linked PR is not linked to any issue documentation Changes to documentation files labels Mar 31, 2026
@sneha-techiee
Copy link
Copy Markdown
Author

Hi maintainers!

I have added a custom demo to showcase how developers can personalize the SocialShareButton.

Would love your feedback! 😊

@sneha-techiee sneha-techiee reopened this Mar 31, 2026
@github-actions github-actions Bot added documentation Changes to documentation files and removed documentation Changes to documentation files labels Mar 31, 2026
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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@index.html`:
- Around line 595-596: The HTML contains a non-descriptive placeholder comment
("THIS IS IMPORTANT") above the share button div; remove that placeholder
comment or replace it with a concise, context-specific comment that explains the
purpose of the element (for example, describing that the <div id="share-button">
is the container for the page's share controls or that scripts will inject the
share widget here) so the markup follows the Google HTML style guide.
- Around line 781-798: The two SocialShareButton initializations (containers
"#share-button" and "#demo-sneha") duplicate the same options and hardcode the
URL; create a shared config object (e.g., const sharedDemoConfig or demoConfig)
that uses the existing demoUrl for url and includes title, description,
buttonStyle, and buttonText, then instantiate each SocialShareButton by merging
the shared config with the container override (using object spread or
Object.assign) so both instances reuse the same base options and avoid drift.
🪄 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: 9f49f9dc-5684-40a5-af4e-1802e4edebd7

📥 Commits

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

📒 Files selected for processing (1)
  • index.html

Comment thread index.html Outdated
Comment thread index.html Outdated
@github-actions github-actions Bot added documentation Changes to documentation files and removed documentation Changes to documentation files labels Apr 13, 2026
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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@index.html`:
- Around line 585-600: The change added a local demo section (the
div.demo-section containing the "🧪 Sneha Custom Demo" and the element with
id="share-button" in index.html) but does not satisfy Issue `#19` which requires
adding a tutorial integration in a different org frontend repo plus a README
demo-link PR; either remove the claim that this closes `#19` and delete or revert
the demo-section div (the demo-section / demo-grid / `#share-button` markup) from
this repo, or move the demo implementation to the target org frontend repository
and create a separate PR there that includes the demo files and an updated
README with the demo link so the issue can be properly closed.
🪄 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: a4f0ec8a-7404-425a-b42b-66d86a2bd5b4

📥 Commits

Reviewing files that changed from the base of the PR and between bad3cd7 and 497a954.

📒 Files selected for processing (1)
  • index.html

Comment thread index.html
Comment on lines +585 to +600
<!-- Sneha Custom Demo -->
<div class="demo-section">
<h2>🧪 Sneha Custom Demo</h2>
<p>This is Sneha's custom integration demo.</p>

<div class="demo-grid">
<div class="demo-item">
<h3>My Share Button</h3>
<p>Custom example added by Sneha</p>

<!-- Sneha's custom share button container -->
<div id="share-button"></div>

</div>
</div>
</div>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Apr 13, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

This change does not fulfill Issue #19 acceptance criteria.

Issue #19 requires a tutorial integration in a different org frontend repo plus a README demo-link PR there. Adding this section in index.html here does not satisfy that deliverable, so “closes #19” is currently unsupported by the implementation scope.

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

In `@index.html` around lines 585 - 600, The change added a local demo section
(the div.demo-section containing the "🧪 Sneha Custom Demo" and the element with
id="share-button" in index.html) but does not satisfy Issue `#19` which requires
adding a tutorial integration in a different org frontend repo plus a README
demo-link PR; either remove the claim that this closes `#19` and delete or revert
the demo-section div (the demo-section / demo-grid / `#share-button` markup) from
this repo, or move the demo implementation to the target org frontend repository
and create a separate PR there that includes the demo files and an updated
README with the demo link so the issue can be properly closed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi @coderabbitai 👋

Thanks for pointing this out!

You're right — this PR focuses on adding a custom demo within the current repository and does not fully satisfy the requirements of Issue #19.

I'll remove the “Closes #19” reference from this PR and treat this as a separate enhancement contribution.

I will work on a proper tutorial integration in a different frontend project as required for Issue #19.

Thanks for the clarification! 😊

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.

@sneha-techiee, thanks for the understanding and for the clear plan! 👍

To summarize the next steps:

  1. This PR — remove the Closes tutorial: submit an tutorial integrating our SocialShareButton with different tech stack repo from our org #19`` reference from the PR description so it's tracked as a standalone demo enhancement.
  2. Issue #19 — create a separate PR in the target org frontend repo with the tutorial video link added to that repo's README, as the issue specifies.

Would you like me to open a new GitHub issue to track the proper Issue #19 tutorial work as a follow-up, so it doesn't get lost? Just let me know!


🧠 Learnings used
Learnt from: kpj2006
Repo: AOSSIE-Org/SocialShareButton PR: 0
File: :0-0
Timestamp: 2026-03-17T17:12:57.712Z
Learning: In AOSSIE-Org/SocialShareButton, new wrapper files (e.g., src/social-share-button-preact.jsx) added in a PR are not part of any CDN release until the next version tag is cut. When reviewing PRs that add new wrapper/source files, flag any README or index.html CDN URLs that reference a version predating the new file, and check that acquisition instructions (CDN URL, npm, or download link) are provided for the new file itself.

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.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the clarification! 😊

I've removed the “Closes #19” reference from the PR description. This PR now stands as a separate demo enhancement.

I’ll work on a proper tutorial integration in a different repo for Issue #19.

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.

@sneha-techiee, sounds great — thanks for acting on this promptly! 🎉 The PR description update keeps things clean and accurately scoped. Looking forward to seeing the proper Issue #19 tutorial integration in a separate PR when you're ready!


🧠 Learnings used
Learnt from: kpj2006
Repo: AOSSIE-Org/SocialShareButton PR: 0
File: :0-0
Timestamp: 2026-03-17T17:12:57.712Z
Learning: In AOSSIE-Org/SocialShareButton, new wrapper files (e.g., src/social-share-button-preact.jsx) added in a PR are not part of any CDN release until the next version tag is cut. When reviewing PRs that add new wrapper/source files, flag any README or index.html CDN URLs that reference a version predating the new file, and check that acquisition instructions (CDN URL, npm, or download link) are provided for the new file itself.

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.

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.

If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@github-actions github-actions Bot added the no-issue-linked PR is not linked to any issue label Apr 13, 2026
@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 28, 2026
@sneha-techiee
Copy link
Copy Markdown
Author

Hi maintainers 👋

Just following up on this PR.
The requested review changes have been addressed, and the PR is now ready for review.

Would appreciate your feedback whenever you get time. 😊

@github-actions github-actions Bot removed the Stale label Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time-contributor First PR of an external contributor frontend Changes to frontend code good first issue Good for newcomers needs-review no-issue-linked PR is not linked to any issue size/S Small PR (11-50 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant