Skip to content

Commit 51649b2

Browse files
authored
feat: finalize visualization UI (#1380)
1 parent 192f46b commit 51649b2

File tree

12 files changed

+1612
-421
lines changed

12 files changed

+1612
-421
lines changed

web-app/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@turf/center": "^6.5.0",
1414
"@types/i18next": "^13.0.0",
1515
"@types/leaflet": "^1.9.12",
16+
"@types/lodash": "^4.17.20",
1617
"@types/react-map-gl": "^6.1.7",
1718
"axios": "^1.7.2",
1819
"countries-list": "^3.1.1",
@@ -25,6 +26,7 @@
2526
"i18next-browser-languagedetector": "^8.0.0",
2627
"i18next-http-backend": "^2.5.2",
2728
"leaflet": "^1.9.4",
29+
"loadashes6": "^1.0.0",
2830
"maplibre-gl": "^5.7.0",
2931
"material-react-table": "^2.13.0",
3032
"mui-datatables": "^4.3.0",
@@ -33,6 +35,7 @@
3335
"pmtiles": "^4.3.0",
3436
"react": "^17.0.0 || ^18.0.0",
3537
"react-dom": "^17.0.0 || ^18.0.0",
38+
"react-draggable": "^4.5.0",
3639
"react-ga4": "^2.1.0",
3740
"react-google-recaptcha": "^3.1.0",
3841
"react-helmet-async": "^2.0.5",
@@ -43,6 +46,7 @@
4346
"react-redux": "^8.1.3",
4447
"react-router-dom": "^6.16.0",
4548
"react-scripts": "5.0.1",
49+
"react-window": "^2.1.2",
4650
"recharts": "^2.12.7",
4751
"redux-persist": "^6.0.0",
4852
"redux-saga": "^1.2.3",
@@ -108,6 +112,7 @@
108112
"@types/react-google-recaptcha": "^2.1.8",
109113
"@types/react-redux": "^7.1.27",
110114
"@types/react-router-dom": "^5.3.3",
115+
"@types/react-window": "^2.0.0",
111116
"@types/redux-saga": "^0.10.5",
112117
"@typescript-eslint/eslint-plugin": "^6.7.0",
113118
"@typescript-eslint/parser": "^6.7.0",

web-app/public/locales/en/feeds.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,53 @@
173173
"noRoutesData": "Could not load routes data for the map.",
174174
"invalidDataType": "This feed is not a GTFS Schedule feed.",
175175
"noBoundingBox": "No bounding box available."
176+
},
177+
"andMoreElements": "And {{count}} more...",
178+
"selectedRouteStops": {
179+
"title_one": "Stops from selected route",
180+
"title_other": "Stops from selected routes",
181+
"routeIds_one": "Route ID",
182+
"routeIds_other": "Route IDs",
183+
"stopId": "Stop ID:"
184+
},
185+
"scanning": {
186+
"titleLarge": "Scanning large feed…",
187+
"title": "Scanning the map…",
188+
"bodyLarge": "We’re indexing stops across the full extent. This might take a moment.",
189+
"body": "We’re indexing stops across the view to speed up filtering.",
190+
"gridTile": "Grid: {{grid}} • Tile {{tile}} / {{total}}",
191+
"percentComplete": "{{percent}}% complete"
192+
},
193+
"fullMapView": {
194+
"disabledTitle": "Full map view disabled",
195+
"disabledDescription": "The full map view feature is disabled at the moment. Please try again later.",
196+
"dataBlurb":"Tiles are built from the GTFS feed: we read routes.txt, trips.txt, stop_times.txt, stops.txt (and shapes.txt when present), derive routes/stops to GeoJSON, compile them with Tippecanoe into pmtiles files for map rendering.",
197+
"clearAll": "Clear All",
198+
"hideStops": "Hide Stops",
199+
"closePanel": "Close",
200+
"headers": {
201+
"routeTypes": "Route Types",
202+
"visibility": "Visibility",
203+
"routes": "Routes"
204+
},
205+
"backToMap": "Back To Map",
206+
"aria": {
207+
"close": "close",
208+
"refocus": "refocus",
209+
"mapStyle": "map style",
210+
"filter": "filter"
211+
},
212+
"style": {
213+
"title": "Map style",
214+
"stopSize": "Stop size",
215+
"size": {
216+
"small": "Small",
217+
"medium": "Medium",
218+
"large": "Large",
219+
"custom": "Custom"
220+
},
221+
"customStopRadiusAria": "Custom stop radius",
222+
"radius": "Radius: {{px}}px"
223+
}
176224
}
177225
}

web-app/src/app/components/CoveredAreaMap.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
210210
<GtfsVisualizationMap
211211
polygon={boundingBox ?? []}
212212
latestDataset={latestDataset}
213+
dataDisplayLimit={config.visualizationMapPreviewDataLimit}
214+
preview={true}
215+
filteredRoutes={[]} // this is necessary to re-renders
216+
filteredRouteTypeIds={[]}
213217
/>
214218
</>
215219
);

0 commit comments

Comments
 (0)