Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort search results #1277

Merged
merged 4 commits into from
Mar 25, 2020
Merged

Sort search results #1277

merged 4 commits into from
Mar 25, 2020

Conversation

kpuputti
Copy link
Contributor

@kpuputti kpuputti commented Mar 23, 2020

This PR adds search results sorting to the SearchPage. Results can be sorted with these criteria:

  • Newest
  • Oldest
  • Lowest price
  • Highest price
  • Relevance (Keyword search)

If there is a keyword filter, the relevance option is automatically selected and the other options are disabled. If there is no keyword, the relevance filter is disabled.

NOTE: The results count was moved to the left side of the sorting dropdown after these screenshots were taken.

Default view

Screenshot 2020-03-23 at 16 01 20

Mobile view

Screenshot 2020-03-23 at 16 00 09

Mobile view with keyword filter

Screenshot 2020-03-23 at 16 00 19

Desktop view

Screenshot 2020-03-23 at 16 00 47

Desktop view with keyword filter

Screenshot 2020-03-23 at 16 01 04

Customization

The sorting is turned on by default. It can be disabled in the marketplace-custom-config.js with the sortConfig.active option.

@kpuputti kpuputti force-pushed the sort-search-results branch 4 times, most recently from 5d83833 to 8b03d4b Compare March 23, 2020 14:19
@kpuputti kpuputti marked this pull request as ready for review March 23, 2020 14:23
@Gnito Gnito changed the base branch from master to reorganize-default-search-filters March 24, 2020 12:09
Copy link
Contributor

@Gnito Gnito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small comments. Are you still planning to move "42 results" in a separate PR?

src/marketplace-custom-config.js Outdated Show resolved Hide resolved
src/components/SortBy/SortByPopup.js Outdated Show resolved Hide resolved
src/components/SortBy/SortByPopup.css Outdated Show resolved Hide resolved
@kpuputti kpuputti changed the base branch from reorganize-default-search-filters to master March 25, 2020 14:45
@kpuputti kpuputti merged commit 6979891 into master Mar 25, 2020
@kpuputti kpuputti deleted the sort-search-results branch March 25, 2020 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants