Skip to content

Conversation

@philip-cline
Copy link
Contributor

Checklist

  • [ ✓] Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • [✓ ] Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
  • [ ✓] The description lists all applicable issues this PR seeks to resolve
  • [ ✓] The description lists any configuration setting(s) that differ from the default settings
  • [ ✓] All tests and CI builds passing

Description

Added a trip_short_name field (Closes #569 ) to the timetable editor (by adding object in timetable.js). Also added tests to end-to-end.js to enter a value in trip_short_name.

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2020

Codecov Report

Merging #588 into dev will decrease coverage by 28.08%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##              dev     #588       +/-   ##
===========================================
- Coverage   43.89%   15.80%   -28.09%     
===========================================
  Files         315      315               
  Lines       17270    16100     -1170     
  Branches     5269     4896      -373     
===========================================
- Hits         7581     2545     -5036     
- Misses       8443    11570     +3127     
- Partials     1246     1985      +739     
Flag Coverage Δ
#end_to_end_tests ?
#unit_tests 15.80% <ø> (ø)
Impacted Files Coverage Δ
lib/editor/selectors/timetable.js 0.00% <ø> (-62.36%) ⬇️
lib/manager/components/validation/TripsChart.js 0.00% <0.00%> (-80.40%) ⬇️
...nager/components/validation/ServicePerModeChart.js 0.00% <0.00%> (-78.27%) ⬇️
lib/common/util/map-keys.js 25.00% <0.00%> (-75.00%) ⬇️
lib/manager/components/HomeProjectDropdown.js 0.00% <0.00%> (-72.73%) ⬇️
lib/editor/util/objects.js 14.89% <0.00%> (-72.35%) ⬇️
lib/editor/components/map/TextPath.js 0.00% <0.00%> (-70.00%) ⬇️
...b/manager/containers/ActiveFeedVersionNavigator.js 0.00% <0.00%> (-70.00%) ⬇️
lib/editor/components/timetable/HeaderCell.js 0.00% <0.00%> (-68.97%) ⬇️
lib/manager/components/DeploymentPreviewButton.js 15.78% <0.00%> (-68.43%) ⬇️
... and 260 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 336295d...f7272fd. Read the comment docs.

Copy link
Contributor

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

LGTM. Although one thing I noticed was that maybe this field width could be a little narrower. This screenshot shows the field with the width changed to 120, which I think might be sufficient given that trip_short_name is typically reserved for things like vehicle numbers (according to the spec).

image

Copy link
Contributor

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Let's find a better value for the placeholder for Trip Short Name.

@philip-cline
Copy link
Contributor Author

Re @binh-dam-ibigroup's comments: I found the trip_short_name field at this example: https://support.google.com/transitpartners/answer/6377422?hl=en.

The GTFS spec outlines trip_short_name as "Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, leave this field empty. A trip_short_name value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations."

As @landonreed said, it's mostly reserved for vehicle numbers so perhaps '801' doesn't represent a great example. The MBTA uses three digits such as '005' for their commuter rail trip_short_names - perhaps this would be a better example to use. Let me know and I will update.

Copy link
Contributor

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Looks good otherwise!

…idth to 120

Changed trip_short_name width to 120 from 200 of previous commit

Close #569
@philip-cline
Copy link
Contributor Author

philip-cline commented Jul 3, 2020

@landonreed, I updated the width here to be 120 for this and kept the 801 placeholder. Let me know if any further changes are needed.

@landonreed landonreed requested a review from evansiroky July 6, 2020 13:28
@landonreed landonreed assigned evansiroky and unassigned philip-cline Jul 6, 2020
@evansiroky
Copy link
Contributor

Checklist

  • [ ✓] Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • [✓ ] Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
  • [ ✓] The description lists all applicable issues this PR seeks to resolve
  • [ ✓] The description lists any configuration setting(s) that differ from the default settings
  • [ ✓] All tests and CI builds passing

Description

Added a trip_short_name field (Closes #569 ) to the timetable editor (by adding object in timetable.js). Also added tests to end-to-end.js to enter a value in trip_short_name.

@philip-cline FYI, the markdown way to add checks is to write it as [x].

Example:

  • checked
  • unchecked

@evansiroky evansiroky merged commit c54ad48 into dev Jul 8, 2020
@evansiroky evansiroky deleted the add-trip_short_name branch July 8, 2020 00:31
@landonreed landonreed mentioned this pull request Aug 12, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timetable Editor: Add trip_short_name field

6 participants