From e7d24162546a4db75147ab31ec5346c1f5308415 Mon Sep 17 00:00:00 2001
From: SharglutDev
Date: Mon, 25 Nov 2024 12:20:44 +0100
Subject: [PATCH 1/3] ui-manchette: update some package exports
- Add some type export needed when implementing the app
- Remove some exports not needed outside of ui-manchette
Signed-off-by: SharglutDev
---
.../src/stories/base.stories.tsx | 2 +-
ui-manchette/src/index.ts | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ui-manchette-with-spacetimechart/src/stories/base.stories.tsx b/ui-manchette-with-spacetimechart/src/stories/base.stories.tsx
index 030a5daaa..4f7d3ecd1 100644
--- a/ui-manchette-with-spacetimechart/src/stories/base.stories.tsx
+++ b/ui-manchette-with-spacetimechart/src/stories/base.stories.tsx
@@ -1,7 +1,7 @@
/* eslint-disable import/no-unresolved */
import React, { useRef } from 'react';
-import { Manchette } from '@osrd-project/ui-manchette';
+import Manchette from '@osrd-project/ui-manchette';
import type { ProjectPathTrainResult, Waypoint } from '@osrd-project/ui-manchette/dist/types';
import { PathLayer, SpaceTimeChart } from '@osrd-project/ui-spacetimechart';
import type { Meta } from '@storybook/react';
diff --git a/ui-manchette/src/index.ts b/ui-manchette/src/index.ts
index 85f614f9a..233b41947 100644
--- a/ui-manchette/src/index.ts
+++ b/ui-manchette/src/index.ts
@@ -2,6 +2,7 @@ import '@osrd-project/ui-core/dist/theme.css';
import './styles/main.css';
import './components/consts';
-export { default as Waypoint } from './components/Waypoint';
-export { default as WaypointList } from './components/WaypointList';
-export { default as Manchette } from './components/Manchette';
+import Manchette from './components/Manchette';
+
+export default Manchette;
+export type { Waypoint, ProjectPathTrainResult } from './types';
From a9798c6505da959f409e1e2027d5b6ad5e57f3b8 Mon Sep 17 00:00:00 2001
From: SharglutDev
Date: Thu, 28 Nov 2024 10:40:27 +0100
Subject: [PATCH 2/3] ui-manchette: fix manchette toolbar not fixed bottom
The PR https://github.com/OpenRailAssociation/osrd-ui/pull/728 changed the height of the manchette from a min height to a fixed one.
It introduced a bug where, when having a long list of waypoint, when scrolling bottom, the manchette toolbar wasn't stick to the bottom anymore.
Fix this issue by giving back a min height to the manchette while still keeping its dynamic value introduced in PR #728.
Signed-off-by: SharglutDev
---
ui-manchette/src/components/Manchette.tsx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ui-manchette/src/components/Manchette.tsx b/ui-manchette/src/components/Manchette.tsx
index 30e997acb..6acd96223 100644
--- a/ui-manchette/src/components/Manchette.tsx
+++ b/ui-manchette/src/components/Manchette.tsx
@@ -26,15 +26,14 @@ const Manchette = ({
resetZoom,
yZoom = 1,
waypoints,
- activeWaypointId,
isProportional = true,
toggleMode,
children,
height = INITIAL_OP_LIST_HEIGHT,
}: ManchetteProps) => (