Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev-2.x' into upstream-merge-2…
Browse files Browse the repository at this point in the history
…024-08-01
  • Loading branch information
leonardehrenfried committed Aug 1, 2024
2 parents 26d1654 + 669d042 commit d3685d3
Show file tree
Hide file tree
Showing 181 changed files with 5,158 additions and 2,528 deletions.
1 change: 1 addition & 0 deletions client/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
VITE_API_URL=/otp/transmodel/v3
VITE_DEBUG_STYLE_URL=/otp/routers/default/inspector/vectortile/style.json

1,113 changes: 592 additions & 521 deletions client/package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,33 @@
"graphql-request": "7.1.0",
"maplibre-gl": "4.5.0",
"react": "18.3.1",
"react-bootstrap": "2.10.3",
"react-bootstrap": "2.10.4",
"react-dom": "18.3.1",
"react-map-gl": "7.1.7"
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.2",
"@graphql-codegen/client-preset": "4.3.1",
"@graphql-codegen/client-preset": "4.3.3",
"@graphql-codegen/introspection": "4.0.3",
"@parcel/watcher": "2.4.1",
"@testing-library/react": "16.0.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@typescript-eslint/eslint-plugin": "7.14.1",
"@typescript-eslint/parser": "7.14.1",
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"@vitejs/plugin-react": "4.3.1",
"@vitest/coverage-v8": "1.6.0",
"@vitest/coverage-v8": "2.0.5",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.9.0",
"eslint-plugin-react": "7.34.3",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react-refresh": "0.4.7",
"jsdom": "24.1.0",
"prettier": "3.3.2",
"typescript": "5.5.2",
"vite": "5.3.2",
"vitest": "1.6.0"
"eslint-plugin-react-refresh": "0.4.9",
"jsdom": "24.1.1",
"prettier": "3.3.3",
"typescript": "5.5.4",
"vite": "5.3.5",
"vitest": "2.0.5"
}
}
22 changes: 22 additions & 0 deletions client/src/components/ItineraryList/InterchangeInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import logo from '../../static/img/stay-seated.svg';
import { Leg } from '../../gql/graphql.ts';

/**
* Displays an icon if a leg has a stay-seated transfer from the previous one.
*/
export function InterchangeInfo({ leg }: { leg: Leg }) {
if (leg.interchangeFrom?.staySeated) {
return (
<img
alt="Stay-seated transfer"
title="Stay-seated transfer"
src={logo}
width="20"
height="20"
className="d-inline-block align-middle"
/>
);
} else {
return null;
}
}
16 changes: 13 additions & 3 deletions client/src/components/ItineraryList/ItineraryLegDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Leg, Mode } from '../../gql/graphql.ts';
import { LegTime } from './LegTime.tsx';
import { formatDistance } from '../../util/formatDistance.ts';
import { formatDuration } from '../../util/formatDuration.ts';
import { InterchangeInfo } from './InterchangeInfo.tsx';

