Skip to content

Frontend/password updates#979

Merged
isabeleliassen merged 2 commits intocsg-org:developmentfrom
InspiringApps:frontend/password-updates
Aug 6, 2025
Merged

Frontend/password updates#979
isabeleliassen merged 2 commits intocsg-org:developmentfrom
InspiringApps:frontend/password-updates

Conversation

@jsandoval81
Copy link
Copy Markdown
Collaborator

@jsandoval81 jsandoval81 commented Aug 1, 2025

Requirements List

  • None

Description List

  • Update ChangePassword component password requirements to match backend
  • Update ChangePassword component to have hidden username input for password managers

Testing List

  • yarn test:unit:all should run without errors or warnings
  • yarn serve should run without errors or warnings
  • yarn build should run without errors or warnings
  • Code review
  • Testing
    • Login as a user for which you will update the password
    • Navigate to the Account page
    • Confirm the Change Password section now requires:
      • Length 12
      • At least 1 uppercase
      • At least 1 lowercase
      • At least 1 number
    • Confirm there are no console warnings about missing username input (chrome)
    • Confirm password reset is successful

Closes #970

Summary by CodeRabbit

  • New Features

    • Added a hidden, disabled username field to the Change Password form to improve browser autofill support.
    • Introduced new localization entries for "Username" in English and Spanish.
  • Enhancements

    • Strengthened password requirements: new passwords must include at least one lowercase letter and one number, with a minimum length of 12 characters.
  • Style

    • Scoped Change Password form styles for better maintainability and isolation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 1, 2025

Walkthrough

The ChangePassword component and related styles were updated to enhance password validation per new requirements, add a hidden username input for autofill, and improve localization. Styles for form elements were scoped, and new localization keys for "username" were added in English and Spanish locale files.

Changes

Cohort / File(s) Change Summary
ChangePassword Component Logic
webroot/src/components/ChangePassword/ChangePassword.ts
Enhanced password validation to require uppercase, lowercase, and numeric characters; added computed properties for user data.
ChangePassword Form Markup
webroot/src/components/ChangePassword/ChangePassword.vue
Added a hidden, disabled username input with autocomplete for browser autofill support.
Scoped Styles for ChangePassword
webroot/src/components/ChangePassword/ChangePassword.less
Scoped .form-title and new .hidden class under .change-password-container.
Localization: English
webroot/src/locales/en.json
Added "username" key to the "common" section.
Localization: Spanish
webroot/src/locales/es.json
Added "username" key with translation to the "common" section.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ChangePasswordComponent
    participant VuexStore

    User->>ChangePasswordComponent: Open Change Password form
    ChangePasswordComponent->>VuexStore: Retrieve user data
    ChangePasswordComponent->>ChangePasswordComponent: Display form with hidden username input (autofill)
    User->>ChangePasswordComponent: Enter new password
    ChangePasswordComponent->>ChangePasswordComponent: Validate password (length, uppercase, lowercase, number)
    ChangePasswordComponent-->>User: Show validation feedback or submit
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Update password requirements: min 12 chars, 1 uppercase, 1 lowercase, 1 number (#970)
Change-password section on Account page reflects new requirements (#970)
UI shows correct server error messages from Cognito if applicable (#970) No changes observed regarding server error message handling or display in this PR.

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Possibly related PRs

Suggested reviewers

  • jlkravitz
  • isabeleliassen

Poem

A password must now be strong and bright,
With numbers, cases, and twelve in sight.
Username hidden but ready to fill,
In English and Spanish, we localize still.
A hop and a skip, the bunny approves—
Secure and neat, this code improves! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4eb5151 and a9a3b61.

📒 Files selected for processing (1)
  • webroot/src/components/ChangePassword/ChangePassword.ts (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • webroot/src/components/ChangePassword/ChangePassword.ts
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jsandoval81 jsandoval81 changed the title WIP: change password updates Frontend/password updates Aug 1, 2025
@jsandoval81 jsandoval81 requested a review from rmolinares August 1, 2025 20:19
@jsandoval81
Copy link
Copy Markdown
Collaborator Author

@jlkravitz This is ready for your review.

Copy link
Copy Markdown
Collaborator

@jlkravitz jlkravitz left a comment

Choose a reason for hiding this comment

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

one comment but otherwise looks good!

Comment thread webroot/src/components/ChangePassword/ChangePassword.ts Outdated
@jsandoval81 jsandoval81 requested a review from jlkravitz August 5, 2025 16:59
Copy link
Copy Markdown
Collaborator

@jlkravitz jlkravitz left a comment

Choose a reason for hiding this comment

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

@isabeleliassen Good to merge!

@isabeleliassen isabeleliassen merged commit 23cd234 into csg-org:development Aug 6, 2025
1 check passed
@jsandoval81 jsandoval81 deleted the frontend/password-updates branch September 15, 2025 15:51
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.

FE password requirements update

4 participants