OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
GNU Lesser General Public License v3.0
415 stars 40 forks source link

front: technical debt pathfinding component #7918

Open anisometropie opened 2 days ago

anisometropie commented 2 days ago

Description and goal

in ManageTrainScheduleV2, some major transformation on pathfinding data is delegated to sub components TypeAndPathV2.

launchPathFinding has much more responsibility than a mere (and small) subcomponent should have

I think that’s a design flaw and a case where props drilling is problematic. it creates major indirection: difficult to follow where to data comes from and what’s done to it.

This really could be a proper case to use a business hook (as proposed by @jacomyal @sim51) to be discussed