Skip to content

fix: improve copy button UX in Password Generator#1655

Merged
priyankarpal merged 2 commits intoreactplay:mainfrom
harishsehlangia:fix/password-generator-copy-ux
Feb 5, 2026
Merged

fix: improve copy button UX in Password Generator#1655
priyankarpal merged 2 commits intoreactplay:mainfrom
harishsehlangia:fix/password-generator-copy-ux

Conversation

@harishsehlangia
Copy link
Contributor

Before creating this PR, please confirm the following:


Description

This PR improves the copy interaction in the Password Generator play by fixing a small UX issue and adding clear visual feedback for users.

Summary of changes

  • Prevents layout shift when the copy button text changes from Copy to Copied.
  • Adds a temporary visual highlight to the password input after copying.
  • Temporarily disables and fades the copy button in the copied state, then restores it automatically.

This change is UX-only and does not affect any shared components or core logic.

Fixes #1654


Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Tested locally by generating a password and clicking the Copy button.
  • Verified there is no layout shift when the button text changes.
  • Verified visual feedback appears on the password input after copying.
  • Verified the copy button is temporarily disabled and restored correctly.
  • Tested across multiple copy actions to ensure consistent behavior.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots or example output

Before

  • Copy button caused a slight layout shift when text changed.
  • No visual confirmation on password input after copying.

After

  • No layout shift during copy action.
  • Password input highlights briefly to confirm copy.
  • Copy button fades and is temporarily disabled in the copied state.

@netlify
Copy link

netlify bot commented Feb 5, 2026

Deploy Preview for reactplayio ready!

Name Link
🔨 Latest commit 935135c
🔍 Latest deploy log https://app.netlify.com/projects/reactplayio/deploys/6984a2ea27a2f20d0574043d
😎 Deploy Preview https://deploy-preview-1655--reactplayio.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.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hey! contributor, thank you for opening a Pull Request 🎉.

@reactplay/maintainers will review your submission soon and give you helpful feedback. If you're interested in continuing your contributions to open source and want to be a part of a welcoming and fantastic community, we invite you to join our ReactPlay Discord Community.
Show your support by starring ⭐ this repository. Thank you and we appreciate your contribution to open source!
Stale Marking : After 30 days of inactivity this issue/PR will be marked as stale issue/PR and it will be closed and locked in 7 days if no further activity occurs.

@harishsehlangia
Copy link
Contributor Author

@priyankarpal Kindly assign to the label: Apertre 3.0

@priyankarpal priyankarpal merged commit 14fadea into reactplay:main Feb 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [Bug report]: Copy button causes layout shift and lacks clear copy feedback

2 participants