Minor fixes and UI polish #10
Open
awesomerobot wants to merge 6 commits into
Open
Conversation
a0842a3 to
2b9bc4a
Compare
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).
2b9bc4a to
816e44b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
canParkstayed false on time-limited no-parking zones. A segment whose only policy is "No Parking Tue 12 - 4" rendered red on every day/time, becausecanParkonly 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.console.log('Got Unusable')fires once per unusableimage policy. Lots of console noise.UX polish (some of this is from issue #4)
#FB4D42("Freedom Trail Red") commented out already, just flipped to it. Also fixed a wrong color comment (unusableImagewas labeled "Red" but renders gray).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.