Enhancement: Remove jquery, update google maps, fix admin styling#99
Enhancement: Remove jquery, update google maps, fix admin styling#99
Conversation
# Conflicts: # django_google_maps/static/django_google_maps/js/google-maps-admin.js # django_google_maps/widgets.py
7942406 to
8054144
Compare
|
@RobKuipers - Would you mind taking a look at this? I've incorporated your other changes to remove jquery and fix the GeoPt comparisons and merged them into master already. This PR takes a different approach to loading the Google Maps javascript async without having to jump through hoops depending on the django version. I also updated the usage of the marker to the updated way Google prefers. There is still one warning about updating the Places API, but I've spent some time on it and it is significantly more involved. |
|
Hi, thanks for your reply and all the work you’ve done—great to see the marker warning resolved. I tested your changes and everything works really well. I do have some reservations about how the Google Maps script is being loaded. While I understand the desire to avoid version-specific logic for Django, this is actually a common pattern. As it stands, the script isn’t truly being loaded asynchronously:
This doesn't have the desired effect unless the async attribute is explicitly included:
Without the async attribute, the script executes immediately after it’s loaded—often before DOMContentLoaded—which can lead to tricky, timing-related bugs. Also, nice work on the admin styling! How about adding a As a small improvement, you might consider moving that inline styling into the CSS file. Thanks again! |
|
Hi, I hope you're doing well. Just checking in—any updates on this? |
…e-maps into update-google-maps # Conflicts: # django_google_maps/static/django_google_maps/js/google-maps-admin.js # django_google_maps/widgets.py
Hi @RobKuipers - wow, sorry time has gotten away from me. I just push up an adjustment to move the inline styling to the css file. Also - I adjusted the async bits to be like your PR in #94. Does this right to you? It seems to work ok for me under multiple versions of django. If it looks ok I can update the changelog, cut a v0.14.0, and publish it to pypi. I really appreciate your help and review with these improvements. |
|
Tested this on Django 5.2 — works excellent ✅
Only minor suggestion: consider adding: css to the CSS. Adds a little breathing room between address and the map. Thanks again for all the effort you’ve put into this project — really appreciate it! 🙏 |
No description provided.