Implement error overlay #381
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.
Fixes mozilla/addons#9587
Add the error message display into the Addon component. (It looks like this when enabled):
This could be a separate component which is composed into Addon. I'm not sure if that's necessary in reality though it would be easy enough to move out.
To use this does mean that the Addon component itself will need to become aware of the install state and supply the error message and close action as required. It would be expected that the close action would clear the state back to unknown and thus close the error overlay.
This doesn't yet do any transitioning, we'd want to look at using this [1] for that, and that should be a separate PR.
@mstriemer I'm happy to hear your thoughts on moving this around as needed. The component logic is very simple so re-jigging it would be easy.
[1] https://facebook.github.io/react/docs/animation.html