osrd icon indicating copy to clipboard operation
osrd copied to clipboard

front: manage error lifecycle on editor's form

Open sim51 opened this issue 1 year ago • 1 comments

Fix #7446

When the initialEntity ref changes in the editor context, we remount the form to reset its state (mainly its isSubmitted state). It avoids top errors to be displayed when they should not.

sim51 avatar Jul 02 '24 13:07 sim51

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 28.48%. Comparing base (c6498a4) to head (5124463). Report is 15 commits behind head on dev.

Files Patch % Lines
.../trackEdition/components/TrackEditionLeftPanel.tsx 0.00% 11 Missing and 1 partial :warning:
.../pointEdition/components/PointEditionLeftPanel.tsx 0.00% 11 Missing :warning:
...cations/editor/tools/pointEdition/tool-factory.tsx 0.00% 4 Missing :warning:
.../src/applications/editor/components/EditorForm.tsx 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #7921      +/-   ##
============================================
- Coverage     28.54%   28.48%   -0.07%     
  Complexity     2059     2059              
============================================
  Files          1249     1254       +5     
  Lines        154182   154493     +311     
  Branches       3036     3047      +11     
============================================
- Hits          44007    44001       -6     
- Misses       108365   108677     +312     
- Partials       1810     1815       +5     
Flag Coverage Δ
core 75.00% <ø> (+0.04%) :arrow_up:
editoast 71.65% <ø> (-0.03%) :arrow_down:
front 9.97% <0.00%> (-0.03%) :arrow_down:
gateway 2.34% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 72.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

codecov-commenter avatar Jul 02 '24 13:07 codecov-commenter