cityofaustin / atd-vz-data

The technology that powers the City of Austin's Vision Zero program
https://visionzero.austin.gov/viewer/
11 stars 2 forks source link

[BUG] Crash coordinates render as NaN when they should be blank #1448

Closed mddilley closed 3 months ago

mddilley commented 3 months ago

Associated issues

Closes https://github.com/cityofaustin/atd-data-tech/issues/17104

This makes a few small bug fixes to the crash coordinates edit map. It:

Side note - i found an interesting gist about !! vs Boolean() here.

Testing

URL to test: https://deploy-preview-1448--atd-vze-staging.netlify.app/

Steps to test:

  1. Go to https://deploy-preview-1448--atd-vze-staging.netlify.app/#/crashes/11157589 to a crash without coordinates and no crash diagram
  2. See that the map card shows an alert and that the map is contained in the card body
  3. Also see that the map has height even though there is no crash diagram
  4. Click the Edit Coordinates button and see that the form shows None in both inputs
  5. Go to https://deploy-preview-1448--atd-vze-staging.netlify.app/#/crashes/19540057 to see a crash with coordinates
  6. Click the Edit Coordinates button and see that the form shows the coordinates of the crash
  7. Test updating and saving any crash besides the one above without coordinates to make sure it still works. Trying to keep the example above intact. 🙏

Ship list

mddilley commented 3 months ago

@roseeichelmann all good and thanks for testing! i'm merging so no more reviews needed. ✅ 🙏