Skip to content
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

Fix "change learning facility" workflow bugs #13122

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

marcellamaki
Copy link
Member

Summary

There were a few bugs in the change facility workflow, I think due to some lingering side effects of composition API updates and other tech debt 0.18 projects. This PR is mainly around syntax adjustment to account for that (the underlying logic is unchanged), and also makes use of an a prop in KTextbox to more clearly surface password errors to the user.

References

Fixes #13097

Reviewer guidance

  1. Set up an account as an on-my-own user (User A) on your Kolibri (Kolibri 1)
  2. Run a second kolibri (Kolibri 2)
  3. on the User A profile, go to "change facility" and begin the workflow to create or merge accounts using a facility that exists on Kolibri 2
  4. Try first with entering an incorrect password, and ensure the error message is highlighted, before proceeding

You should be able to successfully create or merge accounts

change-facility.mov

@github-actions github-actions bot added APP: User Re: User app (sign-in, sign-up, user profile, etc.) DEV: frontend labels Feb 26, 2025
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

One thing that seems to be required by the vuejs documentation.

},
role() {
return this.state.value.role;
Copy link
Member

Choose a reason for hiding this comment

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

Also perhaps a sign that we should do more targeted provide/inject than a monolithic state object.

@@ -99,6 +100,7 @@

const isFormSubmitted = ref(false);
const isPasswordInvalid = ref(false);
const passwordTextbox = ref(null);
Copy link
Member

Choose a reason for hiding this comment

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

Dear god, I hadn't come across the Vue composition API syntax for template refs before, this is truly horrendous.

Noting that you have skipped one piece of guidance from the documentation:

https://vuejs.org/guide/essentials/template-refs

Prior to 3.5 you should return the ref from the setup function also.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, thanks! I'll update

…r and ensure password input errors always display, even if user is not clicking into the form field
@marcellamaki marcellamaki force-pushed the change-learning-facility-continue-button branch from 51b882f to 7c57e71 Compare February 26, 2025 16:41
@rtibbles rtibbles dismissed their stale review February 26, 2025 17:05

No blockers from the code side.

@radinamatic
Copy link
Member

Still not able to change facility using the assets from this PR... 😕
Kolibri server is on Ubuntu, APK installed on Android 12 phone:

On LoD, after I set up the password required on the class facility, the screen returns to the previous step (after selecting the facility), and it seems to be in the loop there. Also note the missing (empty quotes) facility and learner names, and the scrolling needed to get to the 'Continue' button.

change-facility.mp4

@radinamatic
Copy link
Member

Same experience if LoD is set up on a Windows device, a 400 error in there...

Home folder from the LoD: .kolibri.zip

change-facility-windows.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: User Re: User app (sign-in, sign-up, user profile, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants