maproulette / maproulette3

MapRoulette, the micro-tasking tool for OpenStreetMap
https://maproulette.org
MIT License
128 stars 35 forks source link

Fix tag widget rendering bug #2420

Closed CollinBeczak closed 2 months ago

CollinBeczak commented 2 months ago

Resolves: https://github.com/maproulette/maproulette3/issues/1596

Also added some tests to the osm data fetching function after noticing some issues: Test results before change:

Screenshot 2024-08-30 at 2 52 00 PM

All tests pass after change:

Screenshot 2024-08-30 at 2 52 56 PM

Key take aways from the osm data fetching updates:

  1. Easier to read and understand as a new developer
  2. Less code for the same result
  3. Network error, and unfamiliar errors are now cause and thrown allowing for the widgets that use these functions not to completely break.
  4. Network error, and unfamiliar errors are now cause and thrown allowing for the widgets that use these functions not to completely break.
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 80.68182% with 17 lines in your changes missing coverage. Please review.

Project coverage is 23.70%. Comparing base (95dca9d) to head (8467e53). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.../components/Widgets/TagDiffWidget/TagDiffWidget.js 0.00% 6 Missing and 2 partials :warning:
src/interactions/Task/AsCooperativeWork.js 0.00% 6 Missing :warning:
...nents/TagDiffVisualization/TagDiffVisualization.js 0.00% 2 Missing :warning:
...components/HOCs/WithCurrentTask/WithCurrentTask.js 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2420 +/- ## ========================================== + Coverage 23.38% 23.70% +0.32% ========================================== Files 649 649 Lines 22514 22476 -38 Branches 6902 6911 +9 ========================================== + Hits 5264 5329 +65 + Misses 14425 14350 -75 + Partials 2825 2797 -28 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.