XKit Preferences: Improve error UI #2177
Open
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.
This improves the UI shown in the XKit preference pane when there is an error accessing a script's data. Specifically, it fixes the title being "undefined" in certain circumstances, removes a backdrop element that made the text basically unreadable, and adds a button to force update extensions to fix the problem.
This is generally hard to encounter in practice (for this screenshot I ran
browser.storage.local.remove('extension_old_blue')
using Chrome's console's ability to run arbitrary code in the content script sandbox, which is very convenient). But it's an edge case that will come up if in a future version we execute scripts directly out of the extension package and don't save them to storage, but a user downgrades back to the current or a prior version... or, naturally, if you are a developer and are switching back and forth between branches that do and do not do this.This should be copied into the 7.9.2 branch as well (note: copy the whole xkit_preferences.js and xkit_preferences.css files rather than cherry picking).