Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
483 changes: 368 additions & 115 deletions __tests__/components/viewers/__snapshots__/nearby-view.js.snap

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ exports[`components > viewers > stop viewer should render with initial stop id a
}
>
<StopScheduleViewer
calendarMax="2026-12-31"
calendarMin="2025-01-01"
calendarMax="2027-12-31"
calendarMin="2026-01-01"
findStopTimesForStop={[Function]}
homeTimezone="America/Los_Angeles"
intl={
Expand Down
3 changes: 1 addition & 2 deletions lib/actions/apiV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,7 @@ export function findRoutes() {
).split('#')?.[1]

result[id] = {
agencyId: agency.id,
agencyName: agency.name,
agency,
color,
id,
longName,
Expand Down
3 changes: 2 additions & 1 deletion lib/components/viewers/route-name.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Route } from '@opentripplanner/types'
import React, { ComponentType } from 'react'
import styled from 'styled-components'

Expand Down Expand Up @@ -30,7 +31,7 @@ const RouteLongNameElement = styled.span`

interface MinimalLeg {
mode: string
routeColor: string
route: Route
}

interface RouteRendererProps {
Expand Down
8 changes: 4 additions & 4 deletions lib/util/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ export const getFilteredRoutes = createSelector(
(route) =>
(!filter.agency ||
getAgencyIdsForFilter(filter.agency, transitOperators).includes(
route.agencyId
route.agency.id
) ||
filter.agency === route.agencyName) &&
filter.agency === route.agency.name) &&
(!filter.mode || filter.mode === route.mode) &&
// If user search is active, filter by either the long/short name, or the route description
(!filter.search ||
Expand Down Expand Up @@ -516,9 +516,9 @@ export const getModesForActiveAgencyFilter = createSelector(
route.mode &&
(!filter.agency ||
getAgencyIdsForFilter(filter.agency, transitOperators).includes(
route.agencyId
route.agency.id
) ||
filter.agency === route.agencyName)
filter.agency === route.agency.name)
)
.map((route) => route.mode)
.filter((mode) => mode !== undefined)
Expand Down
9 changes: 2 additions & 7 deletions lib/util/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,18 +396,13 @@ export function generateFakeLegForRouteRenderer(
route,
onColoredBackground = false
) {
// RouteRenderer requires a "leg"
return {
agencyName: route?.agencyName || route.agency?.name,

agency: route.agency,
mode: getModeFromRoute(route),
// Don't render top border when colors are mismatched
onColoredBackground,
origColor: route.origColor,
routeColor: route.color,
routeLongName: route.longName,
routeShortName: route.shortName,
routeTextColor: route.textColor
route
}
}

Expand Down
Loading