Skip to content

Change password form in Settings - Account #5089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Jakoma02
Copy link
Contributor

@Jakoma02 Jakoma02 commented Jun 6, 2025

The "Change password" form was updated to use KDS components instead of Vuetify components. The PasswordField component was replaced with KTextBox, and VForm was replaced with a form. Validation was implemented using formMixin. The tests were modified to pass with the new validation interface, and a new test case was added to improve clarity (the previous description of the test said that it tested if the validation failed when the passwords did not match, but in fact, it failed because the password was too short).

I tested the changes by interacting with the form in a browser and checking the validation behavior in various scenarios, with the interface set to both LTR and RTL languages. I also tested the mobile experience by using the "Toggle device" developer feature in Chromium.

Screenshot with validation passed
Screenshot with validation failed
Screenshot with RTL language
Screenshot of phone layout

References

Solves #5061.

Reviewer guidance

The behavior of the old and new forms differs in several aspects outlined below. The differences stem from technical differences between the two approaches. Special care should probably be taken to ensure that the new behavior is expected and acceptable.

  • When a text field is edited to have invalid content, the validation error immediately appears. In contrast, in the original form, validation errors are not displayed when the text field has focus, and are only shown when it stops being focused. The new behavior matches the behavior of other forms that are already using KDS (e.g., the Request more space form). If the original behavior is desired, KTextbox should probably be changed to reflect this expectation.

  • When the new password is cleared to be an empty string, the validation error "Password should be at least 8 characters long" is displayed. In contrast, in the original form, the validation error "This field is required" is displayed. This is caused by formMixin only returning the binary result of the validation instead of the error message. If this is undesirable, formMixin should probably be refactored to be slightly more versatile in returning more than two validation results.

  • When both the new password and confirmation fields are edited and then cleared, the confirmation field shows no validation error. In contrast, in the original form, the validation error "This field is required" is displayed for the confirmation field. This is caused by the required property being ignored by formMixin when a custom validator is also specified, and is connected to the previous point.

@AlexVelezLl
Copy link
Member

Hey @Jakoma02! Thanks for this! We will get this reviewed soon 🤗. Just a little correction, this will close #5061 and not #5062, so if you can update the PR description, that would be great 😅. Thanks!

@Jakoma02
Copy link
Contributor Author

Jakoma02 commented Jun 7, 2025

You are of course correct, I got confused by the similar-looking issue names 😅 I fixed the mistake.

Copy link
Member

@MisRob MisRob left a comment

Choose a reason for hiding this comment

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

Ahoj Jakube, Kubo, hi Jakub 🙂!

This is very well done - thanks a lot for following all the guidance, and also for taking time to examine and describe the differences you observed in such a detail. Much appreciated.

I would say that experience is better now because for example we can see "Password should be at least 8 characters long" until it's really fixed 👍 But leaving my opinions aside, most importantly, as you too noted, this is aligned precisely with how KDS and similar forms work in both Kolibri and Studio, so it's okay.

I've too tested in my local Studio and haven't observed any issues. Code makes sense. Just left one minor note for tests, but it's not blocking.

@MisRob MisRob self-assigned this Jun 9, 2025
@MisRob MisRob linked an issue Jun 16, 2025 that may be closed by this pull request
11 tasks
Remove dependencies on internal implementation.
@MisRob MisRob self-requested a review June 23, 2025 06:26
Copy link
Member

@MisRob MisRob left a comment

Choose a reason for hiding this comment

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

Thanks a lot @Jakoma02, very nice contribution.

@MisRob MisRob merged commit 2b9e620 into learningequality:unstable Jun 23, 2025
13 checks passed
@Jakoma02
Copy link
Contributor Author

Jakoma02 commented Jul 1, 2025

Ahoj Míšo! 🙂 🇨🇿

Thank you for the kind feedback and for cleaning up the tests. I am looking forward to collaborating in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Remove Vuetify from Studio] Change password form in Settings - Account
3 participants