-
Notifications
You must be signed in to change notification settings - Fork 34
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
Nearby view support #655
Nearby view support #655
Changes from 14 commits
cef0cc2
4857a56
e85f08d
fc1a706
e58cf71
38aefe6
eb9b041
016f1d4
97deeb8
f52f435
a4483f6
52cdc89
b500a49
d3a51f5
694575d
1354178
d2ffb77
16b1e65
7a178de
8b59a21
bf4da86
f40bd02
e6fb544
ff5b3db
b2cdbbf
b6fa7aa
27ff939
a710085
8ba60ef
99213e1
edbdc5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import React, { Component, ReactElement } from "react"; | ||
import { Stop } from "@opentripplanner/types"; | ||
import { FormattedMessage } from "react-intl"; | ||
|
||
import * as S from "../styled"; | ||
import { defaultMessages } from "../util"; | ||
|
||
interface Props { | ||
onStopClick: ({ stopId: string }) => void; | ||
stopId: string; | ||
onStopClick: (stop: Stop) => void; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a breaking change. Either:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a great idea! I'll add it. Thank you for the suggestion |
||
stop: Stop; | ||
} | ||
|
||
export default class ViewStopButton extends Component<Props> { | ||
onClick = (): void => { | ||
const { onStopClick, stopId } = this.props; | ||
onStopClick({ stopId }); | ||
const { onStopClick, stop } = this.props; | ||
onStopClick(stop); | ||
}; | ||
|
||
render(): ReactElement { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
"react-map-gl": "^7.0.15" | ||
}, | ||
"dependencies": { | ||
"@opentripplanner/map-popup": "^2.0.5" | ||
"@opentripplanner/map-popup": "^2.0.7-alpha.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tile overlay package should probably be released from a separate PR after the map popup package is released. |
||
}, | ||
"devDependencies": { | ||
"@opentripplanner/base-map": "^3.0.14", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
"dependencies": { | ||
"@opentripplanner/base-map": "^3.0.14", | ||
"@opentripplanner/from-to-location-picker": "^2.1.8", | ||
"@opentripplanner/map-popup": "^2.0.5", | ||
"@opentripplanner/map-popup": "^2.0.7-alpha.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The stops overlay package should probably be released from a separate PR after the map popup package is released. |
||
"flat": "^5.0.2" | ||
}, | ||
"devDependencies": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3241,6 +3241,16 @@ | |
resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca" | ||
integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q== | ||
|
||
"@opentripplanner/map-popup@^2.0.7-alpha.1": | ||
version "2.0.7-alpha.1" | ||
resolved "https://registry.yarnpkg.com/@opentripplanner/map-popup/-/map-popup-2.0.7-alpha.1.tgz#c8e771989ecad23b1614e83b4ee4831c7c019491" | ||
integrity sha512-YXNoE1R30ClgaPuj5khWlKv7bcBBbJETuniqrg+55AeL8dpMEndUQPsmDWexr9XkY5xOmqhrrfjJ6aew00gYOQ== | ||
dependencies: | ||
"@opentripplanner/base-map" "^3.0.14" | ||
"@opentripplanner/core-utils" "^11.0.2" | ||
"@opentripplanner/from-to-location-picker" "^2.1.8" | ||
flat "^5.0.2" | ||
|
||
"@opentripplanner/[email protected]": | ||
version "7.0.0-alpha.2" | ||
resolved "https://registry.yarnpkg.com/@opentripplanner/types/-/types-7.0.0-alpha.2.tgz#d10c69f99b2da6d1e80ab5989520bde8e558627b" | ||
|
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.
Keep this prop (as a fallback) otherwise it is a breaking change.
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.
Made it an either or type, let me know if that's good