- Issue created by @joshi.rohit100
- 🇮🇳India joshi.rohit100 Delhi, India
While I searched the issue queue, seems something similar like request was raised in past as well in https://www.drupal.org/project/geofield/issues/3042880 → and https://www.drupal.org/project/geofield/issues/3042880 →
I think this will be a good option if provide in views to allow whether distance to be shown as exposed or not
- Merge request !40Issue#3515654: add option to disable distance field in exposed filter. → (Open) created by divyansh.gupta
- 🇮🇳India divyansh.gupta Jaipur
I've implemented a configuration option to enable or disable the distance field in the exposed filter.
Please review and Let me know if any changes are needed! - 🇮🇹Italy itamair
There are many issues (drawbacks) that I see in this feature request and its actual implementation.
Regarding the feature request itself (to not expose the distance value in the Exposed Filter) I have the following blocking issues:
- I don't get which is the normal and recurring use case and need for doing this. It should always be evident to the uses the distance the proximity search is being performed upon. So I really don't get the reason to hide it;
- rather than completely hide the distance value, it should at least kept as a read only value in the Exposed Filter, to keep it still evident all the parameters of the Proximity Filter (both origin and distance).Regarding the actual MR !40 state, that I quickly QA and Reviewed I can clearly see the following issues:
- the newly added "Expose distance field" checkbox element is totally disconnected from the "Distance" textfield and this is very bad from the UI/UX perspective. Why this is not kept close to the Distance element?
- once the "Expose distance field" is unchecked and the Proximity filter settings popup is saved than it becomes impossible to check and change the Distance element, both in case the filter is set as exposed and when not. This is super bad and makes everything totally unusable and not properly configurable ...How did you test and QA this MR !40 state implementation?
BTW ... as general feeling I am really not incline to accept this Feature Request and implement it in the Geofield Proximity filter code base,
because this use case need looks very singular to me, and for accomplishing this I would still suggest you to override the @GeofieldProximitySource you are using (with a custom of you) and later its buildOptionsForm method, or even more simply use an hook_form_alter on the exposed filter form itself (and hide or make it readonly or disable the exposed Distance field),
as I already suggested in this comment: https://www.drupal.org/project/geofield/issues/3273483#comment-14475860 →I would personally really close this as "won't fix".
- 🇮🇹Italy itamair
Well actually indeed I can recall that I already Closed (as Won't Fix) this parent Issue / Feature Request with the same reasons.
Such also this one: https://www.drupal.org/project/geofield/issues/3042880#comment-13039900 →Thus I am closing also this Feature Request as won't fix.
I am still not persuaded to implement all this in the Geofield code base ...
BUT you arel free to implement your specific alterations in your specific use case and Drupal project instance.