rahuldkjain/github-profile-readme-generator

Enhancement: Add auto-revert and copied confirmation to Copy Markdown button

オープン

#915 opened on 2025/10/09

 (11 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (8,392 件のフォーク)batch import
enhancementhacktoberfestv1-deprecated

Repository metrics

Stars
 (24,395 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

🧾 Issue Title

Copy Markdown button does not revert to original text after copying the markdown file.


🐞 Description

When using the Copy Markdown button after generating a README, the button text changes to “Copied” but does not revert back to its original state.
Additionally, there’s no visual confirmation (other than the button text) indicating that the markdown was successfully copied.


💡 Expected Behavior

  • After clicking Copy Markdown, the text should:
    1. Display a short success message — e.g., “Copied!” or a small tooltip/toast notification 💬
    2. Revert the button text back to “Copy Markdown” after 2 seconds 🔄

⚙️ Steps to Reproduce

  1. Generate a README using the generator.
  2. Click the Copy Markdown button.
  3. Observe that the button text stays as “Copied” and doesn’t revert.

🧠 Proposed Solution

Implement a small timeout and optional message display:

  • Temporarily set the button text to "Copied!".
  • Use setTimeout() to reset it after ~2 seconds.
  • Display a short “Copied to clipboard” message below.

コントリビューターガイド