Skip to content

Minor fixes and UI polish #10

Open
awesomerobot wants to merge 6 commits into
OETBoston:mainfrom
awesomerobot:cleanups-upstream
Open

Minor fixes and UI polish #10
awesomerobot wants to merge 6 commits into
OETBoston:mainfrom
awesomerobot:cleanups-upstream

Conversation

@awesomerobot

Copy link
Copy Markdown

A handful of small, independent fixes I made while using the app on my fork. Putting them up here in case any are useful upstream. Each commit is self-contained so feel free to cherry-pick.

Bug fixes

  • canPark stayed false on time-limited no-parking zones. A segment whose only policy is "No Parking Tue 12 - 4" rendered red on every day/time, because canPark only flips true via positive "parking" rules. Added a permissive default at the end: if a zone has only restriction-style rules and none of them apply at the selected time, parking is allowed. Could repro this consistently on St James Street in Roxbury.
  • Stray console.log('Got Unusable') fires once per unusableimage policy. Lots of console noise.
  • Curb-zone click hit area was tight enough to miss. The 3 - 5px line layer has the click handler, clicks that landed a few px off did nothing and I found this made the map frustrating to use. Extracted the handler and bound it to the existing 12px emphasis-outline layer as well.

UX polish (some of this is from issue #4)

  • Rebrand "Chinatown Curb Map Demo" → "Boston Curb Map (BETA)" across the info modal, top-bar H1, and page title. Backend now has citywide data; the UI was the only place still calling itself a Chinatown demo. Closes the rebrand item in Feedback 2-17-26 #4 P0.
  • Freedom Trail Red for "no parking" segments. The file had #FB4D42 ("Freedom Trail Red") commented out already, just flipped to it. Also fixed a wrong color comment (unusableImage was labeled "Red" but renders gray).
  • Legend: "Unusable Image""Sign could not be read (regulation unknown)." Clarifies what this means.
  • Hide the unusable-image sentinel from the policy list when the zone has other policies. It carries no information at that point (the dashed line already conveys the data-quality signal), but it's kept when it's the only policy on the zone so the panel isn't empty.
  • Surface day-of-week per policy. Today the description text ("* No Parking 8:00 AM-12:00 PM") drops days_of_week, so a Tuesdays-only rule reads as if it applies every day. Added a small line under each policy: "Mon-Fri" / "Tue, Thu" / etc. Skipped when all 7 days are covered.

Backend has citywide data; only the UI still called itself a Chinatown
demo. Updates info modal, top-bar header, page title, and meta
description. Addresses issue OETBoston#4 P0 'Update H1 to BOSTON CURB MAP (BETA)'.
A zone whose only policy was 'No Parking Tue 12-4' rendered red on
every day/time. The main loop only flips canPark via positive 'parking'
rules, so without a positive rule the default never became true even
when the restriction wasn't active. Track whether any restriction is
firing now; if not, apply a permissive default at the end.
Mapbox line hit-detection on the 3-5 px curb line was tight enough
that users often missed by a couple px and clicks did nothing.
Extract the handler into a function and bind it to the existing
12 px emphasis-outline layer as well, so off-by-a-few-px clicks
still register.
The file already had #FB4D42 'Freedom Trail Red' commented out — flip
to it. Light variant gets a lightened version too. Comment on
unusableImage color was inaccurate ('Red'); actual value is gray.
Legend 'Unusable Image:' renamed to 'Sign could not be read
(regulation unknown):' to actually explain what users are seeing.
… exist

A zone with real policies often also carries the 'No Regulation /
Unusable Image' sentinel. Listing it next to real policies is noise;
the user already gets the data-quality signal from the dashed line
on the map. Drop it when other policies are present, but keep it when
it's the only thing on the zone so the list is never empty.
City policy descriptions ('* No Parking 8:00 AM-12:00 PM') drop the
day field, so a Tuesdays-only rule reads as if it applies everyday.
Pull days_of_week off the time_spans and render below the description.
Skip when all 7 days (no clarification needed); collapse Mon-Fri /
Mon-Sat to readable ranges. Also skip 'Last updated' when no
published_date is present (relevant for forks that synthesize policies).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant