ElasticPress icon indicating copy to clipboard operation
ElasticPress copied to clipboard

Decouple Instant Results from the Modal

Open JakePT opened this issue 3 years ago • 0 comments

Is your enhancement related to a problem? Please describe. The Instant Results feature currently provides a faster search experience by querying EP.io directly with AJAX and bypassing the theme. Since the theme is bypassed it's not possible to serve results using the theme's template, so instead we serve results in a modal window that inherits styles from the theme but is otherwise independent.

Due to this implementation the Instant Results functionality is quite tightly coupled to the modal. However ideally the main functionality of Instant Results would be abstracted from the modal so that other implementations are possible, such as embedding Instant Results on a page, or making parts of Instant Results, such as the search field, individual facets and the results list, available as blocks that are tied to the same application state.

Describe the solution you'd like Refactor the structure of Instant Results so that the application state and querying for results is completely independent of rendering. The application structure should then more easily support rendering Instant Results outside of the modal, or rendering parts of Instant Results into separate portals.

JakePT avatar Sep 02 '22 14:09 JakePT