Skip to content

Add configurable popups on markers#339

Merged
PartyNell merged 26 commits intomasterfrom
make_labels_configurable
Nov 13, 2025
Merged

Add configurable popups on markers#339
PartyNell merged 26 commits intomasterfrom
make_labels_configurable

Conversation

@PartyNell
Copy link
Contributor

Description

This PR adds configurable popups on map markers.

Hover behavior remains unchanged - the object's name is still displayed on hover:

Capture d'écran du 2025-10-28 08-35-46

Click behavior now opens a popup displaying additional information and a button to navigate to the object's detail page. By default, the popup shows the object's name (if the model has a name field):

Capture d'écran du 2025-10-28 08-36-08

Customization is available through the LABEL_PER_MODEL setting. This allows you to configure which fields are displayed in the popup for each model (see documentation for setup details).

⚠️ Note: LABEL_PER_MODEL is a setting for applications using MapEntity, not a MapEntity setting itself.

Example of a customized popup:

Capture d'écran du 2025-10-28 08-35-37

Fields specified in LABEL_PER_MODEL that don't exist on the model or have empty values will be automatically excluded from the popup display.

Related Issue

@PartyNell PartyNell requested review from Chatewgne and submarcos and removed request for Chatewgne October 28, 2025 07:57
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.97%. Comparing base (fdb4728) to head (62c9c22).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #339      +/-   ##
==========================================
+ Coverage   90.94%   91.97%   +1.02%     
==========================================
  Files          33       33              
  Lines        2452     2479      +27     
==========================================
+ Hits         2230     2280      +50     
+ Misses        222      199      -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PartyNell PartyNell changed the base branch from master to fix_test_content_type November 5, 2025 09:03
@PartyNell PartyNell force-pushed the make_labels_configurable branch from a7df4a9 to a7c624e Compare November 5, 2025 09:13
Co-authored-by: Jean-Etienne Castagnede <j.e.castagnede@gmail.com>
Base automatically changed from fix_test_content_type to master November 5, 2025 10:16
@PartyNell PartyNell merged commit bc97e15 into master Nov 13, 2025
13 checks passed
@PartyNell PartyNell deleted the make_labels_configurable branch November 13, 2025 16:20
PartyNell added a commit that referenced this pull request Jan 6, 2026
submarcos added a commit that referenced this pull request Jan 28, 2026
* change logout to POST in template (PR #322)

* replace flake8 to ruff (PR #323)

* minor fixes (PR #324)

* Bump actions/checkout from 4 to 5 (PR #325)

* Add locate control on map (PR #326)

* replace flake8 to ruff (PR #323) - add test_app in the tested folders

* Improve responsive design (PR #327)

* Bump actions/setup-python from 5 to 6 (PR #328)

* Add logo (PR #329)

* Improve list : button, blocks and title (PR #332)

* Upgrade datatables to v2 (PR #333)

* Bump github/codeql-action from 3 to 4 (PR #334)

* Fix tests with Faker (PR #336)

* Add configurable popups on markers (PR #339)

* Fix decorator to deal with extra view kwargs (PR #340)

* Fix selected layers in screenshot (PR #341)

* Fix get_expected_datatables_attrs content type in tests (PR #342)

* Fix selected filters and overlays when coming back on list view (PR #343)

* fix username factory to prevent multiple usages (PR #344)

* Bump actions/checkout from 5 to 6 (PR #347)

* Update changelogs

* Update translations

* Fix test_crud_status

* Move mapentity_detail_pdf.css in templates

* Fix the tooltip display when hovering over a feature

* Fix highligh features on map when navigating in the list

* Fix updateFromPks

* Fix jumpTo behaviour

* Add bulk actions (delete & edit) on list views / Fix batch deletion/update (PRs #348 & #352)

* fix: duplicated translated fields when no layout (PR #351)

* Fix map context

* Display related fields as string representations in lists (PR #353)

* Enhance responsive layout for multi-update form (PR #355)

* add JavaScriptCatalog URL and script for i18n support

* Fix geometries creation with geoman

* Update geoman version to 0.6.1

* Update settings find location

* Stop propagation of click event on layer to avoid fetching multiple time the same data

* Listen layer event only on the manage layers in MapEntityObjectsLayer

* Fix name search in list view (WARNING: if the interface is in a language and the name isn't define for this language it will not return information)

* Fix filter button color

* Translate map controllers tooltips

* Add maxZoom setting for map

* Migrate additionnal layers generation in MapEntity

* Fix tooltip

* Fix quality

* Fix tests

* remove leaflet dependency and related references (#357)

* remove leaflet dependency and related references

* Enhance geometry handling and error messaging in Maplibre integration

* Enhance geometry handling and error messaging in Maplibre integration

* Add demo settings and update Docker configuration for demo environment

* Add PostgreSQL database configuration to demo settings

* Add PostgreSQL database configuration to demo settings

* Enable secure cookies for session and CSRF protection

* Enable secure cookies for session and CSRF protection

* Enable secure cookies for session and CSRF protection

* Enable secure cookies for session and CSRF protection

* Enable secure cookies for session and CSRF protection

* Refactor code for consistency and readability

* change bounds

---------

Co-authored-by: J-E Castagnede <j.e.castagnede@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants