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 when no curves are selected in rolling stock curve component #5481

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

Wadjetz
Copy link
Member

@Wadjetz Wadjetz commented Oct 26, 2023

close #5365

@Wadjetz Wadjetz self-assigned this Oct 26, 2023
@Wadjetz Wadjetz added the area:front Work on Standard OSRD Interface modules label Oct 26, 2023
@Wadjetz Wadjetz changed the title front: RollingStockCurve fix when no curves are selected front: Fix RollingStockCurve when no curves are selected Oct 26, 2023
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #5481 (6172c3d) into dev (acea273) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##                dev    #5481      +/-   ##
============================================
- Coverage     19.47%   19.46%   -0.01%     
  Complexity     2320     2320              
============================================
  Files           871      871              
  Lines        104778   104806      +28     
  Branches       2538     2538              
============================================
  Hits          20402    20402              
- Misses        82902    82930      +28     
  Partials       1474     1474              
Flag Coverage Δ
front 8.08% <0.00%> (-0.01%) ⬇️

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

Files Coverage Δ
...ules/rollingStock/components/RollingStockCurve.tsx 0.00% <0.00%> (ø)

@Wadjetz Wadjetz marked this pull request as ready for review October 26, 2023 14:28
@Wadjetz Wadjetz requested a review from a team as a code owner October 26, 2023 14:28
@Wadjetz Wadjetz force-pushed the ebe/fix-rolling-stock-curve-without-selected-curves branch from 4f0c545 to 2a4ca1d Compare October 26, 2023 15:00
@Wadjetz Wadjetz changed the title front: Fix RollingStockCurve when no curves are selected front: Fix when no curves are selected in rolling stock curve component Oct 26, 2023
Copy link
Contributor

@SharglutDev SharglutDev 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 in local and works as expected :)

If you can just remove the uppercase from your commit and it's perfect.

@flomonster
Copy link
Contributor

Shouldn't we see the graph (with scales) without curves when nothing is selected?

@SharglutDev
Copy link
Contributor

SharglutDev commented Oct 27, 2023

I asked that myself but as it's the same behavior in the rolling stock editor, thought it was intended.

But seems a bit weird yes.

@Wadjetz Wadjetz changed the title front: Fix when no curves are selected in rolling stock curve component front: fix when no curves are selected in rolling stock curve component Oct 27, 2023
@Wadjetz
Copy link
Member Author

Wadjetz commented Oct 27, 2023

This is how the graph lib works, without the data it cannot build the axes or you have to find a way to give it axes by default (I can look at the lib doc to find that)

@Wadjetz
Copy link
Member Author

Wadjetz commented Oct 27, 2023

In the meantime i can keep the axes names

@axrolld
Copy link
Contributor

axrolld commented Oct 30, 2023

I agree thath the scales should remain if that's possible.

Also, be careful when sharing screenshots of rolling stocks on github, the data are not public 😬 We're not supposed to identify a rolling stock with its corresponding data.

@Wadjetz Wadjetz force-pushed the ebe/fix-rolling-stock-curve-without-selected-curves branch 3 times, most recently from 46b002c to bab817b Compare October 30, 2023 15:12
disable the ability to deselect the last curve
@Wadjetz Wadjetz force-pushed the ebe/fix-rolling-stock-curve-without-selected-curves branch from bab817b to 6172c3d Compare October 30, 2023 16:02
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 ✔️

@Wadjetz Wadjetz added this pull request to the merge queue Oct 31, 2023
Merged via the queue into dev with commit 9c85e6c Oct 31, 2023
@Wadjetz Wadjetz deleted the ebe/fix-rolling-stock-curve-without-selected-curves branch October 31, 2023 08:10
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.

Un-ticking every speed-effort curve collapses the rolling stock component
5 participants