Skip to content

Commit 5fec9f2

Browse files
authored
Merge pull request #40 from citizenlabsgr/more-overrides
Add more parking overrides
2 parents a00cc45 + d06a367 commit 5fec9f2

7 files changed

Lines changed: 65 additions & 7 deletions

File tree

data/overrides.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,5 +132,62 @@
132132
},
133133
"hidden": true,
134134
"note": "This is a fire station."
135+
},
136+
{
137+
"category": "private-garage",
138+
"location": {
139+
"latitude": 42.96592,
140+
"longitude": -85.67298
141+
},
142+
"hidden": true,
143+
"note": "Google Street View shows Tenant Parking Only."
144+
},
145+
{
146+
"category": "private-garage",
147+
"location": {
148+
"latitude": 42.969591,
149+
"longitude": -85.669295
150+
},
151+
"hidden": true,
152+
"note": "Google Street View shows private property."
153+
},
154+
{
155+
"category": "private-lot",
156+
"location": {
157+
"latitude": 42.963462,
158+
"longitude": -85.670913
159+
},
160+
"pricing": {
161+
"hourly": 1.75
162+
},
163+
"note": "These appear to be metered parking spots on Google Street View."
164+
},
165+
{
166+
"category": "private-lot",
167+
"location": {
168+
"latitude": 42.962573,
169+
"longitude": -85.673628
170+
},
171+
"name": "Market Ave Event Lot",
172+
"owner": "AirGarage",
173+
"address": "32 Market Ave SW, Grand Rapids, MI 49503",
174+
"pricing": {
175+
"hourly": 8.0
176+
},
177+
"note": "https://www.airgarage.com/location/market-ave-event-lot-grand-rapids-mi"
178+
},
179+
{
180+
"category": "private-lot",
181+
"location": {
182+
"latitude": 42.972258,
183+
"longitude": -85.679261
184+
},
185+
"name": "Golden Saint Parking",
186+
"owner": "AirGarage",
187+
"address": "423 First St NW, Grand Rapids, MI 49504",
188+
"pricing": {
189+
"hourly": 2.0
190+
},
191+
"note": "https://www.airgarage.com/location/golden-saint-parking-grand-rapids-mi"
135192
}
136193
]

