front: adapt times & stops table rows for hourly timetables - #18076
Open
emersion wants to merge 16 commits into
Open
front: adapt times & stops table rows for hourly timetables#18076emersion wants to merge 16 commits into
emersion wants to merge 16 commits into
Conversation
emersion
force-pushed
the
emr/times-stops-hourly-timetable
branch
2 times, most recently
from
August 11, 2026 15:03
d69faad to
f597045
Compare
emersion
marked this pull request as ready for review
August 11, 2026 15:03
emersion
force-pushed
the
emr/times-stops-hourly-timetable
branch
2 times, most recently
from
August 11, 2026 15:26
81cd6e1 to
1fd47d1
Compare
emersion
force-pushed
the
emr/times-stops-hourly-timetable
branch
4 times, most recently
from
August 12, 2026 13:06
0cd3edf to
e918005
Compare
3 tasks
3 tasks
Contributor
Contributor
|
I notice this strange behaviour when I miss one day and then another Screen.Recording.2026-08-13.at.07.34.30.mov |
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>
Signed-off-by: Simon Ser <contact@emersion.fr>
This function performs manual time manipulation. Move truncateToSecond() to shared utils and use that instead. Will help with hourly timetables as well. Signed-off-by: Simon Ser <contact@emersion.fr>
This mirrors a subset of the Temporal API, to make migration easier to the standard once we can upgrade: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/toLocaleString `style` and `hours` are forced to a single value because we only need these variations from the standard API. Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Simon Ser <contact@emersion.fr>
formatLocalTime() is not suitable for presenting a time value to a human: it's meant for `<input type="time">`. Use toLocaleTimeString() instead. Signed-off-by: Simon Ser <contact@emersion.fr>
Will be useful for hourly timetables. Signed-off-by: Simon Ser <contact@emersion.fr>
Will be useful for hourly timetables. Signed-off-by: Simon Ser <contact@emersion.fr>
Will be useful for hourly timetables. Signed-off-by: Simon Ser <contact@emersion.fr>
Will be useful for hourly timetables. Signed-off-by: Simon Ser <contact@emersion.fr>
DurationCell will be used to edit time values relative to the start of a timetable for hourly timetables. Signed-off-by: Simon Ser <contact@emersion.fr>
This component selects between TimeCell and DurationCell depending on the StartTime variant. Signed-off-by: Simon Ser <contact@emersion.fr>
The Temporal API also supports this unit. Signed-off-by: Simon Ser <contact@emersion.fr>
Instead, use the Duration class. This will simplify hourly timetable support in upcoming commits. Signed-off-by: Simon Ser <contact@emersion.fr>
Change types from Date to StartTime, using all of the toys introduced in previous commits. Signed-off-by: Simon Ser <contact@emersion.fr>
emersion
force-pushed
the
emr/times-stops-hourly-timetable
branch
from
August 14, 2026 14:53
e918005 to
c6820e4
Compare
Member
Author
Indeed, fixed by moving a
It seems like this is a bug which also happens on Can you confirm you can reproduce on |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

See individual commits.
The last commit is quite large. Unfortunately, I haven't found a good way to split it up.
To test, create a hourly timetable, import these train schedules, then show the times & stops table and play with it:
timetable(5).json
References: #17626