Provider Map takes a spreadsheet of organizations and turns it into a searchable, clickable map of the areas they serve. Those areas can be counties, parishes, boroughs, tribal nations, health districts, or anything else you can supply as GeoJSON. It is aimed at public agencies and non-profits that need to publish a "find a provider near you" directory.
The geometry is stored in Drupal and projected to SVG in the browser, so there is no mapping library, no tile server, no API key, and no third-party request after the page loads. Each region is a real <path> element with role="button", tabindex and an aria-label. The full directory is also rendered server side, so the page is usable before any JavaScript runs.
How it differs from similar projects
- Leaflet and Geofield Map plot points on a basemap and can do distance search. Provider Map has no basemap, no geocoding and no distance search. It answers the question "who serves this area" rather than "who is closest to this point", and draws a choropleth of service areas.
- Views with an exposed filter gives you a filterable list and no map. Provider Map ties the directory and the map together so that each one filters the other.
Notes for the reviewer
- No third-party libraries are bundled, and there are no contributed dependencies. It uses core's File, Filter, Options and User modules only.
- GitLab CI is enabled and passing: composer, composer-lint, cspell, eslint, phpcs, phpstan, stylelint and PHPUnit. Pipelines
- There are 52 PHPUnit tests across unit, kernel and functional, covering the CSV importer, the GeoJSON importer, the payload builder, entity lifecycle and the configuration upgrade path.
- Output is escaped throughout. The front-end JavaScript builds DOM nodes with textContent rather than innerHTML, since provider records are editorial content.
- Route access is permission based, with separate permissions for administering maps, viewing published maps, editing providers, and importing or exporting CSV.
- The example submodule ships entirely invented data: fictional organizations, 555-01xx telephone numbers and example.org addresses.
This is my first project as a maintainer on drupal.org, so I would welcome direct feedback on anything that falls short.
Comments
Comment #2
vishal.kadamComment #3
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #4
vishal.kadam1. FILE: README.md
The README file is missing the required section - Configuration.
2. FILE: provider_map.module
For a new module that aims to be compatible with Drupal 10 and Drupal 11, I would rather implement hooks as class methods as described in Support for object oriented hook implementations using autowired services.
3. FILE: src/Controller/ProviderMapController.php
Since that class does not use methods from the parent class, or it uses a single method from the parent class, it does not need to use
ControllerBaseas parent class.Controllers do not need to have a parent class; as long as they implement
\Drupal\Core\DependencyInjection\ContainerInjectionInterface, they are fine.4. FILE: src/Entity/ProviderMap.php, src/Entity/ProviderMapCategory.php, src/Entity/ProviderMapProvider.php, src/Entity/ProviderMapRegion.php, src/Plugin/Block/ProviderMapBlock.php
Projects that are compatible with Drupal 10 or higher versions should use attributes instead of annotations.
5. FILE: src/Routing/ProviderMapRoutes.php
FILE: src/Service/MapDataBuilder.php
FILE: src/Service/MapRenderer.php
FILE: src/Service/ProviderImporter.php
Modules which are compatible with Drupal 10 and higher versions are expected to use constructor property promotion.
Comment #5
aftrix commentedThanks for the review. Points 1, 3, 4 and 5 are done in c9a603c.
1. README now has a Configuration section.
3. ProviderMapController was using nothing at all from ControllerBase and CsvExportController was only using entityTypeManager(), so both now implement ContainerInjectionInterface and inject what they need. I also took ProviderDuplicateController off ControllerBase and gave it MessengerTrait and StringTranslationTrait, since t() and messenger() were the only reasons it was extending anything.
4. The four entities and the block plugin now use attributes. That had a nice side effect: the "@EntityType annotation is deprecated" notices that were appearing in the test run are gone.
5. Constructor property promotion is in for ProviderMapRoutes, MapDataBuilder, MapRenderer and ProviderImporter. In MapRenderer and ProviderImporter the stringTranslation assignment stayed in the constructor body, since that property comes from StringTranslationTrait and promoting it would redeclare the trait's property. Happy to change that if you would rather see it done another way.
The pipeline is green after the changes: https://git.drupalcode.org/project/provider_map/-/pipelines/929468
On point 2, I have a question rather than a change. The #[Hook] attribute and object oriented hook implementations landed in Drupal 11.1, but this branch declares ^10.3 || ^11, so converting provider_map.module would mean dropping Drupal 10 support. The module only implements two hooks, help and theme. Would you prefer that I narrow the requirement to ^11.1 and convert them, or keep the .module file while Drupal 10 is still supported? I am happy either way, I just did not want to quietly drop a supported core version.
Comment #6
vishal.kadamSee Backwards-compatible Hook implementation for Drupal versions from 10.1 to 11.0
Comment #7
avpadernoComment #8
aftrix commentedThank you, that was the piece I was missing. I had not seen the backwards compatible pattern, so I assumed converting meant dropping Drupal 10.
Point 2 is done in 0743d65:
src/Hook/ProviderMapHooks.php now holds hook_help() and hook_theme() as methods with the #[Hook] attribute, the class is registered as an autowired service, and provider_map.module keeps thin wrappers marked #[LegacyHook] that delegate to it. Drupal 11.1 and later call the class directly and skip the wrappers, and 10.3 calls the wrappers, so the logic only exists in one place. core_version_requirement stays ^10.3 || ^11.
I checked both hooks still fire after the change: the provider_map theme hook is registered, and hook_help returns its text through the module handler.
The pipeline is green: https://git.drupalcode.org/project/provider_map/-/pipelines/929711
That covers all five points from #4. Happy to keep going if anything else turns up.