Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
40 changes: 20 additions & 20 deletions __tests__/components/viewers/__snapshots__/nearby-view.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4840,7 +4840,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -5268,7 +5268,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -5696,7 +5696,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -8314,7 +8314,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<Connect(StopCardHeader)
actionIcon={
Expand Down Expand Up @@ -16617,7 +16617,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<Connect(StopCardHeader)
actionIcon={
Expand Down Expand Up @@ -21657,7 +21657,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -22085,7 +22085,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -22513,7 +22513,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -25439,7 +25439,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<Connect(StopCardHeader)
actionIcon={
Expand Down Expand Up @@ -33293,7 +33293,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -33721,7 +33721,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -34149,7 +34149,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -34577,7 +34577,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -35005,7 +35005,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -36819,7 +36819,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<Connect(StopCardHeader)
actionIcon={
Expand Down Expand Up @@ -41883,7 +41883,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -44397,7 +44397,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<Connect(StopCardHeader)
actionIcon={
Expand Down Expand Up @@ -52130,7 +52130,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<Connect(StopCardHeader)
actionIcon={
Expand Down Expand Up @@ -61733,7 +61733,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<styled.div>
<div
Expand Down Expand Up @@ -64351,7 +64351,7 @@ exports[`components > viewers > nearby view renders proper scooter dates 1`] = `
>
<styled.div>
<div
className="sc-DJgqy hBRUWj"
className="sc-DJgqy hRwxkI"
>
<Connect(StopCardHeader)
actionIcon={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,96 +175,6 @@ exports[`components > viewers > stop viewer should render with initial stop id a
<div
className="stop-viewer-header"
>
<div
className="back-button-container"
>
<Button
active={false}
block={false}
bsClass="btn"
bsSize="small"
bsStyle="default"
disabled={false}
onClick={[Function]}
>
<button
className="btn btn-sm btn-default"
disabled={false}
onClick={[Function]}
type="button"
>
<IconWithText
Icon={
Object {
"$$typeof": Symbol(react.forward_ref),
"displayName": "ArrowLeft",
"render": [Function],
}
}
>
<div
style={
Object {
"display": "contents",
}
}
>
<Styled(styled.span)>
<span
className="sc-hkwmXC sc-bSFUlv eFsrhn gAUjbw"
>
<ArrowLeft>
<StyledIconBase
iconAttrs={
Object {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
}
}
iconVerticalAlign="middle"
iconViewBox="0 0 448 512"
>
<ForwardRef
className="StyledIconBase-sc-ea9ulj-0 fqiNOa"
iconAttrs={
Object {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
}
}
iconVerticalAlign="middle"
iconViewBox="0 0 448 512"
>
<svg
aria-hidden="true"
className="StyledIconBase-sc-ea9ulj-0 fqiNOa"
fill="currentColor"
focusable="false"
viewBox="0 0 448 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"
fill="currentColor"
/>
</svg>
</ForwardRef>
</StyledIconBase>
</ArrowLeft>
</span>
</Styled(styled.span)>
<span>
<FormattedMessage
id="common.forms.back"
>
common.forms.back
</FormattedMessage>
</span>
</div>
</IconWithText>
</button>
</Button>
</div>
<styled.div>
<div
className="sc-bTRMho cgDuJk"
Expand Down
2 changes: 2 additions & 0 deletions example/example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,8 @@ disableSingleItineraryDays: false
# hideRouteShapesWithinFlexZones: true
# # Setting to sort routes by the number of vehicles on each pattern
# sortRoutePatternsByVehicleCount: true
# # Whether to use the route color as the pattern viewer background
# useRouteColorAsBackground: true
# # Disable vehicle highlight if necessary (e.g. custom or inverted icons)
# vehicleIconHighlight: true
# # Customize vehicle icon padding (the default iconPadding is 2px in otp-ui)
Expand Down
16 changes: 6 additions & 10 deletions lib/components/form/advanced-settings-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ import { blue, getBaseColor } from '../util/colors'
import { ComponentContext } from '../../util/contexts'
import { generateModeSettingValues } from '../../util/api'
import { getDependentName } from '../../util/user'
import { invisibleCss } from '../util/invisible-a11y-label'
import { User } from '../user/types'
import BackButton from '../util/back-button'

import {
addCustomSettingLabels,
Expand All @@ -44,7 +46,6 @@ import {
setModeButton,
tripPlannerValidationErrors
} from './util'
import { invisibleCss } from '../util/invisible-a11y-label'
import { setModeButtonEnabled } from './batch-settings'
import { styledCheckboxCss } from './styled'
import DateTimeModal from './date-time-modal'
Expand Down Expand Up @@ -274,16 +275,11 @@ const AdvancedSettingsPanel = ({
return (
<PanelOverlay className="advanced-settings" ref={innerRef}>
<HeaderContainer>
<CloseButton
aria-label={closeButtonText}
<BackButton
backButtonText={closeButtonText}
id="close-advanced-settings-button"
onClick={() => {
closePanel()
}}
title={closeButtonText}
>
<ArrowLeft size={22} />
</CloseButton>
onClick={closePanel}
/>
<h1 className="header-text">{headerText}</h1>
</HeaderContainer>
<DtSelectorContainer>
Expand Down
1 change: 1 addition & 0 deletions lib/components/mobile/mobile.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@
}

.otp.mobile .route-viewer-header {
padding: 12px;
margin: 0;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/components/mobile/pattern-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MobilePatternViewer extends Component {
/>
<main tabIndex={-1}>
<div className="viewer-container">
<PatternViewer hideBackButton ModeIcon={ModeIcon} />
<PatternViewer ModeIcon={ModeIcon} />
</div>

{/* The map is less important semantically, so keyboard focus and screen readers
Expand Down
2 changes: 1 addition & 1 deletion lib/components/mobile/route-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MobileRouteViewer extends Component {
/>
<main tabIndex={-1}>
<div className="viewer-container">
<RouteViewer hideBackButton hideHeader ModeIcon={ModeIcon} />
<RouteViewer hideHeader ModeIcon={ModeIcon} />
</div>

{/* The map is less important semantically, so keyboard focus and screen readers
Expand Down
2 changes: 1 addition & 1 deletion lib/components/mobile/stop-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const MobileStopViewer = ({ setViewedStop }: Props) => {
/>
<main tabIndex={-1}>
<div className="viewer-container">
<StopScheduleViewer hideBackButton />
<StopScheduleViewer />
</div>

{/* The map is less important semantically, so keyboard focus and screen readers
Expand Down
2 changes: 1 addition & 1 deletion lib/components/mobile/trip-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const MobileTripViewer = ({ setViewedTrip }: Props) => {
/>
<main tabIndex={-1}>
<div className="viewer-container">
<TripViewer hideBackButton />
<TripViewer hideHeader />
</div>

{/* The map is less important semantically, so keyboard focus and screen readers
Expand Down
Loading
Loading