export function ItineraryLegDetails({ leg, isLast }: { leg: Leg; isLast: boolean }) {
return (
Expand All @@ -10,8 +11,12 @@ export function ItineraryLegDetails({ leg, isLast }: { leg: Leg; isLast: boolean
{formatDistance(leg.distance)}, {formatDuration(leg.duration)}
</div>
<div>
<LegTime aimedTime={leg.aimedStartTime} expectedTime={leg.expectedStartTime} hasRealtime={leg.realtime} /> -{' '}
<LegTime aimedTime={leg.aimedEndTime} expectedTime={leg.expectedEndTime} hasRealtime={leg.realtime} />
<InterchangeInfo leg={leg} />
<LegTime
aimedTime={leg.aimedStartTime}
expectedTime={leg.expectedStartTime}
hasRealtime={leg.realtime}
/> - <LegTime aimedTime={leg.aimedEndTime} expectedTime={leg.expectedEndTime} hasRealtime={leg.realtime} />
</div>
<div className="mode">
<b>{leg.mode}</b>{' '}
Expand All @@ -24,7 +29,12 @@ export function ItineraryLegDetails({ leg, isLast }: { leg: Leg; isLast: boolean
</>
)}{' '}
<div></div>
{leg.mode !== Mode.Foot && <u>{leg.fromPlace.name}</u>} {!isLast && <u>{leg.toPlace.name}</u>}
{leg.mode !== Mode.Foot && (
<>
<u title={leg.fromPlace.quay?.id}>{leg.fromPlace.name}</u>{' '}
</>
)}{' '}
{!isLast && <u title={leg.toPlace.quay?.id}>{leg.toPlace.name}</u>}
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/MapView/MapView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function MapView({
}}
// it's unfortunate that you have to list these layers here.
// maybe there is a way around it: https://github.com/visgl/react-map-gl/discussions/2343
interactiveLayerIds={['regular-stop', 'area-stop', 'group-stop', 'vertex', 'edge', 'link']}
interactiveLayerIds={['regular-stop', 'area-stop', 'group-stop', 'parking-vertex', 'vertex', 'edge', 'link']}
onClick={showFeaturePropPopup}
// put lat/long in URL and pan to it on page reload
hash={true}
Expand Down
12 changes: 12 additions & 0 deletions client/src/hooks/useTripQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ const query = graphql(`
duration
fromPlace {
name
quay {
id
}
}
toPlace {
name
quay {
id
}
}
toEstimatedCall {
destinationDisplay {
Expand All @@ -71,6 +77,12 @@ const query = graphql(`
pointsOnLink {
points
}
interchangeTo {
staySeated
}
interchangeFrom {
staySeated
}
}
systemNotices {
tag
Expand Down
8 changes: 8 additions & 0 deletions client/src/static/img/stay-seated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions client/src/util/getColorForMode.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Mode } from '../gql/graphql.ts';

export const getColorForMode = function (mode: Mode) {
if (mode === Mode.Foot) return '#444';
if (mode === Mode.Foot) return '#191616';
if (mode === Mode.Bicycle) return '#5076D9';
if (mode === Mode.Scooter) return '#253664';
if (mode === Mode.Car) return '#444';
if (mode === Mode.Car) return '#7e7e7e';
if (mode === Mode.Rail) return '#86BF8B';
if (mode === Mode.Coach) return '#25642A';
if (mode === Mode.Metro) return '#D9B250';
Expand Down
2 changes: 2 additions & 0 deletions docs/BuildConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Sections follow that describe particular settings in more depth.
|    [groupFilePattern](#nd_groupFilePattern) | `regexp` | Pattern for matching group NeTEx files. | *Optional* | `"(\w{3})-.*\.xml"` | 2.0 |
|    ignoreFareFrame | `boolean` | Ignore contents of the FareFrame | *Optional* | `false` | 2.3 |
|    [ignoreFilePattern](#nd_ignoreFilePattern) | `regexp` | Pattern for matching ignored files in a NeTEx bundle. | *Optional* | `"$^"` | 2.0 |
|    ignoreParking | `boolean` | Ignore Parking elements. | *Optional* | `true` | 2.6 |
|    noTransfersOnIsolatedStops | `boolean` | Whether we should allow transfers to and from StopPlaces marked with LimitedUse.ISOLATED | *Optional* | `false` | 2.2 |
|    [sharedFilePattern](#nd_sharedFilePattern) | `regexp` | Pattern for matching shared NeTEx files in a NeTEx bundle. | *Optional* | `"shared-data\.xml"` | 2.0 |
|    [sharedGroupFilePattern](#nd_sharedGroupFilePattern) | `regexp` | Pattern for matching shared group NeTEx files in a NeTEx bundle. | *Optional* | `"(\w{3})-.*-shared\.xml"` | 2.0 |
Expand Down Expand Up @@ -106,6 +107,7 @@ Sections follow that describe particular settings in more depth.
|       [groupFilePattern](#tf_1_groupFilePattern) | `regexp` | Pattern for matching group NeTEx files. | *Optional* | `"(\w{3})-.*\.xml"` | 2.0 |
|       ignoreFareFrame | `boolean` | Ignore contents of the FareFrame | *Optional* | `false` | 2.3 |
|       [ignoreFilePattern](#tf_1_ignoreFilePattern) | `regexp` | Pattern for matching ignored files in a NeTEx bundle. | *Optional* | `"$^"` | 2.0 |
|       ignoreParking | `boolean` | Ignore Parking elements. | *Optional* | `true` | 2.6 |
|       noTransfersOnIsolatedStops | `boolean` | Whether we should allow transfers to and from StopPlaces marked with LimitedUse.ISOLATED | *Optional* | `false` | 2.2 |
|       [sharedFilePattern](#tf_1_sharedFilePattern) | `regexp` | Pattern for matching shared NeTEx files in a NeTEx bundle. | *Optional* | `"shared-data\.xml"` | 2.0 |
|       [sharedGroupFilePattern](#tf_1_sharedGroupFilePattern) | `regexp` | Pattern for matching shared group NeTEx files in a NeTEx bundle. | *Optional* | `"(\w{3})-.*-shared\.xml"` | 2.0 |
Expand Down
7 changes: 7 additions & 0 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ based on merged pull requests. Search GitHub issues and pull requests for smalle
- Fix copy-on-write in TimetableSnapshot [#5941](https://github.com/opentripplanner/OpenTripPlanner/pull/5941)
- Generate documentation for OSM tag mappers [#5929](https://github.com/opentripplanner/OpenTripPlanner/pull/5929)
- Disable Legacy REST API by default [#5948](https://github.com/opentripplanner/OpenTripPlanner/pull/5948)
- Enforce non-null coordinates on multimodal station [#5971](https://github.com/opentripplanner/OpenTripPlanner/pull/5971)
- Add car rental to Transmodel street mode options [#5977](https://github.com/opentripplanner/OpenTripPlanner/pull/5977)
- Add debug information for stop/quay ID and stay-seated transfers [#5962](https://github.com/opentripplanner/OpenTripPlanner/pull/5962)
- Handle NeTEx `any` version [#5983](https://github.com/opentripplanner/OpenTripPlanner/pull/5983)
- Keep at least one result for min-transfers and each transit-group in itinerary-group-filter [#5919](https://github.com/opentripplanner/OpenTripPlanner/pull/5919)
- Extract parking lots from NeTEx feeds [#5946](https://github.com/opentripplanner/OpenTripPlanner/pull/5946)
- Filter routes and patterns by service date in GTFS GraphQL API [#5869](https://github.com/opentripplanner/OpenTripPlanner/pull/5869)
[](AUTOMATIC_CHANGELOG_PLACEHOLDER_DO_NOT_REMOVE)

## 2.5.0 (2024-03-13)
Expand Down
Loading

0 comments on commit d3685d3

Please sign in to comment.