Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tooltip to spinner when loading times #305

Merged
merged 8 commits into from
Dec 16, 2023
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
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
Loading