City planning: geojson properties documentation, fixes on UX for history#205
Merged
peterdrier merged 11 commits intopeterdrier:mainfrom Apr 10, 2026
Merged
Conversation
davinov
commented
Apr 10, 2026
- Document the expected properties in the geojson files to upload
- Multiple fixes for the history panel
- history button is accessible when clicking on a barrio, in the popup (like the edit button)
- everyone can access it and preview it, but only editors can restore versions
- previewed zones are validated (check with the other barrios and the limit zones), but avoid conflict with their current version
- Move the admin button to the top right to avoid colliding with the rest of the action bar at the bottom
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
History (and Restore for editors) is now accessible from the zone click popup, removing the need to enter edit mode first. The toolbar history button is removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Track previewCampSeasonId in state so overlapsOtherCamps excludes the barrio whose history is being previewed, matching the existing behavior for edit mode via activeCampSeasonId. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Code ReviewOverall: Looks good — well-structured improvements to history panel UX, proper event listener attachment, and good localization coverage. A few items worth discussing below. Potential Issue: Hardcoded English strings in JavaScript
Authorization: canEdit vs IS_MAP_ADMIN for Restore
Defensive coding improvement
Minor: Nested wrapper divs in admin link
Note: GeoJSON property rename (sound_zone -> SoundZone)
Suggestions
Thanks for the contribution! 🎉 |
Owner
|
-- Peter here, don't worry about the localization yet, I haven't figured out a good way to do that in JS yet (unless you know one?) The rest are more informational.. I can wrap this up later when I get to merging.. |
- Support both SoundZone (PascalCase) and sound_zone (snake_case) GeoJSON property names to avoid breaking existing uploaded data - Add resp.ok guard in loadHistory to show error message on API failure - Simplify admin panel link markup by removing unnecessary wrapper divs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Keep history button from main in bottom toolbar, keep admin link at top-right from PR branch (no duplicate bottom admin link). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.