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: fix space time chart when first or last waypoint are hidden #9513

Conversation

SharglutDev
Copy link
Contributor

@SharglutDev SharglutDev commented Oct 29, 2024

Filter data from projected path (path and occupancy blocks) and conflicts when the first or last waypoint is hidden. Allow the space time chart to look as if it started/ended with the first/last displayed waypoint.

part of #8628 (see last comment of the issue)

before :
Capture d’écran 2024-10-29 à 16 46 57

after :
Capture d’écran 2024-10-29 à 16 46 24

To test :

  • Add at least 2 trains with only 1min difference for departure time
  • With the waypoints panel, hide the first x waypoints and/or the last x waypoints

@SharglutDev SharglutDev requested a review from a team as a code owner October 29, 2024 15:42
@SharglutDev SharglutDev self-assigned this Oct 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2024

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

Codecov Report

Attention: Patch coverage is 17.59259% with 89 lines in your changes missing coverage. Please review.

Project coverage is 41.81%. Comparing base (0e1ea9b) to head (6954523).
Report is 14 commits behind head on dev.

Files with missing lines Patch % Lines
...WithSpaceTimeChart/ManchetteWithSpaceTimeChart.tsx 0.00% 81 Missing and 1 partial ⚠️
...nResult/components/SpaceTimeChart/helpers/utils.ts 73.07% 0 Missing and 7 partials ⚠️

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

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #9513      +/-   ##
============================================
- Coverage     42.51%   41.81%   -0.70%     
  Complexity     2271     2271              
============================================
  Files          1311     1281      -30     
  Lines        105413   103982    -1431     
  Branches       3297     3304       +7     
============================================
- Hits          44812    43476    -1336     
+ Misses        58655    58553     -102     
- Partials       1946     1953       +7     
Flag Coverage Δ
core 75.05% <ø> (ø)
editoast 73.65% <ø> (-0.05%) ⬇️
front 18.79% <17.59%> (+<0.01%) ⬆️
gateway 2.18% <ø> (-0.02%) ⬇️
osrdyne 3.28% <ø> (ø)
railjson_generator ?
tests 86.74% <ø> (ø)

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 requested a review from Tguisnet October 29, 2024 15:50
@SharglutDev SharglutDev force-pushed the pfn/front/fix-spacetimechart-when-first-or-last-waypoint-hidden branch from 5894323 to f084b1d Compare October 29, 2024 15:51
Copy link
Contributor

@Uriel-Sautron Uriel-Sautron left a comment

Choose a reason for hiding this comment

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

Tested, thank you

@SharglutDev SharglutDev force-pushed the pfn/front/fix-spacetimechart-when-first-or-last-waypoint-hidden branch from f084b1d to b984f62 Compare October 31, 2024 14:44
@SharglutDev SharglutDev force-pushed the pfn/front/fix-spacetimechart-when-first-or-last-waypoint-hidden branch from 8ebc8c2 to 2ac3edb Compare November 6, 2024 08:45
@emersion
Copy link
Member

emersion commented Nov 6, 2024

Sorry for the duplicate comments. It seems @clarani and I ended up reviewing in parallel without noticing.

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, tested ✅

Filter data from projected path (path and occupancy blocks) and conflicts when the first or last waypoint is hidden.
Allow the space time chart to look as if it started/ended with the first/last displayed waypoint.

Signed-off-by: SharglutDev <[email protected]>
@SharglutDev SharglutDev force-pushed the pfn/front/fix-spacetimechart-when-first-or-last-waypoint-hidden branch from 127a1bf to 6954523 Compare November 7, 2024 13:26
@SharglutDev SharglutDev enabled auto-merge November 7, 2024 13:31
@SharglutDev SharglutDev added this pull request to the merge queue Nov 7, 2024
Merged via the queue into dev with commit cd4cdfb Nov 7, 2024
24 checks passed
@SharglutDev SharglutDev deleted the pfn/front/fix-spacetimechart-when-first-or-last-waypoint-hidden branch November 7, 2024 14:49
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.

5 participants