Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak error messages and upload your own behavior. #3625

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

rebeccacremona
Copy link
Contributor

In this PR, I'm doing three uncontroversial things, and one potentially controversial one.

Uncontroversial

  1. 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!

  2. 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.

image

  1. I realized that I was wrong last week, when I said that the option to upload your own should not appear when you enter an invalid URL. That is in fact not correct: many valid URLs, like https://afdc.energy.gov/stations#/analyze?country=US&region=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:

image
image
image
image

@rebeccacremona
Copy link
Contributor Author

(I also think it is a goofy we have two versions, a bunch that start with "We're unable to create your Perma Link" and a bunch that start with "Perma can't create this link." I am tempted to fix that up too... but am not sure.)

Copy link

codecov bot commented Oct 18, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.73%. Comparing base (cfda8c3) to head (8dc5720).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
perma_web/api/serializers.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3625   +/-   ##
========================================
  Coverage    69.73%   69.73%           
========================================
  Files           54       54           
  Lines         7326     7326           
========================================
  Hits          5109     5109           
  Misses        2217     2217           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant