Skip to content

Commit

Permalink
chore: release v0.1.0-beta.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahdayan authored Jul 28, 2020
2 parents d3b1ec7 + 99117d0 commit d14b8db
Show file tree
Hide file tree
Showing 23 changed files with 389 additions and 492 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,12 @@
"ignoreFilenames": ["node_modules"]
}
]
]
],
"env": {
"production": {
"plugins": [
"babel-plugin-strip-invariant"
]
}
}
}
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# [0.1.0-beta.4](https://github.com/algolia/ecomm-unified/compare/v0.1.0-beta.3...v0.1.0-beta.4) (2020-07-28)


### Bug Fixes

* make text more helpful ([#132](https://github.com/algolia/ecomm-unified/issues/132)) ([03c5b25](https://github.com/algolia/ecomm-unified/commit/03c5b2528e9c53a4231d51293a64467f428bdbe8))
* rename property ([9b2b143](https://github.com/algolia/ecomm-unified/commit/9b2b14379c0c2b323e038a1f4c676cfbc44f5f12))
* **hits:** increase font weight ([3954fef](https://github.com/algolia/ecomm-unified/commit/3954fefac906a0d643a5a06b5fceff9a8f1a361d))
* **mobile:** adjust mobile filtering design ([#112](https://github.com/algolia/ecomm-unified/issues/112)) ([62f5a62](https://github.com/algolia/ecomm-unified/commit/62f5a62f81771f0f9d0dae426fcbdf44aa0b0693))
* **mobile:** update filters panel design ([#130](https://github.com/algolia/ecomm-unified/issues/130)) ([f4f40ec](https://github.com/algolia/ecomm-unified/commit/f4f40ec9a14afa4eb27272fd34ced0de737f8d66))
* **searchBox:** autofocus input when modal opens ([#121](https://github.com/algolia/ecomm-unified/issues/121)) ([09f1856](https://github.com/algolia/ecomm-unified/commit/09f18568f4da081453cf9334990235a82dfb9000))
* fix grid view for no results page ([#105](https://github.com/algolia/ecomm-unified/issues/105)) ([6797bae](https://github.com/algolia/ecomm-unified/commit/6797bae212616b88374fc3927411f33181545062))
* fix input completion offset ([#106](https://github.com/algolia/ecomm-unified/issues/106)) ([19e8b98](https://github.com/algolia/ecomm-unified/commit/19e8b98683b334827938e70cb0824a1d5f62fe18))
* update "currency" casing ([f1038e6](https://github.com/algolia/ecomm-unified/commit/f1038e6760d1acc36f2cf0fd4cbad68570f58f3c))
* **sortBy:** align arrow ([981a65a](https://github.com/algolia/ecomm-unified/commit/981a65aab820a79ba6b9d4627d8e1f15ea6c096b))


### Features

* add baseZIndex congifuration ([#107](https://github.com/algolia/ecomm-unified/issues/107)) ([559509e](https://github.com/algolia/ecomm-unified/commit/559509e2c815ba1c6a77bb40bd1bb230c7fb6171))
* add preconnect link to preview website ([#115](https://github.com/algolia/ecomm-unified/issues/115)) ([78c6dee](https://github.com/algolia/ecomm-unified/commit/78c6dee4d9f06fbbee155ae00993097d559f45b5))
* allow escape to close filters ([#113](https://github.com/algolia/ecomm-unified/issues/113)) ([4088264](https://github.com/algolia/ecomm-unified/commit/4088264b9c040a674a2ecb80deef675add3e3409))
* inline documentation within the configuration file ([#139](https://github.com/algolia/ecomm-unified/issues/139)) ([a2a87fe](https://github.com/algolia/ecomm-unified/commit/a2a87fea6aff3ec6a792a8973f570f337aebe754))
* introduce runtime validation ([#140](https://github.com/algolia/ecomm-unified/issues/140)) ([9b64588](https://github.com/algolia/ecomm-unified/commit/9b64588b15b0311e0ee54ec36ddcb519163467c6))
* remove webpack-dashboard ([be666e6](https://github.com/algolia/ecomm-unified/commit/be666e6e88b4a7249278a0198809424cdbe64999))
* replace insights trigger ([16ac898](https://github.com/algolia/ecomm-unified/commit/16ac898e21479146d029c896b4499b765854be39))
* reuse config index name as default sort option ([#137](https://github.com/algolia/ecomm-unified/issues/137)) ([be54236](https://github.com/algolia/ecomm-unified/commit/be54236539bce3a2c3f3ae8a786b5b5c0d57ca0b))
* throw when `inputContainer` refers to an <input> ([#138](https://github.com/algolia/ecomm-unified/issues/138)) ([da536fc](https://github.com/algolia/ecomm-unified/commit/da536fc4f4570bad06be0c61de1116b85baea4f9))
* **mobile:** display current refinements in filters panel ([#123](https://github.com/algolia/ecomm-unified/issues/123)) ([017c572](https://github.com/algolia/ecomm-unified/commit/017c5722e55b258b18cdc79220ec93d5db59a56e))
* **pagination:** scroll to top on page change ([#111](https://github.com/algolia/ecomm-unified/issues/111)) ([638442c](https://github.com/algolia/ecomm-unified/commit/638442cc47b84615c4a3f9838fe13bc959ebe7d8))
* **qs:** display bubbles on desktop ([#116](https://github.com/algolia/ecomm-unified/issues/116)) ([7c6a5e7](https://github.com/algolia/ecomm-unified/commit/7c6a5e71b46eebe52c7701fe0b525a93396f4864))



# [0.1.0-beta.3](https://github.com/algolia/ecomm-unified/compare/v0.1.0-beta.0...v0.1.0-beta.3) (2020-05-11)


Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "unified-instantsearch-ecommerce",
"version": "0.1.0-beta.3",
"version": "0.1.0-beta.4",
"license": "Apache-2.0",
"private": true,
"scripts": {
"start": "webpack-dashboard -- webpack-dev-server --config webpack/dev.babel.js",
"export": "webpack --config webpack/build.babel.js",
"preview": "webpack --config webpack/preview.babel.js",
"start": "NODE_ENV=development webpack-dev-server --config webpack/dev.babel.js",
"export": "NODE_ENV=production webpack --config webpack/build.babel.js",
"preview": "NODE_ENV=production webpack --config webpack/preview.babel.js",
"lint": "run-p -c lint:*",
"lint:js": "eslint --ext .js .",
"lint:css": "stylelint '**/*.(s)css'",
Expand All @@ -15,6 +15,7 @@
},
"dependencies": {
"algoliasearch": "4.1.0",
"invariant": "2.2.4",
"node-sass": "4.13.1",
"qs": "6.9.3",
"react": "16.13.1",
Expand All @@ -34,6 +35,7 @@
"@babel/runtime": "7.9.6",
"babel-eslint": "10.1.0",
"babel-loader": "8.1.0",
"babel-plugin-strip-invariant": "1.0.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "5.1.1",
Expand Down Expand Up @@ -74,7 +76,6 @@
"terser-webpack-plugin": "2.3.6",
"webpack": "4.43.0",
"webpack-cli": "3.3.11",
"webpack-dashboard": "3.2.0",
"webpack-dev-server": "3.10.3",
"webpack-merge": "4.2.2"
}
Expand Down
2 changes: 1 addition & 1 deletion public/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</header>

<div class="content">
<p>Click on the search box to start searching.</p>
<p>Click on the search box in the top-right corner to start searching.</p>
</div>

<div class="content">
Expand Down
6 changes: 6 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"config:js-app",
"algolia"
]
}
24 changes: 18 additions & 6 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
.uni-Refinements-scrollable {
@media (--algolia-theme-breakpoint-md-max) {
flex-grow: 1;
padding: 1rem 1.5rem;
padding: 1rem;
}
}

Expand All @@ -256,13 +256,27 @@
margin-bottom: 1rem;
}

.uni-Refinements-closeButton {
background: none;
border: 0;
color: inherit;
cursor: pointer;
margin-right: -0.5rem;
padding: 0.5rem;
svg {
height: auto;
width: 20px;
}
}

.uni-Refinements-button {
background-color: #dddcdc;
border: 0;
border-radius: 8px;
color: var(--algolia-theme-color-secondary);
cursor: pointer;
display: flex;
flex: 1;
flex-shrink: 0;
font-size: 0.75rem;
font-weight: bold;
Expand All @@ -274,21 +288,19 @@
.uni-Refinements-resultButton {
background-color: var(--algolia-theme-color-primary);
color: #fff;
margin-left: 1rem;
margin-left: 0.5rem;
}

.uni-Refinements-footer {
background-color: #fff;
border-top: 1px solid #ebecf3;
box-shadow: 0 0 4px rgba(150, 150, 150, 0.24);
display: flex;
flex-grow: 0;
flex-shrink: 0;
padding: 1rem 1.5rem;
padding: 0.5rem;
width: 100%;
z-index: 2;
.uni-Refinements-button {
flex-grow: 1;
}
}

/* Containers */
Expand Down
4 changes: 1 addition & 3 deletions src/components/CurrentRefinements.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ function getRefinement(refinement, config) {
}

default: {
throw new Error(
`The refinement type "${refinementConfig.type}" is not supported.`
);
return null;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
.ais-Panel-body {
padding-top: 1rem;
@media (--algolia-theme-breakpoint-md-max) {
padding: 1rem 0;
padding-bottom: 1rem;
padding-top: 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Refinements.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function RefinementWidget({ type, ...props }) {
);

default:
throw new Error(`The refinement type "${type}" is not supported.`);
return null;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/ResetButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ResetButton = connectCurrentRefinements(function ResetButton(
}}
disabled={props.items.length === 0}
>
Reset filters
Clear all
</button>
);
});
19 changes: 14 additions & 5 deletions src/components/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ export function Search(props) {

const filtersAnchor = React.useRef();

const defaultSort = [
{
label: 'Featured',
value: config.index.indexName,
},
];
const sorts = defaultSort.concat(config.sorts);

React.useEffect(() => {
if (filtersAnchor.current && props.isFiltering) {
filtersAnchor.current.scrollTop = 0;
Expand Down Expand Up @@ -74,9 +82,10 @@ export function Search(props) {
onClick={() => {
props.setIsFiltering(false);
}}
className="uni-Refinements-button"
className="uni-Refinements-closeButton"
title="Close filters"
>
Close
<CloseIcon />
</button>
</header>
{isMobile && <CurrentRefinements />}
Expand Down Expand Up @@ -105,12 +114,12 @@ export function Search(props) {
</div>

<div className="uni-BodyHeader-extraOptions">
{config.sorts?.length > 0 && (
{sorts.length > 1 && (
<div className="uni-BodyHeader-sortBy">
<span className="uni-Label">Sort by</span>
<SortBy
items={config.sorts}
defaultRefinement={config.sorts[0].value}
items={sorts}
defaultRefinement={sorts[0].value}
/>
</div>
)}
Expand Down
12 changes: 7 additions & 5 deletions src/config/Hit.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@ export function Hit({ hit, insights, view }) {

<div className="uni-Hit-Actions">
<button
title="Like this product"
title="Add to cart"
className="uni-Hit-ActionButton"
onClick={(event) => {
event.preventDefault();
event.stopPropagation();

insights('convertedObjectIDsAfterSearch', {
eventName: 'Product Liked',
eventName: 'Product Added to Cart',
});
}}
>
<LikeIcon />
<CartIcon />
</button>
</div>
</a>
</article>
);
}

function LikeIcon(props) {
function CartIcon(props) {
return (
<svg
viewBox="0 0 24 24"
Expand All @@ -70,7 +70,9 @@ function LikeIcon(props) {
strokeWidth={2}
{...props}
>
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" />
<circle cx="9" cy="21" r="1" />
<circle cx="20" cy="21" r="1" />
<path d="M5 1H1l0 0H5l2.7 13.4c0.2 1 1 1.6 2 1.6h9.7c1 0 1.8-0.7 2-1.6L23 6H6" />
</svg>
);
}
Loading

0 comments on commit d14b8db

Please sign in to comment.