You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the destination can be found from the result's address field, the origin would be the the user defined address in the search form, which is not passed through to the results.
Proposal
Using the provide / inject method, we could provide the necessary fields to any child of the custom collection, e.g.:
Note it doesn't need to be limited to these, and could include other useful variables as well.
Benefits
Solves the issue outlined in motivation, and could be useful for other cases (e.g. showing all terms of a field and highlighting the ones being filtered upon).
Drawbacks
This may open a pathway to unwanted workarounds to other limitations, as additional scope is now exposed.
Adoption strategy
Could be documented in an example, a test, or other developer documentation.
Additional information
Would you be willing to help implement this feature?
Could this feature be created outside of Ripple-framework as a layer?
Final checks
I have read the contribution guide for information on submitting a feature request.
I have checked the discussions and issues for duplicate feature requests.
The text was updated successfully, but these errors were encountered:
Describe the feature
Allow the values of filters in a Custom Collection to be accessible to children (particularly results).
Motivation
In some cases a result component may require a value from the applied filters.
For example:
An "Open in google maps" link on on a result. This requires an origin and destination to correctly fill the link:
https://www.google.com/maps/dir/?api=1&origin=[ORIGIN]&destination=[DESTINATION]
While the destination can be found from the result's address field, the origin would be the the user defined address in the search form, which is not passed through to the results.
Proposal
Using the provide / inject method, we could provide the necessary fields to any child of the custom collection, e.g.:
in here:
https://github.com/dpc-sdp/ripple-framework/blob/develop/packages/ripple-tide-search/components/global/TideCustomCollection.vue#L386
Note it doesn't need to be limited to these, and could include other useful variables as well.
Benefits
Solves the issue outlined in motivation, and could be useful for other cases (e.g. showing all terms of a field and highlighting the ones being filtered upon).
Drawbacks
This may open a pathway to unwanted workarounds to other limitations, as additional scope is now exposed.
Adoption strategy
Could be documented in an example, a test, or other developer documentation.
Additional information
Final checks
The text was updated successfully, but these errors were encountered: