Skip to content

Improve Calculator UI — rounded buttons, separate screens, colored = and Clear#226

Open
DhruvGupta6177 wants to merge 2 commits into
Axe-Pearl:masterfrom
DhruvGupta6177:improve-calculator-ui
Open

Improve Calculator UI — rounded buttons, separate screens, colored = and Clear#226
DhruvGupta6177 wants to merge 2 commits into
Axe-Pearl:masterfrom
DhruvGupta6177:improve-calculator-ui

Conversation

@DhruvGupta6177

Copy link
Copy Markdown

Summary

This PR improves the Calculator UI to be more realistic and user-friendly.

What I changed

  • Added rounded buttons with hover effects and smooth transitions.
  • Colored = (green) and C (red) buttons for clearer affordance.
  • Separated operation and result screens: operation at top, result at bottom.
  • Styled screens with high-contrast colors for readability.
  • Decimal button placed on its own row to improve layout.

Files changed

  • Calculator/cal.html
  • Calculator/cal.css

Notes

  • Changes are on branch improve-calculator-ui in my fork.
  • Manual testing: UI updated and pushed to the fork.

Please review and merge if acceptable.

- 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
- 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
Copilot AI review requested due to automatic review settings June 3, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds user-configurable password length to the Password Generator UI (with client-side clamping) and refreshes the Calculator UI with a new screen layout and improved button styling.

Changes:

  • Add a numeric “Password Length” input and use it to generate passwords.
  • Validate/clamp password length to a 1–128 range and update the input accordingly.
  • Update Calculator markup/CSS to introduce a dedicated screen container and enhanced button styles.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Password Generator/index.js Reads user-selected length, clamps it, and generates passwords with the chosen length.
Password Generator/index.html Adds a labeled numeric input for password length.
Password Generator/index.css Styles the new password-length input group.
Calculator/cal.html Restructures the display into operation/result “screens” and adds button classes.
Calculator/cal.css Adds hover effects and new styles for special buttons and screens.
Comments suppressed due to low confidence (1)

Calculator/cal.css:1

  • The layout relies on fixed pixel widths (900px/815px), which is likely to overflow or require horizontal scrolling on smaller screens. Consider using fluid sizing (max-width: 100%, width: 100% for .screen-container/.decimal-btn) and letting button rows wrap or use a grid so the calculator remains usable on narrow viewports.
body{

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +43 to +44
let lengthInput = document.querySelector("#passwordLength");
let length = parseInt(lengthInput.value) || 12;
};

const displayPassword = () => {
let lengthInput = document.querySelector("#passwordLength");
Comment on lines 57 to 59
let dPassword1 = document.querySelector(".Password1");
dPassword1.textContent = generatePassword(13);
dPassword1.textContent = generatePassword(length);
let dPassword2 = document.querySelector(".Password2");
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