src/bootstrap.mjs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,9 +1571,8 @@ function renderDataView() {
15711571
</div>
15721572
</div>
15731573
<div class="data-routes-toolbar__dataset">
1574-
<label for="data-routes-dataset" class="data-view-filter-row__label">Dataset:</label>
15751574
<div class="data-routes-dataset-dropdown relative min-w-[11rem]">
1576-
<button type="button" id="data-routes-dataset" disabled class="data-view-dataset-trigger flex w-full items-center gap-2 rounded-lg border border-slate-300 bg-slate-50 px-3 py-2 text-left text-sm text-slate-700 cursor-default" aria-label="Dataset (Public Bus Routes)" aria-haspopup="listbox" aria-expanded="false" aria-disabled="true"><span class="min-w-0 flex-1 truncate">Public Bus Routes</span><span class="shrink-0 text-slate-500" aria-hidden="true">▾</span></button>
1575+
<button type="button" id="data-routes-dataset" disabled class="data-view-dataset-trigger flex w-full items-center gap-2 rounded-lg border border-slate-300 bg-slate-50 px-3 py-2 text-left text-sm text-slate-700 cursor-default" aria-label="All Datasets" aria-haspopup="listbox" aria-expanded="false" aria-disabled="true"><span class="min-w-0 flex-1 truncate">All Datasets</span><span class="shrink-0 text-slate-500" aria-hidden="true">▾</span></button>
15771576
</div>
15781577
</div>
15791578
</div>
@@ -1815,10 +1814,10 @@ function renderDataView() {
18151814
.join("");
18161815
const triggerInner =
18171816
effectiveKey === ""
1818-
? `<span class="flex min-w-0 flex-1 items-center gap-2"><span class="inline-flex shrink-0 items-center gap-0.5" aria-hidden="true">${allSwatchesMini}</span><span class="whitespace-nowrap">All</span></span><span class="ml-auto shrink-0 text-slate-500" aria-hidden="true">▾</span>`
1817+
? `<span class="flex min-w-0 flex-1 items-center gap-2"><span class="inline-flex shrink-0 items-center gap-0.5" aria-hidden="true">${allSwatchesMini}</span><span class="whitespace-nowrap">All Datasets</span></span><span class="ml-auto shrink-0 text-slate-500" aria-hidden="true">▾</span>`
18191818
: `<span class="flex min-w-0 flex-1 items-center gap-2">${parkingDatasetSwatchHtml(styleForParkingDatasetKey(effectiveKey))}<span class="whitespace-nowrap">${escapeHtml(categoryNames[effectiveKey] || effectiveKey)}</span></span><span class="ml-auto shrink-0 text-slate-500" aria-hidden="true">▾</span>`;
18201819
const menuRows = [
1821-
`<button type="button" role="option" class="data-parking-dataset-option flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-slate-50${effectiveKey === "" ? " bg-slate-100" : ""}" data-dataset-value="" aria-selected="${effectiveKey === "" ? "true" : "false"}"><span class="inline-flex shrink-0 items-center gap-0.5" aria-hidden="true">${allSwatchesMini}</span><span>All</span></button>`,
1820+
`<button type="button" role="option" class="data-parking-dataset-option flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-slate-50${effectiveKey === "" ? " bg-slate-100" : ""}" data-dataset-value="" aria-selected="${effectiveKey === "" ? "true" : "false"}"><span class="inline-flex shrink-0 items-center gap-0.5" aria-hidden="true">${allSwatchesMini}</span><span>All Datasets</span></button>`,
18221821
...keysForDropdown.map((p) => {
18231822
const label = categoryNames[p.key] || p.file;
18241823
const sel = effectiveKey === p.key;
@@ -1840,7 +1839,6 @@ function renderDataView() {
18401839
${modeButtonsHtml}
18411840
</div>
18421841
<div class="data-view-filter-row data-parking-toolbar__dataset">
1843-
<label for="data-parking-dataset" class="data-view-filter-row__label">Dataset:</label>
18441842
<div class="data-parking-dataset-dropdown relative">
18451843
<button type="button" id="data-parking-dataset" class="data-parking-dataset-trigger flex w-full items-center gap-2 rounded-lg border border-slate-300 bg-white px-3 py-2 text-left text-sm text-slate-800 hover:bg-slate-50" aria-haspopup="listbox" aria-expanded="false">${triggerInner}</button>
18461844
<div id="data-parking-dataset-panel" class="data-parking-dataset-panel absolute right-0 top-full z-[1000] mt-1 hidden max-h-[min(24rem,70vh)] w-max min-w-full overflow-auto rounded-lg border border-slate-200 bg-white py-1 shadow-lg" role="listbox" aria-label="Parking dataset">${menuRows}</div>

src/styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ body.parking-legend-modal-open {
340340
justify-content: center;
341341
min-width: 0;
342342
overflow: visible;
343+
gap: 0.5rem 1.5rem;
343344
}
344345

345346
.data-parking-toolbar__dataset {
@@ -445,7 +446,7 @@ body.parking-legend-modal-open {
445446
flex-wrap: nowrap;
446447
align-items: center;
447448
justify-content: center;
448-
gap: 1rem;
449+
gap: 1.5rem;
449450
max-width: 100%;
450451
min-width: 0;
451452
}

tests/data.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ test.describe("Data routes", () => {
8585
await expect(
8686
page.locator("#data-parking-dataset.data-parking-dataset-trigger"),
8787
).toBeVisible();
88-
await expect(page.locator("#data-parking-dataset")).toContainText("All");
88+
await expect(page.locator("#data-parking-dataset")).toContainText(
89+
"All Datasets",
90+
);
8991
await expect(page.locator("#dataViewMap")).toBeVisible();
9092
});
9193

-1.36 KB
Loading

tests/snapshots/data-parking.png

420 Bytes
Loading

tests/snapshots/data-routes.png

-1.4 KB
Loading

0 commit comments

Comments
 (0)