vtex-apps / search-result

VTEX Search Result app
23 stars 71 forks source link

If a custom search-resolver needs to send HTML to the facet filter la… #662

Closed wender closed 6 months ago

wender commented 6 months ago

What problem is this solving?

If a custom search-resolver needs to send HTML to the facet filter label, it will render the HTML

How to test it?

Workspace Needs to have the location saved to the searchState Run the following command in the console

window.sessionStorage.setItem('searchState', btoa(JSON.stringify({ lat: 28.3799379, lng: -81.2618541 })))

Refresh the page

Screenshots or example usage:

Result, the Pickup Today informs the distance, to allow CSS customization, the resolver responds with a HTML. Originally the search-result would make the HTML visible to the user as it is, not rendered.

image image

The new behavior only applies where no HTML is detected, the original behavior will remain the same to keep compatibility

image
vtex-io-ci-cd[bot] commented 6 months ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.