Tweak error messages and upload your own behavior. #3625
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.
In this PR, I'm doing three uncontroversial things, and one potentially controversial one.
Uncontroversial
While doing QA of the new Vue dashboard, I noticed that some of our error messages are unnecessarily terse or are otherwise a little clumsy. I tweaked them to suit my personal sensibilities; please feel free to suggest alternatives!
I noticed that the upload-your-own form wasn't handling titles and descriptions correctly: they should always be optional, and you should get the chance to supply them both when uploading fresh, or when replacing a failed capture.
https://afdc.energy.gov/stations#/analyze?country=US®ion=US-VA&fuel=ELEC
, currently fail validation, and our users rely on this workaround. See LIL-836.Potentially controversial
This PR significantly improved error handling.
But, in the process, it switched to unstyled messages... which I personally am finding difficult to parse, because the messages are long.
Here, I tried reintroducing a little styling.
I can easily revert it, if we prefer the unstyled, one-line version.
Examples: