OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
436 stars 40 forks source link

core: no-electrification should be `null`, not empty string `""` #8327

Open bougue-pe opened 1 month ago

bougue-pe commented 1 month ago

Description and goal

Context: When loading a RJS in core, default electrification (so not-electrified) is empty string "" This is not especially clear and might be ambiguous if ever the RJS electrification "" would really mean something else. This also means that all interfaces up to front must re-interpret this "" as a null

The goal of this task is to switch to an option internally in core, then correctly update all interfaces all the way up to front. This would allow clear interfaces everywhere when no electrification exists (and probably force clearer design even in display).

Attention points:

Relates to https://github.com/OpenRailAssociation/osrd/pull/8235#discussion_r1703656475

Acceptance criteria