-
Notifications
You must be signed in to change notification settings - Fork 942
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
Reorganize default search filters #1275
Conversation
@@ -101,7 +104,7 @@ class SearchFiltersPanelComponent extends Component { | |||
// if no option is passed, clear the selection for the filter | |||
const currentQueryParams = option | |||
? { ...mergedQueryParams, [urlParam]: option } | |||
: omit(mergedQueryParams, urlParam); | |||
: { ...mergedQueryParams, [urlParam]: null }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't remove omit. (I assume that this will add URL parameter category=null&amenities=null
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, this was a bug fix. Clearing the filter didn't work without this. It removes the param from the URL correctly.
@@ -43,7 +43,7 @@ class MainPanel extends Component { | |||
|
|||
const isSearchFiltersPanelOpen = !!secondaryFilters && this.state.isSearchFiltersPanelOpen; | |||
|
|||
const filters = merge(primaryFilters, secondaryFilters); | |||
const filters = merge({}, primaryFilters, secondaryFilters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one change request, but I'm wondering if we should postpone the merging of this PR to the point when this change makes sense (i.e. when there's more dropdown coming to fill the space)
This PR reorganizes the default search filters in the search page. The category and amenities filters are moved from primary filters to secondary filters under the "More filters" panel.
This is mainly for making more space to the UI in preparation for the sorting controls.
Before
After