Skip to content

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

Open
Sumitsutharss wants to merge 1 commit into
Piyushydv08:mainfrom
Sumitsutharss:feat/copy-story-168
Open

Feat: Add Copy Story Button for Easy Content Sharing (#168)#175
Sumitsutharss wants to merge 1 commit 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
Copy link
Copy Markdown

netlify Bot commented Jun 5, 2026

👷 Deploy request for safevoiceforwomen pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit b68237f

@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
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'26 Contribution for Girlscript Summer of Code'26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Copy Story Button for Easy Content Sharing

1 participant