Problem/Motivation
When creating a map views with geofield and leaflet, I would like to allow end-user update the exposed proximity filter original coordinates by:
- Moving the map with mouse click
- Capture the "moveend" Leaflet event with JS
- Using JQuery to update the exposed proximity filter original coordinates, with current map center Lat/Lng
- User click on "search" button will now showing an updated result, based on Lat/Lng just captured
From this point of view, end-user shouldn't manually update the exposed proximity filter form (both the operator for distance, Latitude and Longitude). The form should therefore set as visually-hidden with CSS.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3253231
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hswong3i commentedComment #3
hswong3i commentedComment #5
hswong3i commentedComment #6
lendude@hswong3i thanks for opening this and working on it.
Since this can be easily done with a hook or some CSS and it feels like an edge case that you would need to expose a filter and then hide it, I'm not sure we need to support this in core.
If we were to add it, it would need test coverage and an update path (and a test for this upgrade).
Comment #7
hswong3i commentedSome general use case I could think about:
I also give a try with https://www.drupal.org/project/geofield/issues/3253240 which is functioning only for geofied proximity exposed filter, but it looks too narrow implementation, which could be much better if natively supported by Drupal core.
Comment #8
hswong3i commentedAnyway, the newly added "visually_hidden" checkbox is showing, but once click on save and reload the filter setting, the value of "visually_hidden" couldn't be saved correctly...
Comment #9
hswong3i commented@Lendude agree that the price performance ratio for this issue is not good enough, where themer could simply set "visibility: hidden" with CSS, so let's keep Drupal core simple stupid ;-)
Comment #10
lendudeThanks for reporting back @hswong3i
And thanks for pointing to #2455981: Allow hiding selected operators when exposing filter operators so I could close that, because we landed that feature in #1886018: Make it possible to configure exposed filter operators!