Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add route short names to stop deletion warning #985

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

philip-cline
Copy link
Contributor

@philip-cline philip-cline commented Sep 1, 2023

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

Companion PR to conveyal/gtfs-lib#396 to make use of route short names in deletion error messages

@philip-cline philip-cline changed the title Add route short names Add route short names to stop deletion warning Sep 20, 2023
Copy link
Contributor

@daniel-heppner-ibigroup daniel-heppner-ibigroup left a comment

Choose a reason for hiding this comment

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

Sure, that's code.

@@ -183,7 +183,7 @@ const PatternLinkErrorMessage = (props) => {
return (
<li style={{listStyle: 'none', margin: '3px 0px'}}>
<a href={patternPath}>
{`Route ${pattern.routeId}, Pattern ${pattern.patternId}`}
{`Route ${pattern.routeShortName}, Pattern ${pattern.patternId}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not working with a number of feeds I previously imported. For these feeds, the route short name is undefined. You should fall back on route ID IMO.

Copy link
Contributor Author

@philip-cline philip-cline Sep 26, 2023

Choose a reason for hiding this comment

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

I agree, good call. I have added route ID as a fall back in bfcde9e

@philip-cline philip-cline merged commit 7fb1d89 into dev Sep 27, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants