Skip to content

WEB-fix-login-capslock: Add Caps Lock warning to login password field#3553

Open
Abhishekmaurya12367 wants to merge 4 commits intoopenMF:devfrom
Abhishekmaurya12367:WEB-fix-login-capslock
Open

WEB-fix-login-capslock: Add Caps Lock warning to login password field#3553
Abhishekmaurya12367 wants to merge 4 commits intoopenMF:devfrom
Abhishekmaurya12367:WEB-fix-login-capslock

Conversation

@Abhishekmaurya12367
Copy link
Copy Markdown

@Abhishekmaurya12367 Abhishekmaurya12367 commented May 2, 2026

Description

This PR adds a visual warning to the password field when Caps Lock is enabled. This improves user experience by preventing failed login attempts due to case-sensitivity.

Changes

  • Added isCapsLockOn state to LoginFormComponent.
    • Implemented checkCapsLock method using KeyboardEvent.getModifierState('CapsLock').
    • Updated login-form.component.html to display a keyboard_capslock icon with a tooltip when active.
    • Added translation for "Caps Lock is on".

Checklist

  • Prettier applied.
  • - [x] ng lint passes.
  • - [x] Tested locally.

Summary by CodeRabbit

  • New Features

    • Added Caps Lock detection for the password field, displaying an accessible warning icon when Caps Lock is active.
  • Translations

    • Added "Caps Lock is on" notification message for all supported languages.
    • Updated loan originator-related labels in multiple language translations.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Warning

Rate limit exceeded

@Abhishekmaurya12367 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 33 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 92540e34-5d37-4227-9fac-490cc74961b5

📥 Commits

Reviewing files that changed from the base of the PR and between 12acad4 and d3225e4.

📒 Files selected for processing (12)
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/sw-SW.json

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • 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

Walkthrough

Adds Caps Lock detection to the login password input, exposes component state and a handler, renders an accessible Caps Lock warning icon in the template, adds styling for the warning, and inserts the new i18n key across multiple locale files.

Changes

Caps Lock Warning Feature

