-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/1.x/area and ux #24
Conversation
Originally the thought had been to have a calculated label, but it makes more sense to have something calculated once, and a field that can be used to filter/search in views and search_api. Default token for address bundle is included, and in the update. An area #1 bundle might want a manually written label?
Split address implementation into separate submodule mainly for better testing.
Originally the thought had been to have a calculated label, but it makes more sense to have something calculated once, and a field that can be used to filter/search in views and search_api. Default token for address bundle is included, and in the update. An area #1 bundle might want a manually written label?
Split address implementation into separate submodule mainly for better testing.
…eature/1.x/area-and-ux
Works better ootb certainly with some geocoders. Ideal world would mix auto complete on the address field with selecting the location on the map.
¹ This can be even better. Longer term aim to provide button or autocomplete on the address field to show a list of results from geocoder that can then be selected to update the point on the map. But as an incremental change the button is already an improvement in UX. |
@willguv This is on test.localgovdrupal.org |
Thanks @ekes. I guess we need some acceptance tests for these, but here's a couple of things I've spotted When creating a new location:
When editing an existing location:
|
I did that. United Kingdom is returned in all those searches.
Yes that's Null Island. (0, 0) No result. My follow-up #24 (comment) will make that even more explicit (like showing what there is when there is). One thing to try, just to get a feel for what there is now is try just Eastbourne first; or Grove Road etc.
The ones from Croydon localgovdrupal/localgov_directories#14 (comment)
Should be configurable somewhere.
Certainly configurable. We're not really using it either. |
However it should have found that particular address, even with openstreet map nominatim. https://nominatim.openstreetmap.org/ui/search.html?q=1+Grove+Road%2C+Eastbourne%2C+BN21+4UG And it does on my local copy. test.localgov doesn't seem to be responding at the moment. I'll debug why it's not doing it there when I can. Also when it doesn't find a result it displays to the user 'Couldn't find a result for xxxxxxx' (where xxxxxx is the address it searched for). |
https://test.localgovdrupal.org/admin/content/geo/15 This seems to be something about the config that's ended up on test. It does seem to be geocoding the address (see link above), and the Lon Lat is updated, but the visualisation on the map on the form isn't. |
@ekes @willguv I have redeployed the https://test.localgovdrupal.org/ site so we can test the workflow stuff. I have redeployed this work as well, but any manual changes will have been lost. |
@finnlewis take a look! |
Hi @ekes I'm checking this today and will add a few thoughts as I go - mostly niggly things now
The website encountered an unexpected error. Please try again later. Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.localgov_approvals_dashboard.approvals_dashboard" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php). |
I am reviewing the code. Will is facing PHP exceptions above. Things must be missing. I am checking the functioning part :) |
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.
As Steve has already pointed out, several config files have a UUID value in them :(
Impressive and fun to use. I didn't get any Twig error either :) Few small issues:
By default, Directory venue has only the Address bundle of the localgov_geo entity enabled. But the entity browser lists both Area and Address. If I select an "Area" and then try to save the Directory venue, it comes up with a form error. Thankfully the fix was easy. Here's a patch:
Please note that I have tried this on a fresh localgov install. I haven't tried the update hooks on an existing site. That's all. |
One last point: The repository config added to composer.json only takes effect in root level composer.json files AFAIK. So either this needs to be added to the root level composer.json or localgov_geo/composer.json should refer to a patch. |
I'm wondering if we should package with a default geocoder at all. This seems to be the source of the greatest number of bug reports and the intention is not that you actually use the default Nominatim geocoder. We could maybe set up one for the demo site with API keys etc. but it would mean that the demo install wouldn't work out of the box. Although it might be worth looking a what gets sent to Nominatim, because https://nominatim.openstreetmap.org/ui/search.html?q=CR0+1EA+UK https://nominatim.openstreetmap.org/ui/search.html?q=CR0+1EA More about that in the next comment. For reference the geocoders supported are https://packagist.org/providers/geocoder-php/provider-implementation if there's another common one used by Local Government that's not there we should be able to create one; but I think it covers most bases! |
If we get this in before the patch itself https://www.drupal.org/project/geocoder_ajax_prepopulate/issues/3182650#comment-14060179 (which is just waiting on a second review I think) we'll have to include it in the distro composer.json too. But |
Looks like something to do with workflow isn't working, not related to this patch. Guess that's already going in, and we can deploy again. |
Going to close this in favour of #29, but if folks don't like the address autocomplete we can always step back to here. |
Provides
New geo entity type for 'areas'
Updates 'address' type
Entity Browser
Provides a new entity browser to:
Installation
With composer, or manually making sure that geocoder ajax prepoulate module is on the issue branch that fixes it for inline entity reference
Test
Use with
feature/2.x/localgov-geo-browser
branch of LocalGov Directories which has Venue reconfigured to use the entity browser for addresses;Or manually 'Manage Form Display' of any location field to use
Entity browser: Geo Browser
(optionally with settingsSelection mode: Append to selection
,Entity display: Rendered entity
, 'View Mode: Default`)Enable/Disable bundles 'address' and 'area' on the allowed referenced bundles on the field as desired: ie you can have a field that may only target addresses, or areas, or one that can use both.