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

Fix: error message for non-recognized points in pathfinding #9568

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

achrafmohye
Copy link
Contributor

@achrafmohye achrafmohye commented Nov 5, 2024

Closes #9520

@achrafmohye achrafmohye requested a review from Caracol3 November 5, 2024 10:15
@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2024

⚠️ 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 11 lines in your changes missing coverage. Please review.

Project coverage is 42.49%. Comparing base (c3d0409) to head (21f2679).
Report is 47 commits behind head on dev.

Files with missing lines Patch % Lines
...pathfinding/components/Pathfinding/Pathfinding.tsx 0.00% 10 Missing ⚠️
...nt/src/modules/pathfinding/hooks/usePathfinding.ts 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #9568      +/-   ##
============================================
+ Coverage     39.52%   42.49%   +2.96%     
- Complexity     2270     2271       +1     
============================================
  Files          1309     1311       +2     
  Lines        100242   105431    +5189     
  Branches       3295     3297       +2     
============================================
+ Hits          39618    44800    +5182     
- Misses        58679    58685       +6     
- Partials       1945     1946       +1     
Flag Coverage Δ
core 75.05% <ø> (-0.02%) ⬇️
editoast 73.65% <ø> (+0.08%) ⬆️
front 18.79% <0.00%> (+8.68%) ⬆️
gateway 2.18% <ø> (-0.02%) ⬇️
osrdyne 3.28% <ø> (+<0.01%) ⬆️
railjson_generator 87.49% <ø> (ø)
tests 86.74% <ø> (+0.03%) ⬆️

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

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

@Caracol3
Copy link
Contributor

Caracol3 commented Nov 6, 2024

We now lose the markers and the path on the map. I think we should keep this behavior.

@Caracol3
Copy link
Contributor

Caracol3 commented Nov 6, 2024

It works fine for the vias but when just the origin or the destination is invalid we still have the old message of success.
image

@achrafmohye achrafmohye force-pushed the ame/fix-non-recognized-points-behavior branch from aa70d66 to 1badc43 Compare November 6, 2024 13:24
@achrafmohye achrafmohye force-pushed the ame/fix-non-recognized-points-behavior branch from 1badc43 to 4f3239c Compare November 6, 2024 16:44
@achrafmohye achrafmohye marked this pull request as ready for review November 6, 2024 16:44
@achrafmohye achrafmohye requested a review from a team as a code owner November 6, 2024 16:44
@achrafmohye achrafmohye force-pushed the ame/fix-non-recognized-points-behavior branch from 4f3239c to 9dbbe51 Compare November 7, 2024 09:00
@Caracol3 Caracol3 requested a review from clarani November 7, 2024 10:25
@Caracol3
Copy link
Contributor

Caracol3 commented Nov 7, 2024

When going in itinerary, markers aren't displayed in the map when orign or destination is invalid.
If we had this in usePathding :

  useEffect(() => {
    if (origin?.isInvalid || destination?.isInvalid) {
      pathfindingDispatch({
        type: 'PATHFINDING_PARAM_CHANGED',
        params: { origin, destination, rollingStock },
      });
    }
  }, [origin, destination]);

There is maybe a better way to do it but we have the markers in the map then.

@achrafmohye achrafmohye force-pushed the ame/fix-non-recognized-points-behavior branch from 9dbbe51 to 6c44680 Compare November 7, 2024 11:21
Copy link
Contributor

@Caracol3 Caracol3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm (tested)

@achrafmohye achrafmohye force-pushed the ame/fix-non-recognized-points-behavior branch 2 times, most recently from 9d3391f to 5288d66 Compare November 7, 2024 12:30
@achrafmohye achrafmohye force-pushed the ame/fix-non-recognized-points-behavior branch from 5288d66 to 5028bd0 Compare November 7, 2024 13:08
@achrafmohye achrafmohye force-pushed the ame/fix-non-recognized-points-behavior branch from 5028bd0 to 21f2679 Compare November 7, 2024 13:16
Copy link
Contributor

@clarani clarani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@achrafmohye achrafmohye added this pull request to the merge queue Nov 7, 2024
Merged via the queue into dev with commit dbf7342 Nov 7, 2024
24 checks passed
@achrafmohye achrafmohye deleted the ame/fix-non-recognized-points-behavior branch November 7, 2024 13:48
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.

Behavior for non-recognized points in the path is not uniform
4 participants