Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Validation for URL Shortener Buttons and Fix Placeholder Visibility Issue #1577

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

anuj-kumary
Copy link
Contributor

@anuj-kumary anuj-kumary commented Dec 2, 2024

First thing, PLEASE READ THIS: ReactPlay Code Review Checklist

Description

Summary of the Change:

  1. Validation for the "Shorten URL" Button:

Added validation to prevent the API call when the input field is empty. Ensures that users cannot attempt to shorten a URL without providing valid input.

  1. Validation for the "Copy to Clipboard" Button:

Modified the button's behavior to ensure it is only enabled when a valid shortened URL is present. Prevents users from copying empty or invalid data.

  1. Fix for Placeholder Text Visibility:

Adjusted the styling of the input field to ensure the placeholder text is fully visible.
Enhances usability and improves the overall user experience by providing clear instructions through the placeholder.

Fixes #1575

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Validation for the "Shorten URL" Button:
  • Manually tested by attempting to click the button with an empty input field.
  • Confirmed that the API call is not triggered when the input is invalid or empty.
  • Verified functionality with valid URL inputs to ensure no regression.
  1. Validation for the "Copy to Clipboard" Button:
  • Confirmed that the button remains disabled when no valid URL is present.
  • Ensured that valid data was successfully copied to the clipboard when a valid shortened URL was available.
  1. Fix for Placeholder Text Visibility:
  • Ensured that the text is no longer cut off and is fully readable at all times.

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

Screen.Recording.2024-11-27.at.5.50.52.PM.mov
Screenshot 2024-11-27 at 5 52 36 PM

Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for reactplayio ready!

Name Link
🔨 Latest commit 4372162
🔍 Latest deploy log https://app.netlify.com/sites/reactplayio/deploys/674d6a6b0f36e800083d29b1
😎 Deploy Preview https://deploy-preview-1577--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 site 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.

@Sachin-chaurasiya Sachin-chaurasiya merged commit a2c399a into reactplay:main Dec 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [Bug report]: Add validation for URL Shortener buttons and fix placeholder visibility issue
2 participants