Skip to content

Commit

Permalink
Merge pull request hasadna#305 from yardenmezi/adding-tooltip-spinner
Browse files Browse the repository at this point in the history
Adding tooltip to spinner when loading times
  • Loading branch information
yardenmezi authored Dec 16, 2023
2 parents a2f93ea + c7d7cd1 commit 36524ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@
"from_date": "dated",
"to_date": "Until",
"watch_locations_in_range": "View bus locations within a range of",
"minutes": "דקות",
"minutes_5": "5 דקות",
"minutes": "minutes",
"minutes_5": "5 minutes",
"show_x_bus_locations": "Bus locations",
"from_time_x_to_time_y": "From XXX to YYY",
"choose_start_time": "Select a start time",
"loading_times_tooltip_content": "Loading bus times. Current times available to use",
"group_by_hour_tooltip_content": "Kibbutz by hour",
"start": "start",
"end": "end",
Expand Down
1 change: 1 addition & 0 deletions src/locale/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"show_x_bus_locations": "מיקומי אוטובוסים",
"from_time_x_to_time_y": "משעה XXX עד שעה YYY",
"choose_start_time": "בחירת שעת התחלה",
"loading_times_tooltip_content": "שעות נוספות בטעינה. ניתן להשתמש בשעות הזמינות כבר עכשיו",
"group_by_hour_tooltip_content": "קיבוץ לפי שעה",
"start": "התחלה",
"end": "סיום",
Expand Down
11 changes: 9 additions & 2 deletions src/pages/singleLineMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ import getAgencyList, { Agency } from 'src/api/agencyList'
import { VehicleLocation } from 'src/model/vehicleLocation'
import { getColorByHashString } from '../dashboard/AllLineschart/OperatorHbarChart/utils'
import { DateSelector } from '../components/DateSelector'
import { CircularProgress } from '@mui/material'
import { CircularProgress, Tooltip } from '@mui/material'
import { FilterPositionsByStartTimeSelector } from '../components/FilterPositionsByStartTimeSelector'
import { PageContainer } from '../components/PageContainer'
import { busIcon, busIconPath } from '../components/utils/BusIcon'
import { BusToolTip } from 'src/pages/components/MapLayers/BusToolTip'
import { t } from 'i18next'

interface Path {
locations: VehicleLocation[]
Expand Down Expand Up @@ -235,7 +236,13 @@ function FilterPositionsByStartTime({
<Grid xs={3}>
<Label text={TEXTS.choose_start_time} />
</Grid>
<Grid xs={1}>{locationsIsLoading && <CircularProgress />}</Grid>
<Grid xs={1}>
{locationsIsLoading && (
<Tooltip title={t('loading_times_tooltip_content')}>
<CircularProgress />
</Tooltip>
)}
</Grid>
<Grid xs={8}>
<FilterPositionsByStartTimeSelector
options={options}
Expand Down

0 comments on commit 36524ca

Please sign in to comment.