learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
811 stars 684 forks source link

Quiz creation side panels improvements #12819

Open nucleogenesis opened 1 week ago

nucleogenesis commented 1 week ago

Summary

https://github.com/user-attachments/assets/47463a48-62f0-48d6-ac04-4d5455315b28

When working on quiz creation I created a SectionSidePanel component to kind of wrap around all of the various side-panel kinds but realized a bit too late on that it wasn't really necessary and added some unnecessary complexity.

This instead begins organizing the code so that each of the child routes' components for the side panels are wrapped in the SidePanelModal component which results in them being rendered into the <router-view/> in the quiz creation root route.

Some motivations for this were:

Reviewer guidance

QA

Code review


Testing checklist

PR process

Reviewer checklist

github-actions[bot] commented 1 week ago

Build Artifacts

Asset type Download link
PEX file kolibri-0.18.0.dev0_git.20241120235751.pex
Windows Installer (EXE) kolibri-0.18.0.dev0+git.20241120235751-windows-setup-unsigned.exe
Debian Package kolibri_0.18.0.dev0+git.20241120235751-0ubuntu1_all.deb
Mac Installer (DMG) kolibri-0.18.0.dev0+git.20241120235751.dmg
Android Package (APK) kolibri-0.18.0.dev0+git.20241120235751-0.1.4-debug.apk
TAR file kolibri-0.18.0.dev0+git.20241120235751.tar.gz
WHL file kolibri-0.18.0.dev0+git.20241120235751-py2.py3-none-any.whl
pcenov commented 1 week ago

Hi @nucleogenesis,

Here's a list with the regressions I was able to spot:

https://github.com/user-attachments/assets/098020c3-a2db-4fce-bfe1-0462b1858023

https://github.com/user-attachments/assets/beca343a-d2e9-4d93-9cdd-73cc619cf974

space

https://github.com/user-attachments/assets/07ee1bb5-72c5-488d-82af-a9e61a888455

https://github.com/user-attachments/assets/645cf504-a628-4aca-8b01-7e34e868e903

https://github.com/user-attachments/assets/ed71c42a-d917-46ca-92bb-591d70f15bf7

https://github.com/user-attachments/assets/94189e55-603d-4c1b-b181-6d9a31f027f1

are u sure

delete

https://github.com/user-attachments/assets/3c0589a9-742e-4e6a-8bf2-24584f166c5c

nucleogenesis commented 1 week ago

@AlexVelezLl @pcenov I have updated the PR and addressed the feedback.

Edit section - Changes made to the section title and description are being saved without having clicked the Apply settings button:

This is intentional - when you click "Add questions" we decided to skip confirming "Are you sure?" and just auto-save the user's changes when they go to add questions



Here is an example of the navigation - I have made changes such that the Back arrow shows AND the Close icon shows in the context of going "Section editor -> Add questions" - so the user can always close out from there but if they use the back arrow, they'll eventually go back to the "Section editor" from the "Add questions" (with the confirmation modal if they've made changes, but no confirmation modal if they have not).

https://github.com/user-attachments/assets/68f42105-33ac-42c1-bc4d-48f42e07bef3


I made a change that seems to avoid the "redundant navigation" error. However, I have been able to successfully select any section:

https://github.com/user-attachments/assets/525bdcd8-80a0-4965-891f-2087147e8845

pcenov commented 4 days ago

Hi @nucleogenesis - it seems that there are some conflicts that must be resolved and there are no new build assets for me to test at this point, so could you take a look?

pcenov commented 1 day ago

Hi @nucleogenesis, looks much better already!

The following issues are still not fixed or partially fixed:

https://github.com/user-attachments/assets/45db9b5f-6dd5-4bfb-90a9-bd165544a2a0

scroll

https://github.com/user-attachments/assets/40242bd7-2b59-445b-8cec-80b297641a35

Edit section - Changes made to the section title and description are being saved without having clicked the Apply settings button:

This is intentional - when you click "Add questions" we decided to skip confirming "Are you sure?" and just auto-save the user's changes when they go to add questions

I believe that it would be fine to skip the confirmation only if the user has actually added new questions. But if the user has clicked on "Add questions" and then went back to "Section settings" without having added any new questions or clicked the "Apply settings" button, then it's not ok to auto-save as it's not consistent with the scenario where one goes to "Section settings" makes some changes, hits the close icon and sees the "Are you sure" modal:

https://github.com/user-attachments/assets/e04d98c4-43f2-4388-8f8f-cb6aa66ad99f

  • Notably - "Section Editor <Click 'Add Questions'> -> Resource Selection" - make a change to your selection, then hit the browser back button until you get the "Are you sure" modal -- note that when you confirm it, you are returned correctly to the "Section Editor" side panel. However, had you clicked the "X" to close it, then you'd just go straight to the root page.

When following your guidance for this scenario I am always going back to the root page, and not to the "Section settings" side panel:

https://github.com/user-attachments/assets/90040059-6abb-4194-9f26-77433893aa58