OpenRailAssociation / osrd-ui

Icons, fonts, colors, components and all user interface items for OSRD project.
8 stars 5 forks source link

Space time chart crashing when incomplete datas #648

Closed SharglutDev closed 3 weeks ago

SharglutDev commented 1 month ago

What happened?

In some situations, the space time chart crashes when there isn't enough computed scales or when there are trains with no curves.

For now, we did some small fixes on osrd side (see TODOs in SimulationResult.tsx and ManchetteWithSpaceTimeChartWrapper.tsx which will be added in this PR on this commit) but the should rather be on osrd-ui.

What did you expect to happen?

Handle more edge case in ui-spacetimechart to be able to remove those checks and formating in osrd

How can we reproduce it (as minimally and precisely as possible)?

Check the specified files

On which environments the bug occurs?

Deployed Storybook

On which browser the bug occurs?

Firefox