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

front: add a modal to manage waypoints in manchette #8796

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

SharglutDev
Copy link
Contributor

@SharglutDev SharglutDev commented Sep 6, 2024

close #8627
close #8628

Warning

The shift + click doesn't work with firefox (OpenRailAssociation/osrd-ui#510)

Example of testing :

  • Add a scenario 1 with a train with path 1
  • Add a scenario 2 with a train with path 1 and others trains with different paths
  • Check that by default only the BV/00/'' and map click waypoints are displayed
  • Try to unselect all waypoints and see the warning message
  • Try to submit while there is the warning and see the animation (the modal shouldn't close)
  • Click on cancel and verify that the changes you did have not been saved and that manchette is unaltered
  • Try the shift + click selection (only on chrome for now) to select and unselect multiple waypoints
  • In scenario 2, path 1, hide waypoints in the middle of the path and see the changes in both manchette modes
  • Hide a bunch of waypoints starting from the origin included and see the changes in both manchette modes
  • When submitting the form, check that an item has been added to local storage
  • Go back to scenario 1 and verify that the manchette (from path 1) has not the changes from the same path of scenario 2
  • Try deleting the scenario having a saved manchette and verify that the item in local storage is removed
  • Repeat the operation with a study having a scenario having a saved manchette and same with a project

@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2024

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

Codecov Report

Attention: Patch coverage is 1.72911% with 341 lines in your changes missing coverage. Please review.

Project coverage is 39.28%. Comparing base (8a66782) to head (086e108).
Report is 21 commits behind head on dev.

Files with missing lines Patch % Lines
...esult/components/SpaceTimeChart/WaypointsPanel.tsx 0.00% 138 Missing and 1 partial ⚠️
.../applications/operationalStudies/views/Project.tsx 0.00% 34 Missing ⚠️
...TimeChart/useGetProjectedTrainOperationalPoints.ts 0.00% 25 Missing ⚠️
...dules/project/components/AddOrEditProjectModal.tsx 0.00% 24 Missing ⚠️
...WithSpaceTimeChart/ManchetteWithSpaceTimeChart.tsx 0.00% 23 Missing ⚠️
...ules/project/helpers/cleanLocalStorageByProject.ts 0.00% 20 Missing and 1 partial ⚠️
front/src/applications/operationalStudies/Home.tsx 0.00% 13 Missing ⚠️
...ons/operationalStudies/views/SimulationResults.tsx 0.00% 11 Missing ⚠️
...rc/applications/operationalStudies/views/Study.tsx 0.00% 11 Missing ⚠️
...c/modules/study/components/AddOrEditStudyModal.tsx 0.00% 10 Missing ⚠️
... and 6 more

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #8796      +/-   ##
============================================
+ Coverage     39.15%   39.28%   +0.13%     
- Complexity     2245     2267      +22     
============================================
  Files          1290     1304      +14     
  Lines         97316    98618    +1302     
  Branches       3280     3303      +23     
============================================
+ Hits          38100    38744     +644     
- Misses        57277    57920     +643     
- Partials       1939     1954      +15     
Flag Coverage Δ
core 74.97% <ø> (+0.03%) ⬆️
editoast 72.24% <ø> (-0.24%) ⬇️
front 10.34% <1.72%> (+0.01%) ⬆️
gateway 2.50% <ø> (ø)
osrdyne 3.52% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.71% <ø> (ø)

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.

@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch 8 times, most recently from f337268 to 9c45b12 Compare September 20, 2024 09:41
@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch from 9c45b12 to 8d1099d Compare October 1, 2024 11:32
Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

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

Tested, works well, left two comments

@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch 7 times, most recently from 2ff39a4 to 262af87 Compare October 8, 2024 17:28
@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch from 262af87 to 65f7fd5 Compare October 9, 2024 14:21
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Oct 10, 2024
@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch 3 times, most recently from 17c9033 to 3a8f5b6 Compare October 10, 2024 16:40
@SharglutDev SharglutDev marked this pull request as ready for review October 10, 2024 16:57
@SharglutDev SharglutDev requested a review from a team as a code owner October 10, 2024 16:57
@SharglutDev SharglutDev requested a review from Akctarus October 10, 2024 16:58
Copy link
Contributor

@Akctarus Akctarus left a comment

Choose a reason for hiding this comment

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

Tested, LGTM

@SharglutDev SharglutDev requested a review from clarani October 15, 2024 11:39
@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch 3 times, most recently from 7449215 to 31eca18 Compare October 15, 2024 16:59
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.

I can still find some "waypointsModal" in the code :) in translations and in ManchetteMenuButton :)

@SharglutDev SharglutDev requested a review from clarani October 17, 2024 13:07
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 ✅

@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch from ef98f2d to b792268 Compare October 17, 2024 15:28
@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch from b792268 to 07d0ea7 Compare October 17, 2024 15:32
Signed-off-by: SharglutDev <[email protected]>
For a brief moment, the computed scales passed to the space time chart can be an empty array.
Add a condition to be sure we render the chart only if there at least of scale.

Signed-off-by: SharglutDev <[email protected]>
@SharglutDev SharglutDev force-pushed the pfn/front/manchette/add-waypoints-modal branch from 07d0ea7 to 086e108 Compare October 17, 2024 15:36
@SharglutDev SharglutDev added this pull request to the merge queue Oct 17, 2024
Merged via the queue into dev with commit 08ee2c5 Oct 17, 2024
24 checks passed
@SharglutDev SharglutDev deleted the pfn/front/manchette/add-waypoints-modal branch October 17, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The waypoint multi-select modal is dynamic Add multi-select modal for waypoints in manchette
4 participants