-
Notifications
You must be signed in to change notification settings - Fork 691
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
Remove special casing logic for post-facility import from the "Select a source" modal to avoid weird edge cases #10959
Comments
I investigated more closely and as mentioned above, the main cause is that
In kolibri/kolibri/core/auth/api.py Lines 581 to 595 in a17b2ac
Note Looking at In [2]: from morango.models import TransferSession
In [3]: TransferSession.objects.all().values_list("push", "active", "transfer_stage", "transfer_stage_status", "filter")
Out[3]: <QuerySet [(False, False, 'cleanup', 'completed', '68b2f1544747e33dd3301f25b7ae62a2')]> it can be seen that
|
At some point (I think since this was implemented, as it was done quite a few years ago) we stopped pushing in the import flow, as it was unnecessary - this can be seen here in the peer import task: https://github.com/learningequality/kolibri/blob/develop/kolibri/core/auth/tasks.py#L384 So, I don't think this is a reliable way of telling if a facility has just been imported or not. I can't think off the top of my head a way to actually tell this, so maybe the best thing to do here is to not treat the import case specially, and just let it follow the usual import flow? @jtamiace any recollection of why we were so keen to show peers that had the same facility to import resources from? |
It is believed that this caused this bug hunt issue we experienced, where the frontend was repeatedly calling the API to get the facilities. At most that should happen once, but for a channel import it doesn't seem necessary. If we want to keep the functionality of filtering the devices to only those with the same facility, for the post-setup use case, we'll need to compose new vue composables to combine the use cases and allow the behavior mentioned above. |
Hi @radinamatic and @marcellamaki, some testing observations:
2024-03-14_14-47-28.mp4Also looking at https://www.figma.com/file/MpCG7r5PULOCJsEvnTSti8/Android-Designs-2022?type=design&node-id=0-1&mode=design I am not seeing any mention of the 'Select a source' modal so it should be further clarified what exactly is the expected behavior in Kolibri 0.16. Let me know if you need something else investigated here. |
Thank you @pcenov ! I'm fairly sure that at some point we did have that feature in 0.15 (hence the Gherkin scenario that inspired the OP). But giving the option to immediately import required resources after importing the facility was imperative in 0.15, and is not a concern anymore in 0.16 with automatic content syncing. @marcellamaki I suggest we close this issue as |
Fixed in #12077 |
Observed behavior
Select a source modal is not displayed on the Device Channels page after importing a facility in the setup wizard
Expected behavior
Select a source modal
is displayed after importing a facility in the setup wizard as described in this Gherkin scenario:
User-facing consequences
UX is not as streamlined as intended. It's still possible to import content by using Import button on the Device Channels page though.
Steps to reproduce
Context
Kolibri 0.16.0a19.dev0+git.12.gb3be1335
Comments
This issue might be related to
kolibri/kolibri/plugins/device/assets/src/views/PostSetupModalGroup.vue
Lines 64 to 74 in b3be133
I noticed that even though I imported a facility in the setup wizard, in this place
facility.last_successful_sync
wasnull
, and thereforeimportedFacility
computed returnednull
which caused other parts of the code to wrongly assume non-imported facility context.The text was updated successfully, but these errors were encountered: