1

search

 3 years ago
source link: https://blog.arkency.com/the-anatomy-of-search-pages/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

What kind of components do we need to use to make a great search page? Let’s have a look.

Text Search

text_search_box_component.png?w=768&h=758&fit=max

Search results

search_results_compoent.png?w=768&h=758&fit=max
search_results_algolia_ikea_ruby_rails_react.png?w=768&h=758&fit=max
react_search_algolia_results_amazon.png?w=768&h=758&fit=max

Filters

search_filter_by_stars_popular_component_in_react_rails_algolia_ruby.png?w=768&h=758&fit=max
rails_react_filter_by_date_range_and_price_range.png?w=768&h=758&fit=max
react_rails_search_filter_by_categories_algolia.png?w=768&h=758&fit=max
filter_nested_categories_tree_react_algolia_search.png?w=768&h=758&fit=max

filter_by_price_ranges_react_rails.png?w=768&h=758&fit=max

multi_select_categories_with_count_badges_react_rails_algolia_search_filter.png?w=768&h=758&fit=max
stars_ranges_brans_categories_filter_in_react_rails_algolia_search.png?w=768&h=758&fit=max

Custom components

search_by_location_radius_component_react_search_algolia.png?w=768&h=758&fit=max

today_tomorrow_weekend_dates_react_filter.png?w=768&h=758&fit=max

categories_filter_with_images_in_react_rails_search.png?w=768&h=758&fit=max

search_by_distance_to_nearby_points_component_react_rails.png?w=768&h=758&fit=max

Sorting components

sort_by_index_custom.png?w=768&h=758&fit=max

price_ascending_descending_asc_desc_sorting_component_react_rails_search.png?w=768&h=758&fit=max

sort_by_selector_component_react_search.png?w=768&h=758&fit=max

Pagination and results summary

pagination_react.png?w=768&h=758&fit=max
pagination_with_stats_search_react.png?w=768&h=758&fit=max

Easy?

I gathered some examples of the most typical components. How long do you think it would take your team to implement all of them. At the beginning, the task does not seem to be quite daunting. But the complexity comes from the fact that many of those components influence the search query, search results, and other components. As an example when a user keeps writing the search query, the list of categories (and their counters) is refreshed to reflect only those categories which contain search results limited to the query.

search_with_restricted_results.png?w=768&h=758&fit=max

When you search for “pillow”, the categories which don’t contain pillows are not displayed anymore.

And that’s where the complexity of implementing search pages comes from and often increases with every added component. It’s not that there are many of them, it’s not that you need to implement the backend to support that kind of filters. It’s that you need to handle all the interactions between the components in any order and handle the state of every one of them.

But… Do you know what technology appeared some time ago to make handling frontend interactions and forms easier? React.js and…

to be continued…

Are you also feeling the pain of building search pages from scratch every time? Or maybe you just want to learn how to deal with it upfront? We have a video course that can help :)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK