-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#7704] React maps #1513
[#7704] React maps #1513
Conversation
36978a9
to
e26c42f
Compare
1b6620e
to
74c94b7
Compare
d34e22c
to
2ec3e9d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
2ec3e9d
to
5b0cea6
Compare
} | ||
|
||
return ( | ||
<MapContainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we make the map containers all have lazy load?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a specific solution for that in your mind? Theoretically you could just lazy import any Map code within the projects by using React.lazy. Then we would not have to dictate every a4 project to be using lazy load.
} | ||
|
||
if (map._zoom === map.getMaxZoom() || (map._zoomSnap && Math.abs(map.getZoom() - map.getMaxZoom()) < map._zoomSnap)) { | ||
L.DomUtil.addClass(zoomInBtn, className) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to refactor all the leaflet-control-zoom-in
zoom-out `to be buttons otherwise it's not accessible via keyboard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @vellip, for the maps implementation—it's a great addition!
While exploring, I encountered a few areas for improvement:
-
Ensure keyboard navigation on maps. The leaflet elements don't seem to be accessible by default, so we might have to add some customizations here.
-
I would suggest adding lazy loading to the map container, for better performance.
-
Unstyled Toggle on /projekte/: The "Show Maps" toggle appears unstyled when not activated, affecting the visual consistency.
-
Responsive Design: The map container doesn't adjust to screen size, leading to readability challenges (desktop screen below).

- JavaScript Error: also on
/projekte
, I encountered a 'Uncaught (in promise) DOMException: The operation was aborted' error.
Additionally, on the /projekte/module/kiezkasse/?mode=map:
- The map doesn't reload upon refreshing the page, and displays an 'Error list is null' message, suggesting a potential issue with data handling or state management.
These observations should help in enhancing the functionality and user experience of the maps feature. Thanks again for your hard work!
5b0cea6
to
087bb8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly looks good from my side, some small notes
adhocracy4/maps_react/static/a4maps_react/__tests__/AddMarkerControl.jest.js
Show resolved
Hide resolved
which are designed to offer a unique interactivity and to display the data in a | ||
visually appealing and user-friendly manner. | ||
|
||
## Components List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More of a general reminder, this can also be done by us later: maybe have `## General`` section which mentions that django stores everything as geojson (which is LngLat) but leaflet needs coordinates as LatLng, might save someone a headache when debugging/working on maps in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I added most comments are in mB. Cheers!
14a4a74
to
38f880a
Compare
38f880a
to
48661d3
Compare
1155aa8
to
f6e827a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vellip left a note regarding the missing attribution and added some hacky code to load it from the style, would be cool if you could have a look at that as well :)
09938d4
to
3f8ddd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tasks