diff --git a/index.css b/index.css index 6999c2b2f..697d3b1b6 100644 --- a/index.css +++ b/index.css @@ -74,7 +74,7 @@ input[type="text"]::-ms-clear { .slide-pane_from_left { margin: 52px auto 0 0; /* Keep pane from overflowing on smaller screens */ - height: calc(100vh - 52px); + height: calc(100% - 52px); } .slide-pane__content { @@ -111,9 +111,12 @@ input[type="text"]::-ms-clear { width: 100%; } -.app-menu a:hover, -.app-menu button:hover { - color: #4c97f5; +/* Prevents hover styles from getting triggered on mobile */ +@media (hover: hover) { + .app-menu a:hover, + .app-menu button:hover { + color: #4c97f5; + } } .app-menu a:focus, diff --git a/lib/actions/apiV2.js b/lib/actions/apiV2.js index 755026d13..23ed9b005 100644 --- a/lib/actions/apiV2.js +++ b/lib/actions/apiV2.js @@ -1,5 +1,6 @@ import { aggregateModes, + getBannedRoutesFromSubmodes, populateSettingWithValue } from '@opentripplanner/trip-form' import { createAction } from 'redux-actions' @@ -1041,7 +1042,6 @@ export function routingQuery(searchId = null, updateSearchInReducer) { const modeSettings = modeSettingDefinitions?.map( populateSettingWithValue(modeSettingValues) ) - // Get the raw query param strings to save for the rider's search history const rawModeButtonQP = urlSearchParams.get('modeButtons') const queryParamData = { @@ -1049,9 +1049,17 @@ export function routingQuery(searchId = null, updateSearchInReducer) { ...modeSettingValues } + const excludedRoutes = + config.routeModeOverrides && + getBannedRoutesFromSubmodes( + modeSettings, + config.routeModeOverrides + )?.join(',') + const baseQuery = { arriveBy, banned: { + routes: excludedRoutes || undefined, trips: bannedTrips }, date, diff --git a/lib/components/form/batch-settings.tsx b/lib/components/form/batch-settings.tsx index 15e3f95e8..2ed424732 100644 --- a/lib/components/form/batch-settings.tsx +++ b/lib/components/form/batch-settings.tsx @@ -115,13 +115,18 @@ function BatchSettings({ ) const addCustomSettingLabels = useCallback( - (msd: ModeSetting) => - msd.type === 'SUBMODE' - ? { - ...msd, - label: getFormattedMode(msd.addTransportMode.mode, intl) - } - : msd, + (msd: ModeSetting) => { + let modeLabel + // If we're using route mode overrides, make sure we're using the custom mode name + if (msd.type === 'SUBMODE') { + modeLabel = msd.overrideMode || msd.addTransportMode.mode + return { + ...msd, + label: getFormattedMode(modeLabel, intl) + } + } + return msd + }, [intl] ) diff --git a/lib/components/user/common/dropdown-options.tsx b/lib/components/user/common/dropdown-options.tsx index 42ef7524f..70667915b 100644 --- a/lib/components/user/common/dropdown-options.tsx +++ b/lib/components/user/common/dropdown-options.tsx @@ -22,22 +22,25 @@ export const Select = ({ label, name, onChange -}: SelectProps): JSX.Element => ( - // is kept outside of