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 timestops margins #8077

Merged
merged 5 commits into from
Jul 18, 2024
Merged

Fix timestops margins #8077

merged 5 commits into from
Jul 18, 2024

Conversation

SharglutDev
Copy link
Contributor

See commits for details

close #8066
close #8067

@SharglutDev SharglutDev requested a review from a team as a code owner July 16, 2024 10:46
@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2024

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

Codecov Report

Attention: Patch coverage is 67.01031% with 32 lines in your changes missing coverage. Please review.

Project coverage is 28.05%. Comparing base (67d50c4) to head (bc52bb6).
Report is 1 commits behind head on dev.

Files Patch % Lines
...alStudies/hooks/useSetupItineraryForTrainUpdate.ts 0.00% 13 Missing ⚠️
...onents/ManageTrainSchedule/helpers/formatMargin.ts 0.00% 8 Missing ⚠️
front/src/modules/timesStops/TimesStops.tsx 0.00% 6 Missing ⚠️
...ont/src/modules/pathfinding/hook/usePathfinding.ts 0.00% 2 Missing ⚠️
tests/tests/test_stdcm.py 96.49% 2 Missing ⚠️
front/src/applications/stdcm/utils/createMargin.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    #8077      +/-   ##
============================================
- Coverage     28.06%   28.05%   -0.02%     
  Complexity     2081     2081              
============================================
  Files          1289     1289              
  Lines        157704   157713       +9     
  Branches       3116     3116              
============================================
- Hits          44265    44246      -19     
- Misses       111564   111592      +28     
  Partials       1875     1875              
Flag Coverage Δ
core 75.11% <ø> (ø)
editoast 70.74% <100.00%> (-0.05%) ⬇️
front 9.90% <6.25%> (-0.01%) ⬇️
gateway 2.34% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 73.18% <96.49%> (ø)

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.

@emersion
Copy link
Member

emersion commented Jul 16, 2024

Seems like there is a strange side-effect of this PR: when no margin is set, clicking on the margin cell for the origin in the table prefills with "none":

out

@emersion
Copy link
Member

Also, after saving a margin on the origin and re-editing the train, there is a "0%" one showing up on the destination:

out

@SharglutDev
Copy link
Contributor Author

Thank you for spotting these. Should be fixed.

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

LGTM!

editoast throws an error when setting a 0% margin on origin but this is being discussed separately.

@flomonster flomonster requested a review from a team as a code owner July 17, 2024 10:01
@flomonster flomonster changed the title Pfn/front/fix timestops margins Fix timestops margins Jul 17, 2024
@flomonster flomonster requested a review from a team as a code owner July 17, 2024 14:38
Copy link
Contributor

@shenriotpro shenriotpro left a comment

Choose a reason for hiding this comment

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

LGTM for tests/

Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

LGTM (editoast; not tested)

@SharglutDev SharglutDev force-pushed the pfn/front/fix-timestops-margins branch from e40515d to fff626a Compare July 18, 2024 09:10
Math-R
Math-R previously approved these changes Jul 18, 2024
Copy link
Contributor

@Math-R Math-R 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

@SharglutDev SharglutDev force-pushed the pfn/front/fix-timestops-margins branch from e547e54 to bc52bb6 Compare July 18, 2024 10:42
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

Go 🎉

@Math-R Math-R dismissed their stale review July 18, 2024 10:46

detect something potentially

Copy link
Contributor

@Math-R Math-R left a comment

Choose a reason for hiding this comment

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

Find a bug unrelated to this PR, lgtm

@Math-R Math-R added this pull request to the merge queue Jul 18, 2024
Merged via the queue into dev with commit f0b4a37 Jul 18, 2024
20 checks passed
@Math-R Math-R deleted the pfn/front/fix-timestops-margins branch July 18, 2024 11:27
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.

Cannot set margin on origin Cannot add a margin of 0%
7 participants