-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Splitting SearchResult using the Container/Component strategie * Split the search into diferente components using render functions * Implement ShowMore loader on search result * refact with extension points * Fix extension points * fix pages * Finish component refact * Add the possibility to hide the search-result facets * Place PropTypes inside schemaPropsTypes * Revert multiline JSX brackets * Release v1.1.2 * Refact schema * Added custom way to hide specification filter * Fix PropTypes * Added PropTypes documentation * Udate to use range slider from styleguide * Update slider props * Add page padding * Release v1.2.0 * Update CHANGELOG * Release v1.3.0 * Fix incorrect specification filter being removed * Update changelog * please work * Rename filter argument * Splitting SearchResult using the Container/Component strategie * Split the search into diferente components using render functions * Implement ShowMore loader on search result * Release v1.3.1 * Finish merge * finish rebase * Fix spinner, proptypes * Fix pr requests * Splitting SearchResult using the Container/Component strategie * Split the search into diferente components using render functions * Implement ShowMore loader on search result * Add the possibility to hide the search-result facets * Udate to use range slider from styleguide * Update slider props * Release v1.1.2 * Added custom way to hide specification filter * Fix incorrect specification filter being removed * please work * Fix spinner, proptypes * Fix pr requests * Fix rebase issues
- Loading branch information
1 parent
ea0c25f
commit 3463ffc
Showing
14 changed files
with
547 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
{ | ||
"pages": { | ||
"search-result": { | ||
"path": "/_v/search-result" | ||
} | ||
}, | ||
"extensions": { | ||
"search-result": { | ||
"component": "SearchResult" | ||
"component": "index" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import React, { Component } from 'react' | ||
import { Spinner } from 'vtex.styleguide' | ||
import { ExtensionPoint } from 'render' | ||
import { FormattedMessage } from 'react-intl' | ||
|
||
import FiltersContainer from './FiltersContainer' | ||
import { searchResultPropTypes } from '../constants/propTypes' | ||
import OrderBy from './OrderBy' | ||
import Gallery from './Gallery' | ||
|
||
/** | ||
* Search Result Component. | ||
*/ | ||
export default class SearchResult extends Component { | ||
render() { | ||
const { | ||
children, recordsFiltered, breadcrumbsProps, | ||
brands, getLinkProps, map, params, priceRange, | ||
priceRanges, rest, specificationFilters, tree, | ||
loading, fetchMoreLoading, products, summary, | ||
orderBy, hiddenFacets | ||
} = this.props | ||
|
||
return ( | ||
<div className="vtex-search-result vtex-search-result--show-more pv5 ph9-l ph7-m ph5-s"> | ||
<div className="vtex-search-result__breadcrumb"> | ||
<ExtensionPoint id="breadcrumb" {...breadcrumbsProps} /> | ||
</div> | ||
<div className="vtex-search-result__total-products"> | ||
<FormattedMessage | ||
id="search.total-products" | ||
values={{ recordsFiltered }} | ||
> | ||
{txt => <span className="ph4 black-50">{txt}</span>} | ||
</FormattedMessage> | ||
</div> | ||
<div className="vtex-search-result__filters"> | ||
<FiltersContainer | ||
brands={brands} | ||
getLinkProps={getLinkProps} | ||
map={map} | ||
params={params} | ||
priceRange={priceRange} | ||
priceRanges={priceRanges} | ||
rest={rest} | ||
specificationFilters={specificationFilters} | ||
tree={tree} | ||
hiddenFacets={hiddenFacets} | ||
loading={loading && !fetchMoreLoading} | ||
/> | ||
</div> | ||
<div className="vtex-search-result__border" /> | ||
<div className="vtex-search-result__order-by"> | ||
<OrderBy | ||
orderBy={orderBy} | ||
getLinkProps={getLinkProps} | ||
/> | ||
</div> | ||
<div className="vtex-search-result__gallery"> | ||
{loading && !fetchMoreLoading ? ( | ||
<div className="w-100 flex justify-center"> | ||
<div className="w3 ma0"> | ||
<Spinner /> | ||
</div> | ||
</div> | ||
) : ( | ||
<Gallery | ||
products={products} | ||
summary={summary} | ||
/> | ||
)} | ||
{children} | ||
</div> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
SearchResult.propTypes = searchResultPropTypes |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.