Skip to content

IS-11152: haapi stepper password input#111

Open
aleixsuau wants to merge 4 commits intointegration/IS-5161/login-web-appfrom
feature/IS-11152/password-field-final
Open

IS-11152: haapi stepper password input#111
aleixsuau wants to merge 4 commits intointegration/IS-5161/login-web-appfrom
feature/IS-11152/password-field-final

Conversation

@aleixsuau
Copy link
Copy Markdown

@aleixsuau aleixsuau commented Mar 27, 2026

PR changes:

  • Add dedicated HaapiStepperPasswordFormField component with show/hide visibility toggle and context-aware autocomplete hints (current-password for login, new-password for registration)
  • Extract password handling out of HaapiStepperTextFormField so each field type has its own component
  • Scope input element IDs with the action ID to avoid collisions when multiple forms exist on the same page
  • Rename CSS classes from generic names (haapi-form-input) to component-scoped names (haapi-stepper-form-field-text-input) for clearer customization. @urre Please verify they are right and refactor as needed. Also, I think an icon for the password visibility toggle would be a nice improvement. WDYT?

Test URL: https://localhost:8443/dev/oauth/authorize?client_id=client-one&redirect_uri=https%3A%2F%2Flocalhost%2Fclient-one%2Fcb1&response_type=code&acr=urn:se:curity:authentication:html-form:htmlSql&state=random

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors HAAPI stepper form field rendering to introduce a dedicated password field component (with show/hide and flow-aware autocomplete), scopes input element IDs by action to prevent DOM collisions, and updates CSS class names to be component-specific for clearer customization.

Changes:

  • Added HaapiStepperPasswordFormField with visibility toggle and autocomplete hints based on action kind.
  • Refactored text/select/checkbox fields to use action-scoped input IDs and updated component-scoped CSS classes.
  • Updated tests and documentation to reflect the new password behavior and CSS class naming.

Reviewed changes

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

Show a summary per file
File Description
src/login-web-app/src/shared/util/css/styles.css Renames/introduces component-scoped CSS classes for stepper form fields and password toggle styling.
src/login-web-app/src/haapi-stepper/feature/actions/form/fields/HaapiStepperTextFormField.tsx Removes password handling from text field, adds action-scoped IDs, updates test IDs and CSS classes.
src/login-web-app/src/haapi-stepper/feature/actions/form/fields/HaapiStepperSelectFormField.tsx Uses action-scoped IDs and new select-specific CSS classes.
src/login-web-app/src/haapi-stepper/feature/actions/form/fields/HaapiStepperPasswordFormField.tsx New password field component with show/hide toggle and action-kind-based autocomplete.
src/login-web-app/src/haapi-stepper/feature/actions/form/fields/HaapiStepperFormField.tsx Routes password fields to the new password component.
src/login-web-app/src/haapi-stepper/feature/actions/form/fields/HaapiStepperCheckboxFormField.tsx Uses action-scoped IDs and new checkbox-specific CSS classes.
src/login-web-app/src/haapi-stepper/feature/actions/form/HaapiStepperForm.spec.tsx Adds tests for password visibility toggle and login/registration autocomplete hints; updates mock login action kind.
src/login-web-app/src/haapi-stepper/README.md Updates the documented CSS class list to match the new component-scoped class names.

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

| `.haapi-form-field-checkbox-label` | `Form` | Checkbox-specific labels |
| `.haapi-stepper-button` | `Form` | Primary submit buttons |
| `.haapi-stepper-button-outline` | `Form` | Outline/cancel buttons |
| `.haapi-stepper-form-field-text-input` | `HaapiStepperTextFormField` | Text/password input fields |
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The README entry for .haapi-stepper-form-field-text-input still says “Text/password input fields”, but password fields now have their own dedicated classes (.haapi-stepper-form-field-password-*). Update this description to avoid misleading integrators customizing CSS.

Suggested change
| `.haapi-stepper-form-field-text-input` | `HaapiStepperTextFormField` | Text/password input fields |
| `.haapi-stepper-form-field-text-input` | `HaapiStepperTextFormField` | Text input fields |

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done ✅

@aleixsuau aleixsuau changed the base branch from feature/IS-11176/integrate-lwa-repo to integration/IS-5161/login-web-app March 31, 2026 12:30
@aleixsuau aleixsuau marked this pull request as ready for review March 31, 2026 12:40
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