From ee8c03f4907b10d51b5d00ec6b28e31008c04cae Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Mon, 27 Mar 2017 11:40:40 +0300 Subject: [PATCH 1/5] Remove dropdown menu from static wireframes --- src/components/SearchResultsPanel/SearchResultsPanel.js | 1 - .../__snapshots__/SearchResultsPanel.test.js.snap | 1 - 2 files changed, 2 deletions(-) diff --git a/src/components/SearchResultsPanel/SearchResultsPanel.js b/src/components/SearchResultsPanel/SearchResultsPanel.js index 4c57f621..2ceda909 100644 --- a/src/components/SearchResultsPanel/SearchResultsPanel.js +++ b/src/components/SearchResultsPanel/SearchResultsPanel.js @@ -4,7 +4,6 @@ import css from './SearchResultsPanel.css'; const SearchResultsPanel = props => (
- {props.children}
Filters diff --git a/src/components/SearchResultsPanel/__snapshots__/SearchResultsPanel.test.js.snap b/src/components/SearchResultsPanel/__snapshots__/SearchResultsPanel.test.js.snap index 63c3d2b3..45775d0b 100644 --- a/src/components/SearchResultsPanel/__snapshots__/SearchResultsPanel.test.js.snap +++ b/src/components/SearchResultsPanel/__snapshots__/SearchResultsPanel.test.js.snap @@ -1,6 +1,5 @@ exports[`SearchResultsPanel matches snapshot 1`] = `
-
From 4a7b872cdf52aa85d612e1c37b6b4da6a41215df Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Mon, 27 Mar 2017 11:41:15 +0300 Subject: [PATCH 2/5] Remove Topbar dropdown with old links --- src/containers/Topbar/Topbar.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/containers/Topbar/Topbar.js b/src/containers/Topbar/Topbar.js index a3cdd3dd..b482a87f 100644 --- a/src/containers/Topbar/Topbar.js +++ b/src/containers/Topbar/Topbar.js @@ -31,24 +31,6 @@ const Topbar = props => { -
{isAuthenticated From 0c836164f8763ae0cff7358f2c77e2aa384cf414 Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Mon, 27 Mar 2017 11:41:44 +0300 Subject: [PATCH 3/5] Call listings.query if no place is given in search params --- src/containers/SearchPage/SearchPage.duck.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/containers/SearchPage/SearchPage.duck.js b/src/containers/SearchPage/SearchPage.duck.js index 06154f13..f1e4df77 100644 --- a/src/containers/SearchPage/SearchPage.duck.js +++ b/src/containers/SearchPage/SearchPage.duck.js @@ -62,8 +62,14 @@ export const searchListingsError = e => ({ export const searchListings = searchParams => (dispatch, getState, sdk) => { dispatch(searchListingsRequest(searchParams)); - return sdk.listings - .search(searchParams) + + const { origin, include = [] } = searchParams; + + const searchOrQuery = origin + ? sdk.listings.search(searchParams) + : sdk.listings.query({ include }); + + return searchOrQuery .then(response => { dispatch(showListingsSuccess(response)); dispatch(searchListingsSuccess(response)); From 1f4f0c6536b9c3136367d1046301837470a8c0d4 Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Mon, 27 Mar 2017 11:42:43 +0300 Subject: [PATCH 4/5] Allow search with no place selected --- src/containers/HeroSearchForm/HeroSearchForm.js | 5 ++--- .../HeroSearchForm/__snapshots__/HeroSearchForm.test.js.snap | 2 +- src/containers/LandingPage/LandingPage.js | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/containers/HeroSearchForm/HeroSearchForm.js b/src/containers/HeroSearchForm/HeroSearchForm.js index cc56a4f4..34f56a55 100644 --- a/src/containers/HeroSearchForm/HeroSearchForm.js +++ b/src/containers/HeroSearchForm/HeroSearchForm.js @@ -7,7 +7,7 @@ import { autocompleteSearchRequired, autocompletePlaceSelected } from '../../uti import css from './HeroSearchForm.css'; const HeroSearchForm = props => { - const { className, intl, handleSubmit, pristine, submitting } = props; + const { className, intl, handleSubmit, submitting } = props; const addClassName = className ? { className } : {}; return ( @@ -19,9 +19,8 @@ const HeroSearchForm = props => { placeholder={intl.formatMessage({ id: 'HeroSearchForm.placeholder' })} format={null} component={LocationAutocompleteInput} - validate={[autocompleteSearchRequired(), autocompletePlaceSelected()]} /> -