kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Facility Import Admin Credentials Modal - [Enter] does not submit form

Open nucleogenesis opened this issue 2 years ago • 2 comments

Observed behavior

When importing a Facility as a Super Admin, I select the Facility that I want to import. I am asked to enter admin credentials (for the server to be imported). When I finish entering my password and hit [Enter] nothing happens. I must tab two more times to the "Continue" button to submit the form.

Expected behavior

A form should be submitted, if able, when the user hits [Enter]. If the user cannot submit the form, then they should be notified of the errors preventing submission.

User-facing consequences

Confusing UI

Steps to reproduce

Import a Facility as Super Admin.

Context

develop Linux Chromium

nucleogenesis avatar May 11 '23 21:05 nucleogenesis

Hi @nucleogenesis , Had you used the tab key as well to enter the password and username? I have tried entering the username and password without tabbing and clicking out of the input fields and pressing Enter key the continue button seems to work. However , I realized that this happens when you are still on the password input, which requires pressing the tab key twice to reach the continue button. I do not think skipping the tab order would be a good approach ?

AllanOXDi avatar May 16 '23 18:05 AllanOXDi

@AllanOXDi Whenever you're in a form and hit Enter I believe the expectation is that we submit that form - @jtamiace @radinamatic is this correct generally?

The user shouldn't have to tab to the Submit/Continue button ya?

nucleogenesis avatar May 17 '23 01:05 nucleogenesis

Hey @nucleogenesis @MisRob , I’m interested in working on this issue and would appreciate it if you could assign it to me. Additionally, could you please guide me on how to reproduce the issue?

shruti862 avatar Jan 16 '25 13:01 shruti862

Hey @shruti862! Thanks for your interest in contributing to LE! I will assign you this issue.

To reproduce this issue, you can run another Kolibri server (guides here), and set up a new facility there. Then in your dev server, you can import that facility like this. The modal this issue is talking about is this one (you can find how to get to it in the previous docs):

Image

AlexVelezLl avatar Jan 17 '25 15:01 AlexVelezLl

Hey @AlexVelezLl, just a quick update—I was able to reproduce the issue locally. It seems that pressing Enter while still in the input field does not submit the form, but clicking outside the field and then pressing Enter does trigger submission. I haven’t yet identified the cause in the code, but I’ll be investigating further. Any insights in the meantime would be greatly appreciated. Thanks!

shruti862 avatar Jan 20 '25 13:01 shruti862

Thanks @shruti862, yest it'd be great if you could investigate further. Good to hear you were able to reproduce it!

MisRob avatar Jan 21 '25 15:01 MisRob

@shruti862 I don't know if this issue is coming from KDS or Kolibri, but here's related KDS components

  • https://github.com/learningequality/kolibri-design-system/blob/develop/lib/KModal.vue
  • https://github.com/learningequality/kolibri-design-system/tree/develop/lib/KTextbox

One thing to try out would be if it's a general issue that happens any time KTextbox is used within KModal. Then this fix would need to be done in the KDS repository. You could easily try out this on the KDS dev playground

MisRob avatar Jan 21 '25 15:01 MisRob

@MisRob Thanks for the suggestions and references! :)

shruti862 avatar Jan 21 '25 18:01 shruti862

Hey @MisRob, I tested the issue by using KTextBox within KModal in the playground, and it appears to be a general issue. Could you please guide me on the next steps to resolve this?

https://github.com/user-attachments/assets/bb65d0e7-71cd-4607-8fb4-5ba74be07413

shruti862 avatar Feb 15 '25 18:02 shruti862

Hi @shruti862, thanks for confirming. The next step would be to fix this in the KDS repository.

MisRob avatar Feb 17 '25 03:02 MisRob

Hey @MisRob , just wanted to know do I need to modify the KTextbox Or KModal components in KDS repo to resolve this issue?

shruti862 avatar Feb 17 '25 05:02 shruti862

I don't know - I think we will understand it better after you have located the exact source of the issue @shruti862. You can mention it in the comments as soon as you found it or feel free to suggest some options to resolve it as well.

MisRob avatar Feb 17 '25 06:02 MisRob

Hey @MisRob @AlexVelezLl , I have opened a PR for this issue ,please have a look whenever you get time :)

shruti862 avatar Feb 18 '25 17:02 shruti862

Wonderful, thank you @shruti862

MisRob avatar Feb 24 '25 03:02 MisRob

@shruti862 by any chance have you noticed if this is an issue in other Kolibri forms?

MisRob avatar Feb 24 '25 03:02 MisRob

Closed by https://github.com/learningequality/kolibri/pull/13090

MisRob avatar Feb 24 '25 03:02 MisRob

Hey @MisRob , I haven’t checked other Kolibri forms for this issue yet, but I’ll look into it and update you soon!

shruti862 avatar Feb 24 '25 04:02 shruti862

Hey @MisRob , all the other kolibri forms are working as expected :)

shruti862 avatar Feb 24 '25 06:02 shruti862

@shruti862 Good news! We just need to be careful to not forget to add handlers in the future forms it seems. Thanks a lot for the fix.

MisRob avatar Feb 24 '25 07:02 MisRob