Prevent saving feature settings during a sync. #2823
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
Prevents the saving of feature settings while a sync is in progress. Previously settings could be saved during a sync if a tab or window with the Features page was already open before starting a sync.
When the user attempts to save settings during a sync an error message is displayed with a link to view the sync status.
Closes #2795
Alternate Designs
Normally when opening the Features page during a sync the page is disabled with an overlay. One approach could have been to display this overlay after the error is returned.
The problem with displaying an overlay for an error is that there wouldn't a great place to display an error message explaining what had happened. Additionally, if a user had made settings changes that they may not want to have to redo they may prefer to just wait for the sync to finish before pressing Save again. Another way around that could've been to begin periodically checking for the sync progress so that the overlay could be hidden once it had completed, but that would require a lot more engineering for very little gain. However something like that approach might be worth considering if there's ever a UI overhaul of the Features page.
Verification Process
Checklist:
Changelog Entry
Fixed - An issue where feature settings could be saved during a sync.
Credits
Props @JakePT