-
Notifications
You must be signed in to change notification settings - Fork 45
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 displayed op on manchette #10334
base: dev
Are you sure you want to change the base?
Conversation
Signed-off-by: Theo Macron <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10334 +/- ##
==========================================
- Coverage 81.65% 81.59% -0.06%
==========================================
Files 1065 1067 +2
Lines 105650 105541 -109
Branches 723 732 +9
==========================================
- Hits 86265 86120 -145
- Misses 19344 19380 +36
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -20,7 +20,7 @@ import { formatData } from './helpers'; | |||
export type SpeedSpaceChartContainerProps = { | |||
trainSimulation: SimulationResponseSuccess; | |||
selectedTrainPowerRestrictions?: LayerData<PowerRestrictionValues>[]; | |||
pathProperties: PathPropertiesFormatted; | |||
pathProperties?: PathPropertiesFormatted; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think it makes sense to have a speed space chart without path properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I fixed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great ! Good job !
I just left one comment
@@ -35,7 +35,7 @@ export const upsertMapWaypointsInOperationalPoints = ( | |||
}, | |||
part: { track: step.track, position: step.offset }, | |||
position: positionOnPath, | |||
weight: null, | |||
weight: 100, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid magic numbers and because it's also used in useGetProjectedTrainOperationalsPoints maybe we should use a const like 'HIGHEST_PRIORITY_WEIGHT' here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed !
@@ -15,38 +15,53 @@ export const upsertMapWaypointsInOperationalPoints = ( | |||
t: TFunction | |||
): OperationalPoint[] => { | |||
let waypointCounter = 1; | |||
const HIGHEST_PRIORITY_WEIGHT = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be outside of the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
} | ||
setFilteredOperationalPoints(operationalPointsWithUniqueIds); | ||
setFilteredOperationalPoints(operationalPointsWithAllWaypoints); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should change this. Otherwise, we won't have any waypoint checked in the waypoint panel.
We should ask @Tguisnet if on linear mode of the manchette, we now want to view all points or just some of them if a weight superior than a specific number etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where it comes from, but there is a white screen if we try to switch to linear mode in the manchette
Signed-off-by: Theo Macron <[email protected]>
Set the weight of the main PRs (origin, arrival and vias) to 100.
For vias added by hand from the map, they were previously set to “null”, now they're set to 100, so they're displayed on the manchette.
Tests :