Layer / File(s) Summary
Data / State
src/app/login/login-form/login-form.component.ts
Adds isCapsLockOn: boolean field (initialized false).
Core Logic
src/app/login/login-form/login-form.component.ts
Adds checkCapsLock(event: any) which sets isCapsLockOn using event.getModifierState('CapsLock') for KeyboardEvent/MouseEvent.
Template Integration
src/app/login/login-form/login-form.component.html
Password <input> now calls checkCapsLock($event) on keydown, keyup, focus, click, resets on blur; conditional warning icon with translated tooltip and accessibility attributes rendered when isCapsLockOn is true.
Styling
src/app/login/login-form/login-form.component.scss
Adds .caps-lock-warning CSS (neutral text color, margin-right:8px, cursor:help, opacity:0.8); removes leading BOM/hidden char.
Internationalization
src/assets/translations/*
Adds commons["Caps Lock is on"] to multiple locale files (en-US, cs-CS, de-DE, es-CL, es-MX, fr-FR, it-IT, ko-KO, lt-LT, lv-LV, ne-NE, pt-PT, sw-SW). Several locale files also adjust/move/update View/Edit Loan Originator translations and remove duplicate entries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • alberto-art3ch
  • IOhacker
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding a Caps Lock warning to the login password field, which is the core feature implemented across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: Turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value).


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
Review rate limit: 0/1 reviews remaining, refill in 35 minutes and 33 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/assets/translations/en-US.json (1)

1071-1071: 🏗️ Heavy lift

Backfill this new i18n key across supported locale files.

Line 1071 adds the key only in en-US. If other locale JSON files don’t contain labels.commons.Caps Lock is on, users can see the raw key string in the tooltip instead of localized text.

As per coding guidelines: “Run npm run translations:extract to extract i18n variables whenever new strings are added to code.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/assets/translations/en-US.json` at line 1071, The new i18n key
labels.commons."Caps Lock is on" was added only to en-US and must be added to
all supported locale JSONs: open each locale file (e.g., the other translations
JSONs under assets/translations), add the same key path labels.commons."Caps
Lock is on" with an appropriate translated value (or a temporary placeholder if
unsure), save, then run npm run translations:extract to ensure
extraction/consistency across locales and commit the updated locale files;
verify the tooltip now uses the localized string instead of the raw key.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/app/login/login-form/login-form.component.html`:
- Around line 41-52: The Caps Lock warning currently only toggles during key
events via the checkCapsLock($event) handler and is presented as a tooltip on
the suffix icon, which can leave a stale visible state after blur and won’t be
reliably announced to assistive tech; update the component so checkCapsLock also
runs on focus/blur (or create explicit handlers like
onPasswordFocus/onPasswordBlur) to clear or re-evaluate isCapsLockOn, always
render the caps-lock-warning element (do not rely solely on tooltip) and add an
aria-live="polite" text node bound to isCapsLockOn so screen readers get an
immediate announcement when isCapsLockOn changes; ensure the template references
the same isCapsLockOn property and the icon element (the element with class
"caps-lock-warning" and name="keyboard_capslock") for consistency.

---

Nitpick comments:
In `@src/assets/translations/en-US.json`:
- Line 1071: The new i18n key labels.commons."Caps Lock is on" was added only to
en-US and must be added to all supported locale JSONs: open each locale file
(e.g., the other translations JSONs under assets/translations), add the same key
path labels.commons."Caps Lock is on" with an appropriate translated value (or a
temporary placeholder if unsure), save, then run npm run translations:extract to
ensure extraction/consistency across locales and commit the updated locale
files; verify the tooltip now uses the localized string instead of the raw key.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1c59096e-934e-46d8-bc3c-6bd4f4898cfd

📥 Commits

Reviewing files that changed from the base of the PR and between 42c0ef3 and c7f2467.

📒 Files selected for processing (4)
  • src/app/login/login-form/login-form.component.html
  • src/app/login/login-form/login-form.component.scss
  • src/app/login/login-form/login-form.component.ts
  • src/assets/translations/en-US.json

Comment thread src/app/login/login-form/login-form.component.html
@Abhishekmaurya12367 Abhishekmaurya12367 changed the title Control+## DescriptionWEB-fix-login-capslock: Add Caps Lock warning to login password field Control+## DescriptionWEB-fix-login-capslock: Add Caps Lock warning to login password fieldControl+WEB-fix-login-capslock: Add Caps Lock warning to login password field May 2, 2026
@Abhishekmaurya12367 Abhishekmaurya12367 changed the title Control+## DescriptionWEB-fix-login-capslock: Add Caps Lock warning to login password fieldControl+WEB-fix-login-capslock: Add Caps Lock warning to login password field Control+## DescriptionWEB-fix-login-capslock: Add Caps Lock warning to login password fieldControl+WEB-fix-login-capslock: Add Caps Lock warning to login password fieldControl+WEB-fix-login-capslock: Add Caps Lock warning to login password field May 2, 2026
@Abhishekmaurya12367 Abhishekmaurya12367 changed the title Control+## DescriptionWEB-fix-login-capslock: Add Caps Lock warning to login password fieldControl+WEB-fix-login-capslock: Add Caps Lock warning to login password fieldControl+WEB-fix-login-capslock: Add Caps Lock warning to login password field WEB-fix-login-capslock: Add Caps Lock warning to login password field May 2, 2026
@Abhishekmaurya12367
Copy link
Copy Markdown
Author

Hi @alberto-art3ch, please review this small UI enhancement.

Copy link
Copy Markdown
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

Missing i18n file translation, what if the password has uppercase?

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/assets/translations/cs-CS.json`:
- Line 1089: Update the Czech translation for the tooltip key "Caps Lock is on"
in the cs-CS.json locale file: replace the English value with the Czech text
(e.g., "Caps Lock je zapnutý" or another approved Czech variant) so the JSON
entry for the "Caps Lock is on" key is fully localized; ensure the JSON remains
valid (keep the same key string and only change the value).

In `@src/assets/translations/de-DE.json`:
- Line 1090: The German translation for the key "Caps Lock is on" is still in
English; update the de-DE.json entry for the string key "Caps Lock is on" to a
proper German localization (e.g., "Feststelltaste ist aktiviert" or
"Feststelltaste ist eingeschaltet") so the de-DE locale is consistent with other
translations.

In `@src/assets/translations/es-MX.json`:
- Around line 1089-1090: Replace the English string value for the "Caps Lock is
on" key in the es-MX translations with a proper Spanish translation; update the
JSON entry for the key "Caps Lock is on" (currently "Caps Lock is on") to a
Spanish phrase such as "Bloqueo de mayúsculas activado" so the Spanish locale
contains no mixed-language UI.

In `@src/assets/translations/fr-FR.json`:
- Around line 1090-1091: Update the French translation for the string key "Caps
Lock is on" in the fr-FR translations bundle: replace the English value with a
proper French message (e.g., "Verr. Maj. activée") so the entry becomes "Caps
Lock is on": "Verr. Maj. activée" ensuring the JSON value remains a quoted
string and valid JSON.

In `@src/assets/translations/lt-LT.json`:
- Line 1087: Replace the English value for the key "Caps Lock is on" in the
lt-LT.json locale entry with the Lithuanian translation; update the value for
the key "Caps Lock is on" to a proper Lithuanian string (e.g., "Caps Lock
įjungtas" or "Caps Lock yra įjungtas"), preserving the JSON quoting/formatting
and escaping rules so the file remains valid JSON.

In `@src/assets/translations/lv-LV.json`:
- Line 1088: The JSON entry with the key "Caps Lock is on" currently has an
English value; update the value to the Latvian translation ("Caps Lock ir
ieslēgts") so the entry reads "Caps Lock is on": "Caps Lock ir ieslēgts" —
locate the entry by the exact key "Caps Lock is on" in the lv-LV locale JSON and
replace the English string with the Latvian one, preserving JSON syntax and
quotes.

In `@src/assets/translations/ne-NE.json`:
- Line 1087: The JSON entry for the key "Caps Lock is on" in the ne-NE
translations bundle currently has an English value; replace that value with the
Nepali translation (for example: "क्याप्स लक सुचारू छ" or your approved Nepali
phrasing) while preserving the existing JSON key and quoting/escaping rules so
the line remains valid JSON for the "Caps Lock is on" property.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 47529ea9-91e4-4136-b7f2-78de84ff1fb6

📥 Commits

Reviewing files that changed from the base of the PR and between c7f2467 and 12acad4.

📒 Files selected for processing (15)
  • src/app/login/login-form/login-form.component.html
  • src/app/login/login-form/login-form.component.scss
  • src/app/login/login-form/login-form.component.ts
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/sw-SW.json
✅ Files skipped from review due to trivial changes (5)
  • src/assets/translations/sw-SW.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/es-CL.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/app/login/login-form/login-form.component.html
  • src/app/login/login-form/login-form.component.scss

Comment thread src/assets/translations/cs-CS.json Outdated
Comment thread src/assets/translations/de-DE.json Outdated
Comment thread src/assets/translations/es-MX.json Outdated
Comment thread src/assets/translations/fr-FR.json Outdated
Comment thread src/assets/translations/lt-LT.json Outdated
Comment thread src/assets/translations/lv-LV.json Outdated
Comment thread src/assets/translations/ne-NE.json Outdated
@Abhishekmaurya12367
Copy link
Copy Markdown
Author

Hi @IOhacker,
Thank you for the feedback! I have updated the PR please check again

@IOhacker
Copy link
Copy Markdown
Contributor

IOhacker commented May 5, 2026

Join the Mifos Slack Channel https://app.slack.com/client/T0F5GHE8Y/CJJGJLN10

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