OpenRailAssociation / osrd-ui

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

ui-spacetimechart: use paths layer for conflicts #647

Closed emersion closed 3 weeks ago

emersion commented 1 month ago

The overlay layer is rendered on top of the captions, which is undesirable here.

Example bug:

out

clarani commented 1 month ago

I still have the issue too :/

emersion commented 4 weeks ago

Apologies, I messed up when testing. I've updated the PR. Here's a hack patch to test this in the storybook:

diff --git a/ui-spacetimechart/src/stories/layers.stories.tsx b/ui-spacetimechart/src/stories/layers.stories.tsx
index 028ee5b5f118..2c6479c0f5d3 100644
--- a/ui-spacetimechart/src/stories/layers.stories.tsx
+++ b/ui-spacetimechart/src/stories/layers.stories.tsx
@@ -32,7 +32,7 @@ const CONFLICTS = [
     timeStart: +START_DATE + 35 * MINUTE,
     timeEnd: +START_DATE + 37 * MINUTE,
     spaceStart: 39 * KILOMETER,
-    spaceEnd: 41 * KILOMETER,
+    spaceEnd: 99999 * KILOMETER,
   },
 ];
emersion commented 3 weeks ago

That one uses the background layer, because it's drawn behind the paths (so it doesn't have the same bug).