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

feat: add app name in the input placeholder #402

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

nimish-ks
Copy link
Member

🔍 Overview

This PR updates the DeleteAppDialog component to improve user experience by displaying the actual app name in the confirmation input field's placeholder text, rather than using a static "MyApp" placeholder. This change makes it clearer to users which app they're about to delete.

💡 Proposed Changes

  • Modified the input placeholder in DeleteAppDialog to dynamically use the app name passed via props
  • Removed hardcoded "MyApp" placeholder text
  • Maintains all existing delete confirmation functionality and validation

🧪 Testing

  • Manually tested with various app names to ensure placeholder updates correctly
  • Verified that delete confirmation validation still works as expected

🎯 Reviewer Focus

Please focus on:

  • DeleteAppDialog component changes (single line modification)
  • Verify that the placeholder text properly updates based on the appName prop
  • Confirm that delete functionality and validation remain intact

@nimish-ks nimish-ks self-assigned this Dec 3, 2024
@rohan-chaturvedi
Copy link
Member

@nimish-ks I don't think its a good idea to add the expected input field value as a placeholder. This input field gatekeeps a very destructive and irreversible action. I'd suggest instead adding the app name in the copy (eg: Please type {appName} to confirm that you want to delete this App, and use the placeholder more as a hint, something like "App name to delete", "Name of App to delete" or just "App name" .

This approach would be more in-line with the semantic purpose of an input placeholder (i.e. a brief hint): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/placeholder

@nimish-ks
Copy link
Member Author

@nimish-ks I don't think its a good idea to add the expected input field value as a placeholder. This input field gatekeeps a very destructive and irreversible action. I'd suggest instead adding the app name in the copy (eg: Please type {appName} to confirm that you want to delete this App, and use the placeholder more as a hint, something like "App name to delete", "Name of App to delete" or just "App name" .

This approach would be more in-line with the semantic purpose of an input placeholder (i.e. a brief hint): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/placeholder

Was thinking along the same lines. Went with an empty placeholder and added app name in the copy.
image

thoughts?

@rohan-chaturvedi
Copy link
Member

@nimish-ks I don't think its a good idea to add the expected input field value as a placeholder. This input field gatekeeps a very destructive and irreversible action. I'd suggest instead adding the app name in the copy (eg: Please type {appName} to confirm that you want to delete this App, and use the placeholder more as a hint, something like "App name to delete", "Name of App to delete" or just "App name" .
This approach would be more in-line with the semantic purpose of an input placeholder (i.e. a brief hint): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/placeholder

Was thinking along the same lines. Went with an empty placeholder and added app name in the copy. image

thoughts?

This works. I still think we need a placeholder, but this is enough of an improvement for now

@nimish-ks nimish-ks merged commit 518fd75 into main Dec 4, 2024
6 checks passed
@nimish-ks nimish-ks deleted the feat--app-delete-confirmation-placeholder branch December 4, 2024 05:47
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.

2 participants