Skip to content

Feat: Add Copy Story Button for Easy Content Sharing (#168)#175

Merged
Piyushydv08 merged 2 commits into
Piyushydv08:mainfrom
Sumitsutharss:feat/copy-story-168
Jun 6, 2026
Merged

Feat: Add Copy Story Button for Easy Content Sharing (#168)#175
Piyushydv08 merged 2 commits into
Piyushydv08:mainfrom
Sumitsutharss:feat/copy-story-168

Conversation

@Sumitsutharss

Copy link
Copy Markdown
Contributor

🏷️ PR Type

  • ✨ Feature

🔗 Related Issue

Closes #168


📝 Rationale / Motivation

Currently, users can view, edit, delete, and fix grammar for their stories, but there is no quick way to copy story content for reuse, sharing, or backup purposes.

This enhancement adds a Copy Story button that allows users to instantly copy story content to their clipboard with a single click.


✨ Description of Changes

Frontend

  • Added a Copy button alongside existing story action buttons
  • Added Clipboard API integration using navigator.clipboard.writeText()
  • Added success toast notification when content is copied successfully
  • Added error toast notification when copy fails
  • Added Clipboard API availability check
  • Improved responsive layout by replacing space-x-3 with flex-wrap gap-3 to prevent overflow on smaller screens

Files Modified

  • src/pages/ShareStory.tsx

🧪 Testing Instructions

  1. Login and navigate to the Share Story page.
  2. Scroll to the "Your Stories" section.
  3. Click the Copy button on any story.
  4. Verify that a success toast appears.
  5. Paste the copied content into a text editor using Ctrl + V.
  6. Verify the story content is copied correctly.
  7. Test on smaller screen sizes and ensure action buttons wrap correctly.

👀 Impact Assessment

  • Improves user experience and accessibility
  • No backend changes
  • No database schema changes
  • No breaking changes
  • Mobile responsive

🖼️ Screenshots

Screenshot 2026-06-05 210232 Screenshot 2026-06-05 210237

⚡ Checklist

  • Code follows project guidelines
  • Changes tested locally
  • Related issue linked
  • User-facing changes documented
  • No new warnings/errors introduced
  • Production build passes successfully

@netlify

netlify Bot commented Jun 5, 2026

Copy link
Copy Markdown

Deploy Preview for safevoiceforwomen ready!

Name Link
🔨 Latest commit 62e4342
🔍 Latest deploy log https://app.netlify.com/projects/safevoiceforwomen/deploys/6a2492fc2b2c230008fa7000
😎 Deploy Preview https://deploy-preview-175--safevoiceforwomen.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added good first issue Good for newcomers gssoc'26 Contribution for Girlscript Summer of Code'26 labels Jun 5, 2026
@Piyushydv08 Piyushydv08 merged commit c2fb0fd into Piyushydv08:main Jun 6, 2026
6 checks passed
@Piyushydv08 Piyushydv08 added level:begineer GSSoC: Beginner difficulty - 20 pts gssoc:approved PR approved by Admin type:feature GSSoC: New feature labels Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers gssoc:approved PR approved by Admin gssoc'26 Contribution for Girlscript Summer of Code'26 level:begineer GSSoC: Beginner difficulty - 20 pts type:feature GSSoC: New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Copy Story Button for Easy Content Sharing

2 participants