Skip to content

front: use Duration for stop_for in times & stops table - #18091

Open
emersion wants to merge 3 commits into
devfrom
emr/times-stops-duration
Open

front: use Duration for stop_for in times & stops table#18091
emersion wants to merge 3 commits into
devfrom
emr/times-stops-duration

Conversation

@emersion

@emersion emersion commented Aug 11, 2026

Copy link
Copy Markdown
Member

See individual commits.

Improves type safety.

@github-actions github-actions Bot added the area:front Work on Standard OSRD Interface modules label Aug 11, 2026
@emersion
emersion force-pushed the emr/times-stops-duration branch from 5c271ec to 56914a2 Compare August 12, 2026 12:20
@emersion
emersion marked this pull request as ready for review August 12, 2026 12:21
@emersion
emersion requested a review from a team as a code owner August 12, 2026 12:21
@emersion
emersion requested review from Math-R and Pivouane August 12, 2026 12:21
@emersion emersion moved this to Awaiting merge in Board PI 21 Aug 12, 2026
@emersion emersion self-assigned this Aug 12, 2026
Improves type safety.

Signed-off-by: Simon Ser <contact@emersion.fr>
DurationCell's declaration is difficult to read because its props
type is non-trivial. Extract that to a separate type.

Signed-off-by: Simon Ser <contact@emersion.fr>
Improves type safety.

Signed-off-by: Simon Ser <contact@emersion.fr>
@emersion
emersion force-pushed the emr/times-stops-duration branch from 56914a2 to ecabf43 Compare August 12, 2026 12:31
Comment on lines +85 to +90
{
row,
field: 'stopDuration',
value: new Duration({ minutes: 15 }),
propagationMode: 'toDestination',
}, // +10min

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I know that the conversion is good, but i found that the +10min commentary is a bit misleading as we pass minutes: 15 to Duration

field: 'stopDuration',
value: new Duration({ minutes: 10 }),
propagationMode: 'fromDeparture',
}, // +5min

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

field: 'stopDuration',
value: new Duration({ minutes: 10 }),
propagationMode: 'fromDeparture',
}, // +10min

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@Math-R Math-R left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm, looks like you have some linting errors, feel free eto resolve or not the previous comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:front Work on Standard OSRD Interface modules

Projects

Status: Awaiting merge

Development

Successfully merging this pull request may close these issues.

2 participants