Skip to content

Migrate Perlenkette using collapsed nodes#929

Draft
louisgreiner wants to merge 67 commits into
mrd/new-nodes-management-systemfrom
lgr/migrate-perlenkette-using-collapsed-nodes
Draft

Migrate Perlenkette using collapsed nodes#929
louisgreiner wants to merge 67 commits into
mrd/new-nodes-management-systemfrom
lgr/migrate-perlenkette-using-collapsed-nodes

Conversation

@louisgreiner

@louisgreiner louisgreiner commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Implements the "what you see is what you get" from the editor main view to the perlenkette

Closes #929

Math-R and others added 27 commits April 16, 2026 15:28
-first step to transform trainrunSection.nbOfStops, in actual nodes
Signed-off-by: Louis Greiner <greiner.louis@gmail.com>
Signed-off-by: Clara Ni <clara.ni@outlook.fr>
…unctions

`TrainrunsectionHelper.getTravelTime()` computes the new travel time of a
trainrunSection, either by using the `travelTimeFactor` and the current
travel time of the section, or by using the total trainrun travel time and
the sum of the new travel times computed up to that point.

This logic can be split into 2 independent functions, which will be used
depending on whether the considered section is the last one to compute or not.

Signed-off-by: Clara Ni <clara.ni@outlook.fr>
…s service

We used to destructure the times too early is the propagation process.

Moving out the Math.max(.., Math.pow(..)) make getLastSectionTravelTime and
getSectionDistributedTravelTime ensure we get a precise value of the travel
time when calling these functions. Then, the minimum time is directly
ensured by the TrainrunSectionTimesService.

Signed-off-by: Louis Greiner <louis.greiner@proton.me>
Until now, a time structure has represented one or several trainrun sections without any stops,
so it could be described by its departure and arrival times (right and left) and its travel time.
Since we are now going to handle several trainrun sections that include stops, we need to add a
 new property to store the total stop time in the time structure.

Signed-off-by: Clara Ni <clara.ni@outlook.fr>
…ode is masked

The behavior is pretty much the same as when a node is a non-stop node, except
when updating the travel time, because we need to take into account the stop
times of the reduced nodes.

Signed-off-by: Clara Ni <clara.ni@outlook.fr>
…he section tab

Signed-off-by: Clara Ni <clara.ni@outlook.fr>
…vice

Co-authored-by: Simon Ser <contact@emersion.fr>
TrainrunSectionViewObject will represent multiple trainrun sections
soon. Add a helper to get the parent trainrun to reduce reliance
on a single trainrun.

Signed-off-by: Simon Ser <contact@emersion.fr>
…isSectionSelected()

Preparation for the next commit.

Signed-off-by: Simon Ser <contact@emersion.fr>
Collapsed nodes will make it so a single view object will need to
display a chain of trainrun sections.

For now, blindly replace trainrunSection with trainrunSections[0],
to be cleaned up in future commits.

Signed-off-by: Simon Ser <contact@emersion.fr>
…rateKey()

We were only using the first trainrun section's path here.

Expose a getPath() method to get a view object's path. We need to
call it from inside generateKey() so drop the static attribute.

While at it, make the generateKey() helper function private because
it shouldn't be called from elsewhere.

Signed-off-by: Simon Ser <contact@emersion.fr>
Supersedes TrainrunSection.path.textPositions because it takes
into account collapsed nodes.

Signed-off-by: Simon Ser <contact@emersion.fr>
…nodes

Co-authored-by: Simon Ser <contact@emersion.fr>
Tests from trainrunsections.view.spec and data.view.spec.
This commit addresses issue:
OpenRailAssociation/osrd#13292

Details:
- Adds new component GlobalNodesManagementComponent in app/view/editor-edit-tools-view-component
- The new component controls the isCollapsed state of the nodes
- Adds EN and FR translations for the new component
- Adds the new component to the existing EditorEditToolsViewComponent panel
Not used

Signed-off-by: Clara Ni <clara.ni@outlook.fr>
The rest of the dto in the code will be dealt at the very end of the feature branch.

Signed-off-by: Louis Greiner <louis.greiner@proton.me>
Signed-off-by: Louis Greiner <louis.greiner@proton.me>
…eTextPositions

Signed-off-by: Louis Greiner <louis.greiner@proton.me>
….lastSection

Signed-off-by: Louis Greiner <louis.greiner@proton.me>
We sent too many operations, especially during undockTransition, in an intermediate
state that was not correct. Now we only send it at the end.

Signed-off-by: Louis Greiner <louis.greiner@proton.me>
@louisgreiner louisgreiner force-pushed the mrd/new-nodes-management-system branch from c1893cb to 9405e4f Compare April 16, 2026 14:12
@louisgreiner louisgreiner force-pushed the lgr/migrate-perlenkette-using-collapsed-nodes branch from 49d56d6 to 6d0cce7 Compare April 16, 2026 14:58
Signed-off-by: Louis Greiner <louis.greiner@proton.me>
@louisgreiner louisgreiner force-pushed the lgr/migrate-perlenkette-using-collapsed-nodes branch from 6d0cce7 to d7e6696 Compare April 16, 2026 15:47
@louisgreiner louisgreiner changed the title wip Migrate Perlenkette using collapsed nodes Apr 17, 2026
@Math-R Math-R force-pushed the mrd/new-nodes-management-system branch 8 times, most recently from bb4eef1 to 12bd9b0 Compare May 6, 2026 15:57
@louisgreiner louisgreiner moved this to Awaiting merge in Board PI 20 May 7, 2026
@louisgreiner louisgreiner self-assigned this May 7, 2026
@louisgreiner louisgreiner moved this from Awaiting merge to In Progress in Board PI 20 May 7, 2026
@louisgreiner louisgreiner moved this from In Progress to Todo in Board PI 20 May 7, 2026
@emersion emersion force-pushed the mrd/new-nodes-management-system branch from 12bd9b0 to 92ff856 Compare May 18, 2026 09:14
@louisgreiner louisgreiner force-pushed the mrd/new-nodes-management-system branch from 92ff856 to 0db54d1 Compare May 27, 2026 13:39
@louisgreiner louisgreiner moved this from Todo to In Progress in Board PI 20 May 28, 2026
@louisgreiner louisgreiner force-pushed the mrd/new-nodes-management-system branch 2 times, most recently from ebb3891 to 808b0f0 Compare May 29, 2026 11:56
@louisgreiner louisgreiner force-pushed the mrd/new-nodes-management-system branch 2 times, most recently from 234859e to edcd6d3 Compare June 16, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants