-
Notifications
You must be signed in to change notification settings - Fork 730
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
Update device settings page to better handle server reload and force page refresh for settings changes #11403
Update device settings page to better handle server reload and force page refresh for settings changes #11403
Conversation
Remove unspecced browser URL based limitations.
…hile device is restarting.
…vice settings are reloaded.
Build Artifacts
|
Tested on Ubuntu 20.04:
Agreed on removing the snackbar notification that the settings have been updated when no changes were made. On another hand, snackbar notification is not appearing when other changes are made (like for External devices or Default landing page).
Will do the test on Android next. |
I did not see snackbar notifications for these 2 options on Ubuntu, but I do see a brief flash of them on Android, too brief to actually be readable... 🤔 Implemented fixes are working on Android too otherwise, My downloads option appears in the menu after the reload. 👍🏽 |
Interesting - I don't think anything I did would have caused that, but I'll fix it anyway, along with not showing the notification when no changes have actually been made. |
I think that should be addressed in ongoing Bottom Bar vs Bottom Navigation Bar discussions/fixes that @marcellamaki is doing in collaboration with @jtamiace |
I am seeing these - so I think it may just be a case of the refresh happening too fast before the snackbar appears. |
One thing I noticed is that whenever I add a new storage location and save it, after the device restarts, the new storage location is shown. But if I navigate away from the page and go back, the storage location is no longer there. I did not press the save changes button in the video but I do want to note that this happens even if that button is pressed after adding a new storage location. devicesettings.mov |
…en changed and delay refresh until snackbar has displayed.
OK, behaviour should be updated now to make the snackbar work as expected, to prevent the issues that @LianaHarris360 reported which were caused by the cache object not being up to date. |
Now we are talking, snackbars visible (and long enough to be read) on each settings change (and not appearing when no changes were made), prior to page reload. 👍🏽 Actually the latter could also be avoided by making the Save changes button disabled until there is an actual change in a setting 😉 Issue noted by @LianaHarris360 also confirmed as fixed. Would it be possible to sneak in one more change, I'm guessing it's not a big push: when disabling/enabling pages the same message appears in the modal after unchecking and checking. Maybe when the user is re-enabling (checking) we could skip the first phrase: check-uncheck.mp4 |
This would require a bit more of a rework than first appears, because we'd have to have the conditional for when plugins are disabled, plugins are enabled, and when plugins are being both enabled and disabled. I also think the text is insufficient if we just remove the uncheck warning, and the unused string that is available is too verbose. I think let's file a follow up issue for this instead. |
Agreed that it is not ideal, just enough for a temporary change that does not require a new string. All is good with this PR then, I'll open the issue for follow-up! 💯 |
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 passes, good to go! 💯 🎉
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.
Code read through makes sense to me. Thanks @LianaHarris360 and @radinamatic for the reviews! Since manual QA passes, I think we can go ahead and merge this.
994fc31
into
learningequality:release-v0.16.x
Summary
References
Fixes #11400
Reviewer guidance
Go to the device settings page.
Press the save button, see that nothing happens (except a pop up - maybe we should stop that too?)
Make a change to the settings that doesn't require a restart - see that the page refreshes after.
Make a change to the settings that does require a restart - see that a modal displays while the restart is happening, and that the page refreshes after.
Screencast.from.10-12-2023.04.08.02.PM.webm
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)