This repository was archived by the owner on Aug 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
ui-charts: display a GOV in a GET #1050
Open
jacomyal
wants to merge
9
commits into
dev
Choose a base branch
from
ajy/945
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Details: - Adds splitting waypoints in the operational points given to the GET from useManchetteWithSpaceTimeChart, and handles not rendering them in the GET code directly - Adds flatSteps in the SpaceTimeChartContext, as a Set<number> - Steps rendering path segments on pauses on flat steps, since we now assume they are rendered directly in the split section layer itself Signed-off-by: Alexis Jacomy <[email protected]>
This commit allows the SpaceTimeChart to work with space scales that just contain one single flat step. The idea is to allow using the SpaceTimeChart, to only render a TrackOccupancyDiagram, while still having the other interesting interactions (zooming and panning, basically). Details: - Adds new hideTimeCaptions param - Improves utils to allow the SpaceTimeChart to work with only one waypoint, and a flat step on it Signed-off-by: Alexis Jacomy <[email protected]>
This commit aims at making Manchette and useManchetteWithSpaceTimeChart work with a single flat step, on a single waypoint. This will allow them to be used to render a TrackOccupancyDiagram, with all the interesting interactions (zooming and panning). Details: - Adds various options to useManchetteWithSpaceTimeChart, to allow disabling zooming, panning or time captions - Allows overriding vertical padding in useManchetteWithSpaceTimeChart, to exactly fit one single flat step, to the pixel - Improves helpers (and their tests) to work in the edge case where there is just one waypoint, and a flat step on it Signed-off-by: Alexis Jacomy <[email protected]>
This commit basically replaces the previous trackOccupancyDiagram/rendering story, with a new component, TrackOccupancyStandalone, that actually calls useManchetteWithSpaceTimeChart instead of mimicking it. The main benefit is to get proper interactions, such as panning on the time axis. Also, this commit is very impactful, because many things were done quite customly for track occupancy drawing, when the SpaceTimeChart APIs provide many tools to help rendering additional layers on top of them. One final note, before getting into the detail: This commit breaks selecting a train with the mouse on the TrackOccupancyDiagram, because this was done in the rendering loop, rather than using picking (as it should). Details: - Replaces all time and space to pixels conversions from track occupancy layers, with code that uses proper tools from SpaceTimeChartContext - Removes mouse collision detection (it was done in the rendering process, which meant that rendering was depending on the mousePositions, causing many excess renderings) - Updates OccupancyZone: id becomes trainId, and arrivalTime and departureTime become numbers instead of dates - Adds new TrackOccupancyStandalone component - Updates rendering story to use new component Signed-off-by: Alexis Jacomy <[email protected]>
Some code from useManchetteWithSpaceTimeChart stories was out of date, this commit fixes those occurances. Signed-off-by: Alexis Jacomy <[email protected]>
There were some weird issues due to the fact that data for the manchette and useManchetteWithSpaceTimeChart were in millimeters, and data for the SpaceTimeChart were in meters. This commit migrates everything SpaceTimeChart-related to millimeters. Signed-off-by: Alexis Jacomy <[email protected]>
This commit addresses ticket: osrd-project/osrd-confidential#945 Details: - Adds possibility to add some top padding to TrackOccupancyCanvas - Adds possibility to display a close button in the top right of the TrackOccupancyCanvas - Allows giving children to TrackOccupancyManchette - Adds Waypoint (as WaypointComponent) to exports from ui-charts - Creates new trac-occupancy story, that shows how to display TrackOccupancy diagrams within split sections of the Manchette and the SpaceTimeChart Signed-off-by: Alexis Jacomy <[email protected]>
Details: - Implements back clicks detection in the TrackOccupancy diagram, using the picking framework from the SpaceTimeDiagram - Adds an example showing how it works in the trackOccupancyDiagram/rendering story Signed-off-by: Alexis Jacomy <[email protected]>
Details: - Adds top and bottom borders to TrackOccupancyCanvas - Adds top and bottom borders to TrackOccupancyManchette - Removes these borders when using TrackOccupancyStandalone Signed-off-by: Alexis Jacomy <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses issue #945. It is huge, and has been designed to be reviewed each commit one at a time.
The core parts are:
ManchetteandSpaceTimeChartto ease the track-occupancy diagram integrationTrackOccupancyStandalonecomponent, that properly usesuseManchetteWithSpaceTimeChartto get a track-occupancy diagram, with theSpaceTimeChartinteractions (panning and zooming)TrackOccupancyCanvasand aTrackOccupancyCanvaswithin a split section, usinguseManchetteWithSpaceTimeChartTrackOccupancyCanvaslayer, using picking