Add user input field for password length in Password Generator#225
Open
DhruvGupta6177 wants to merge 2 commits into
Open
Add user input field for password length in Password Generator#225DhruvGupta6177 wants to merge 2 commits into
DhruvGupta6177 wants to merge 2 commits into
Conversation
- Added input field to specify password length (1-128 characters) - Removed hardcoded password lengths (13 and 12) - Both passwords now generate with the same user-specified length - Added validation for input values with alerts - Styled input field to match dark theme - Default password length set to 12
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a user-configurable password length input to the password generator UI and updates generation logic to respect the chosen length.
Changes:
- Added numeric input (
#passwordLength) to control generated password length. - Updated
displayPassword()to read, validate, and clamp password length (1–128). - Styled the new length input group in CSS.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Password Generator/index.js | Reads length from the new input and applies min/max validation before generating passwords. |
| Password Generator/index.html | Adds labeled number input for password length selection. |
| Password Generator/index.css | Adds layout and styling for the new length input group and input focus states. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Added distinct colors for = button (green) and C (Clear) button (red) - Rounded buttons with hover effects for better UX - Improved screen display with separate operation and result sections - Added better visual hierarchy and contrast - Styled screens with dark theme colors for better visibility - Decimal button now spans full width on its own row
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a user input field to the Password Generator that allows users to specify the password length, resolving the issue of hardcoded password lengths.
Changes Made
Files Modified
Password Generator/index.html- Added length input field and labelPassword Generator/index.js- Updated displayPassword() function with dynamic length logicPassword Generator/index.css- Added styles for the input fieldTesting
The feature is fully functional and ready for use: