Implementing my own plugin, I'm starting to find settings somewhat confusing - the UX is not intuitive.
The Settings modal dismisses when I click anywhere outside of it as
data-backdrop="static" is not used.
This means I can make changes, not hit the save button, and easily dismiss the modal without being reminded to save.
But if I do that, and go back to my settings, I'll see that any changes I've made are still there, so I guess it did save, right? There weren't any warnings about unsaved changes, and it all looks fine. I didn't need to press the Save button.
Except that, after your next restart, you'll find all of your settings reverted - because you didn't hit save.
It's also unclear when a settings change applies. Is it immediate? On Save? On restart?
While I build my plugin, I have no idea which behaviour I'm supposed to implement to conform with the above, or even if I should conform with this.
I think a sensible approach would be:
- Prevent the Settings modal from being dismissed unless it is an explicit dismiss (the Save button or Close button).
- Do not apply or save any settings until the Save button is used (this would solve some other problems around refreshing processes multiple times while the user edits multiple settings).
- Add a cancel button to explicitly allow the user to leave the settings modal and forget any changes they've just made
- Add a verification prompt on the close button when there are unsaved changes, and forget the changes if the user confirms.
- Add a bootstrap style alert to the top of the settings modal remind the user that they have unsaved changes.
What do you think?