Skip to content

Commit

Permalink
Merge branch 'dev' into trip-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup authored Oct 1, 2024
2 parents af5f569 + 8c85cb8 commit 861323a
Show file tree
Hide file tree
Showing 37 changed files with 2,451 additions and 1,296 deletions.
1,470 changes: 870 additions & 600 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 @@ -211,7 +211,7 @@ exports[`components > viewers > stop viewer should render with initial stop id a
>
<Styled(styled.span)>
<span
className="sc-jifHHV sc-hkwmXC frJUIW gWGcte"
className="sc-hkwmXC sc-bSFUlv eFsrhn gAUjbw"
>
<ArrowLeft>
<StyledIconBase
Expand Down Expand Up @@ -267,11 +267,11 @@ exports[`components > viewers > stop viewer should render with initial stop id a
</div>
<styled.div>
<div
className="sc-hJxDiT dbjOgr"
className="sc-liccgK jihWTk"
>
<styled.div>
<div
className="sc-jlIlqL sdJoA"
className="sc-iWRHom bUIXtU"
>
<h1>
<FormattedMessage
Expand Down
2 changes: 2 additions & 0 deletions __tests__/test-utils/mock-data/fileMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const mockImg = ''
export default mockImg
14 changes: 14 additions & 0 deletions example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ persistence:
# iconUrl: ''
# href: ''

### These settings are only used for the field trip features.
dateTime:
timeFormat: h:mm a
dateFormat: MM/dd/yyyy

map:
initLat: 45.52
initLon: -122.682
Expand Down Expand Up @@ -411,6 +416,8 @@ itinerary:
displayA11yError: false
# Whether to display itinerary info in the side of the preview or next to the departure times
showInlineItinerarySummary: false
# Whether to sync the sort type with the depart/arrive time in the date/time modal
syncSortWithDepartArrive: true
# The sort option to use by default
# Available sort options: 'BEST', 'DURATION', 'ARRIVALTIME', 'WALKTIME', 'COST', 'DEPARTURETIME'
# defaultSort: "BEST" # Default
Expand All @@ -426,6 +433,11 @@ itinerary:
# - 'DEPARTURETIME'
# In the batch itinerary UI, this setting will always show both departure/arrival times
alwaysShowBothTimes: false
advancedSettingsPanel:
# Show button in advanced panel that allows users to save and return
saveAndReturnButton: true
# Prevent users from selecting a single day for saving trips.
disableSingleItineraryDays: false

# The transitOperators key is a list of transit operators that can be used to
# order transit agencies when sorting by route. Also, this can optionally
Expand Down Expand Up @@ -677,6 +689,8 @@ itinerary:
# sessionTimeoutSeconds: 180

# nearbyView:
### Setting to use arrival time instead of departure time in the nearby view.
# useArrivalTime: true
### Setting to hide stops with no depatures in the nearby view.
# hideEmptyStops: true
### What radius should the nearby query get results within? (in meters)
Expand Down
9 changes: 9 additions & 0 deletions i18n/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,15 @@ components:
BatchRoutingPanel:
shortTitle: Plan Trip
BatchSearchScreen:
advancedHeader: Advanced Preferences
header: Plan Your Trip
modeOptions: Mode Options
modeSelectorLabel: Select a travel mode
moreOptions: More options
saveAndReturn: Save and return
saved: Saved
submodeSelectorLabel: Select travel modes and submodes
tripOptions: Trip Options
BatchSettings:
destination: destination
invalidModeSelection: >-
Expand Down Expand Up @@ -357,6 +364,7 @@ components:
distanceAway: "{localizedDistanceString} away"
error: An error occurred loading nearby amenities.
header: Nearby View
headsign: "{destination}"
nearbyListIntro: List of {count} nearby entities.
nothingNearby: There are no places nearby.
spacesAvailable: "{spacesAvailable} empty spaces available"
Expand Down Expand Up @@ -526,6 +534,7 @@ components:
SavedTripScreen:
itineraryLoaded: Itinerary loaded
itineraryLoading: Loading itinerary
selectAtLeastOneDay: Please select at least one day to monitor.
tooManyTrips: >
You already have reached the maximum of five saved trips. Please remove
unused trips from your saved trips, and try again.
Expand Down
9 changes: 9 additions & 0 deletions i18n/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,15 @@ components:
BatchRoutingPanel:
shortTitle: Planifier un trajet
BatchSearchScreen:
advancedHeader: Préférences avancées
header: Votre trajet
modeOptions: Choix du mode
modeSelectorLabel: Sélectionnez un mode de déplacement
moreOptions: Plus d'options
saveAndReturn: Enregistrer et fermer
saved: Enregistré
submodeSelectorLabel: Sélectionnez vos modes et sous-modes de déplacement
tripOptions: Options concernant le trajet
BatchSettings:
destination: destination
invalidModeSelection: >-
Expand Down Expand Up @@ -376,6 +383,7 @@ components:
distanceAway: à {localizedDistanceString}
error: Erreur lors du chargement des services à proximité.
header: À proximité
headsign: "{destination}"
nearbyListIntro: Liste de {count} entités à proximité.
nothingNearby: Aucun lieu à proximité.
spacesAvailable: "{spacesAvailable} emplacements libres disponibles"
Expand Down Expand Up @@ -551,6 +559,7 @@ components:
SavedTripScreen:
itineraryLoaded: Trajet chargé
itineraryLoading: Chargement du trajet
selectAtLeastOneDay: Veuillez choisir au moins un jour pour le suivi.
tooManyTrips: >
Vous avez déjà atteint le nombre maximum de 5 trajets enregistrés.
Veuillez supprimer les trajets enregistrés qui sont inutilisés, puis
Expand Down
1 change: 1 addition & 0 deletions lib/actions/apiV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ export const fetchNearby = (position, radius) => {
stoptimesForPatterns {
pattern {
headsign
desc: name
route {
agency {
name
Expand Down
5 changes: 4 additions & 1 deletion lib/actions/field-trip.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,10 @@ function prepareQueryParams(request, outbound) {
}
const hasExistingLocations = currentQuery.from || currentQuery.to
const locations =
!hasExistingLocations || window.confirm('Overwrite existing locations?')
!hasExistingLocations ||
window.confirm(
'Use custom set locations? Pressing "Cancel" will use the locations you have typed in. Pressing "OK" will use the locations currently saved to the field trip'
)
? await planParamsToQueryAsync(locationsToGeocode, config)
: { from: currentQuery.from, to: currentQuery.to }
return dispatch(setQueryParam({ ...locations, ...queryParams }))
Expand Down
Loading

0 comments on commit 861323a

Please sign in to comment.