-
Notifications
You must be signed in to change notification settings - Fork 711
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
Device settings updates #9833
Device settings updates #9833
Conversation
…s updated in server restart function
d3913fd
to
72a00a3
Compare
ccf9f6d
to
05fb708
Compare
Hi @jredrejo I tested the above described implementation and overall it's looking great. As suggested by you I was able to verify that no changes made through the UI are saved as this requires backend changes. However as pointed out by you, adding other storage locations is possible because these are saved in the options.ini file. I also checked the auto-download and download on metered connections values in the DB and once they are modified there, they are displayed correctly in the UI. Here are some minor issues I was able to identify (which I can report separately if you think are not in scope):
|
Hi @pcenov thank you for pointing these out. I am taking a look at what needs to be changed and then I will make those updates. |
@pcenov these are the current updated and fixed issues. The page moving up due to clicking the 'Options' drop-down is still being investigated. |
Hi @LianaHarris360, I can see now that initially the Change option is disabled + the displaced 0 value is displayed correctly - excellent!
2022-11-22_15-03-10.mp4So it should be further discussed what exactly is the expected behavior in that case.
2022-11-22_15-11-24.mp4I also noticed the following issue which I have missed in the first round of testing (cc @jredrejo):
|
A solution could be to validate the storage location paths to catch any that slipped through as empty strings. (@jredrejo) |
hello @pcenov I have seen this happens if the option has not any value assigned in the options.ini file. For some reason kolibri returns [ "" ] instead of [ ]. It should be fixed now |
d644571
to
b4dbede
Compare
Thanks @LianaHarris360 and @jredrejo the issue with the empty value is fixed now. @jredrejo a question for you - currently when I select the option 'Add storage location' and I check the checkbox 'Make this the primary storage location' it doesn't actually make it the primary storage location, rather after the restart of the server the location is displayed under 'Other storage location'. Is this supposed to be functional in the current build or is a pending back end task? 2022-11-23_14-37-31.mp4 |
Hi @jredrejo @LianaHarris360 - the latest reported issue here about the storage location is working correctly now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manual QA by @pcenov passed! 👏🏽 💯
One follow-up issue remains to be solved for Windows
@jredrejo @LianaHarris360 - thanks for your work on this! The code is really readable and easy to follow, and I don't have any questions in that regard. 🎉 One thing I ran into when testing was adding a storage location. I tested:
When I do this, the kolibri server stops and restarts (and all of the modal explaining this work as expected), but kolibri doesn't successfully reconnect to the server. Here is what appears in my terminal - it seems to just stall out after that last log - nothing else prints or reloads, no matter how long I wait. Is this because I'm running it on a devserver? Wondering if @pcenov experienced the same thing. (cc @radinamatic) |
Hi @marcellamaki - I'm not able to replicate the issue you've experienced in Ubuntu - the server gets restarted successfully. I have previously reported a similar issue for Windows though. |
Thanks, @pcenov! I'll go ahead with merging this, and can file a separate follow up issue as needed |
Summary
Implementation of the new device settings UI, according to the design specs
References
Closes: #9779, #9780, #9781
Reviewer guidance
This PR implements the needed model design changes in the backend and the frontend to modify them, but it does not act in the backend to change the behaviour of kolibri as stated in the Out of scope section of #9779
However, in the case of altering the storage locations, it does change the behaviour of kolibri as the model is set to use the
options.ini
file as single source of truth. Changes for these settings are not stored in the database (they are done using a normal Django model and drf serialization but the state is saved in this file).So, to after testing the UI does not have any glitches. When the new settings are modified and saved, they must appear in:
extra_settings
field of thedevice_devicesettings
tableoptions.ini
file (also, when changing this file, kolibri will restart automatically)Testing checklist
PR process
Reviewer checklist
yarn
andpip
)