-
Notifications
You must be signed in to change notification settings - Fork 44
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
Clean up and enhance simulation report sheet #10001
base: dev
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10001 +/- ##
==========================================
+ Coverage 79.94% 81.42% +1.48%
==========================================
Files 1057 1057
Lines 106302 104272 -2030
Branches 724 720 -4
==========================================
- Hits 84980 84902 -78
+ Misses 21280 19328 -1952
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c95d87e
to
95d9784
Compare
1bb87f2
to
47d2bbc
Compare
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.
Tested, ty for this clean, just left few comments:
Tolerance could be set a little higher
The data seems to be shifted to the right of the column headings, so I think there's an extra margin somewhere. If you fix this problem, you'll also have to watch out for lines with stops, which are displayed in a different way from the others
"conventionalSign": "signe conv.", | ||
"convoy": "convoi", | ||
"crossedATE": "ATE croisé", |
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 think you forgot to also delete these on the english file
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.
still used here in SimulationReportSheetScenario
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 must have the same modifications in the french and english translation files:
- either the keys are not used anymore and it should be removed in both files
- or they are still used and you should not removed 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.
Sorry i got it know i misread your comment
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.
Done !
@@ -112,7 +112,7 @@ export default function useSearchOperationalPoint({ | |||
|
|||
if (chCodeFilter === undefined) return true; | |||
|
|||
return result.ch.toLocaleLowerCase().includes(chCodeFilter.trim().toLowerCase()); | |||
return result?.ch?.toLocaleLowerCase().includes(chCodeFilter.trim().toLowerCase()); |
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 know if it's necessary, but if it makes the code more robust we should keep 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.
i encountered some issues not relating to this where i have a blank page :/
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.
Hum are you sure it is necessary ? Can you check again now ? :/
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.
Done !
"conventionalSign": "signe conv.", | ||
"convoy": "convoi", | ||
"crossedATE": "ATE croisé", |
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 must have the same modifications in the french and english translation files:
- either the keys are not used anymore and it should be removed in both files
- or they are still used and you should not removed it
@@ -17,7 +17,7 @@ | |||
"passageStop": "passage", | |||
"refEngine": "Ref. engine", | |||
"referenceEngine": "reference engine", | |||
"referencePath": "Reference path", | |||
"length": "Length", |
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.
The keys should be alphabetically ordered :)
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.
Done !
@@ -54,6 +54,7 @@ const StcdmResults = ({ | |||
const hasSimulationResults = hasResults(outputs); | |||
|
|||
const { trackConflicts, workConflicts } = useConflictsMessages(t, outputs); | |||
const { username } = useAuth(); |
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 can move this hook directly in StdcmReportSheet
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've encountered an issue doing that of redux being out of scope of the Provider
stdcmResponse, | ||
stdcmTrainResult, | ||
setPathProperties, | ||
dispatch |
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 can get the dispatch directly in useStdcmResults with useAppDispatch()
dispatch |
@@ -38,6 +38,7 @@ const useStdcmForm = (): StdcmSimulationInputs => { | |||
pathSteps, | |||
departureDate: originArrival?.arrivalDate, | |||
departureTime: originArrival?.arrivalTime, | |||
tolerances: origin.tolerances, |
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.
What if the tolerances are on the destination ?
Moreover, with this data structure, you will loose a piece of information: on which extremity the tolerances are defined :/
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.
Done !
}; | ||
}); | ||
|
||
const operationalPointsWithUniqueIds = operationalPointsWithMetadata.map((op, index) => ({ |
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 don't need to use operationalPointsWithMetadata to define the ops for the manchette, you can keep operational_points
const operationalPointsWithUniqueIds = operationalPointsWithMetadata.map((op, index) => ({ | |
const operationalPointsWithUniqueIds = operational_points.map((op, index) => ({ |
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.
Done !
@@ -112,7 +112,7 @@ export default function useSearchOperationalPoint({ | |||
|
|||
if (chCodeFilter === undefined) return true; | |||
|
|||
return result.ch.toLocaleLowerCase().includes(chCodeFilter.trim().toLowerCase()); | |||
return result?.ch?.toLocaleLowerCase().includes(chCodeFilter.trim().toLowerCase()); |
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.
Hum are you sure it is necessary ? Can you check again now ? :/
47d2bbc
to
a5c1dad
Compare
Signed-off-by: Achraf Mohyeddine <[email protected]>
Signed-off-by: Achraf Mohyeddine <[email protected]>
Signed-off-by: Achraf Mohyeddine <[email protected]>
Signed-off-by: Achraf Mohyeddine <[email protected]>
205ed74
to
236f1d7
Compare
Signed-off-by: Achraf Mohyeddine <[email protected]>
Closes #10000