-
Notifications
You must be signed in to change notification settings - Fork 63
TableEditor
We need to integrate a timetable editor into the GTFS Editor (issue 87). Since this is a purpose-built tool for editing public transit schedules, it should be as easy to use (and quick to use) as possible.
- Keyboard-operated: it should be possible to run the editor entirely from the keyboard (although mouse support is required as well)
- Autocompletion: there should be intelligent autocompletion. It should be possible to turn off all autocompletion.
- Undo: it is absoulutely necessary to be able to undo when managing large amounts of data like this
- Paste support: it should be possible to paste data from Excel, as many agencies manage their schedules this way
- Themes: There should be multiple themes (e.g. light and dark), to be easy on the eyes
- Styleable: as much as possible, things should be done through CSS. As an example, AM/PM markers should be added using :after, so that it's easy to switch time formats from 3:32PM to 332p to 332 to 15:32, all of which represent 3:32 PM
This is the view of the timetable that the user sees. Most of the features are called out.
There are two types of commands: global commands and block commands. Global commands affect editor state, whereas block commands change the selected cells. None of the commands require modifier keys because cells can contain only numbers (the exception is when editing text cells, e.g. route name. In that case, we could allow modifiers, or require users leave the cell before using commands).
-
c
: turn autocomplete on or off -
t
: toggle 24-hour time -
?
: help -
b
: show arrival and departure times, or a single time for both -
m
: show major stops or all stops -
z
: undo -
y
: redo
-
i
: insert trip after -
s
: save selected trip(s) -
Shift-S
: save all trips -
r
: revert selected trip(s) to saved -
Shift-R
: revert all trps to saved -
p
: change time to PM (this and next 3 do nothing in twenty-four hour mode) -
a
: change time to AM -
n
: change time to past-midnight/next day -
enter
: edit mode (edit text in cell, rather than typing over) -
esc
: leave edit mode -
u
: change pickup type -
d
: change dropoff type -
h
: change stop headsign -
o
: offset times -
v
: paste (as in from Excel) -
-
: disable these stops (vehicle does not stop here) -
del
: remove these times (vehicle stops here, but times should be interpolated)
When enabled, autocompletion could do the following things:
- Insert trip: copy times from previous trip (perhaps even with autocomplete turned off)
- Edit time in trip: offset following times
- Enter start time: re-sort list
There should be inline validation for the following things
- Times out of sequence
- Overtaking trips with the same stops (i.e. not express service)
- Excessive-speed travel
- Large difference in travel or dwell times from one trip to the next
The simplest way to implement this seems to be to implement a model for trips that has an array of times. Then there is a nice mapping of row -> model, and marshalling stuff can be handled on the server side.
The table should be implemented with handsontable. The visualization of stop sequences can be accomplished with transitive.js.