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.
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 the new metro map component to the preview trip planner #2208
Add the new metro map component to the preview trip planner #2208
Changes from 12 commits
c7d9057
b14cf0b
24ce059
2275a5b
bb43459
2cce169
7e78cbc
0a9c8eb
7d00259
ded5eba
c4b2b45
a850675
7ad0dd0
fb4fdaf
63626ad
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, along with changing
update_pin_in_socket
to simply:And adding
To the socket initialization in
mount
...Would allow removing all of the
place_pin
logic, and most of the more complicated guts of theupdate_pin_in_socket
functions as well.(Net reduction of 41 lines of code 😇)
I think it would also be possible to combine
update_pin_in_socket
withupdate_*_pin
, potentially for an even greater LoC reduction (and maybe clearer code), but this feels like a start.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooh actually, yes. If we replace all of the pin stuff with
That gets us a net reduction of 53 lines of code (-54, but +1 because we have to set two
assigns
in themount
), and it resolves my concern with abruptly changing to geojson format in the middle of the live view, since this way we can keep the geojson format closer to the component where it's actually being used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to add in another 6 lines of code because you have to have defaults for update_from_pin and update_to_pin for when the pattern doesn't match.