Skip to content

Commit

Permalink
Merge branch 'develop' into poc/central-loading-state
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo authored Nov 16, 2017
2 parents 0e37c0c + ace5e00 commit 75d7cf2
Show file tree
Hide file tree
Showing 15 changed files with 487 additions and 235 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="2.2.4"></a>
## [2.2.4](https://github.com/algolia/instantsearch.js/compare/v2.2.3...v2.2.4) (2017-11-13)


### Bug Fixes

* **numericSelector:** make default value possible ([#2565](https://github.com/algolia/instantsearch.js/issues/2565)) ([5664f98](https://github.com/algolia/instantsearch.js/commit/5664f98))



<a name="2.2.3"></a>
## [2.2.3](https://github.com/algolia/instantsearch.js/compare/v2.2.2...v2.2.3) (2017-11-07)

Expand Down
15 changes: 11 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,17 +321,24 @@ npm run release-maintenance

**Be sure to use `$ npm run` instead of `$ yarn run` to avoid issues**

#### Beta version
#### Beta version β

Beta version release is available on any branch except `master`, `maintainance` or `develop`. The
Beta version release is available on any branch except `master`, `maintainance`. The
main use cases are for releasing a patch before the official release, or create custom builds
with new features. In those cases we will either use the feature branch itself or the `feat/2.*`
branch.
with new features (or friday releases).

If you're on a feature branch (either for a fix or a new minor/major version), you can run:

```sh
npm run release
```

You can also release a beta version from `develop`, using the beta flag in the command line:

```sh
npm run release -- --beta
```

**Be sure to use `$ npm run` instead of `$ yarn run` to avoid issues**

## Updating the docs 📚
Expand Down
26 changes: 23 additions & 3 deletions dev/app/builtin/stories/numeric-selector.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,29 @@ export default () => {
attributeName: 'popularity',
options: [
{ label: 'Default', value: 0 },
{ label: 'Top 10', value: 9991 },
{ label: 'Top 100', value: 9901 },
{ label: 'Top 500', value: 9501 },
{ label: 'Top 10', value: 21459 },
{ label: 'Top 100', value: 21369 },
{ label: 'Top 500', value: 20969 },
],
})
);
})
);
stories.add(
'with default value',
wrapWithHits(container => {
window.search.addWidget(
instantsearch.widgets.numericSelector({
container,
operator: '=',
attributeName: 'rating',
options: [
{ label: 'No rating selected', value: undefined },
{ label: 'Rating: 5', value: 5 },
{ label: 'Rating: 4', value: 4 },
{ label: 'Rating: 3', value: 3 },
{ label: 'Rating: 2', value: 2 },
{ label: 'Rating: 1', value: 1 },
],
})
);
Expand Down
2 changes: 1 addition & 1 deletion docgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"metalsmith-sass": "1.4.0",
"ms-webpack": "2.0.0",
"netlify-cli": "1.2.2",
"node-sass": "4.5.3",
"node-sass": "4.6.1",
"postcss-scss": "0.4.1",
"pug": "2.0.0-rc.4",
"webpack": "3.6.0",
Expand Down
2 changes: 1 addition & 1 deletion docgen/plugins/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const defaults = {
* @param {Object} userOptions (optional)
* @property {String} source Path to copy static assets from (relative to working directory). Defaults to './public'
* @property {String} destination Path to copy static assets to (relative to destination directory). Defaults to '.'
* @return {Function} a Metalsmith plugin
* @return {function} a Metalsmith plugin
*/
function assets(userOptions = {}) {
const options = {
Expand Down
27 changes: 25 additions & 2 deletions docgen/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4821,7 +4821,30 @@ node-pre-gyp@^0.6.36:
tar "^2.2.1"
tar-pack "^3.4.0"

node-sass@4.5.3, node-sass@^4.2.0, node-sass@^4.5.0:
node-sass@4.6.1:
version "4.6.1"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.6.1.tgz#9b331cf943ee5440f199e858941a90d13bc9bfc5"
dependencies:
async-foreach "^0.1.3"
chalk "^1.1.1"
cross-spawn "^3.0.0"
gaze "^1.0.0"
get-stdin "^4.0.1"
glob "^7.0.3"
in-publish "^2.0.0"
lodash.assign "^4.2.0"
lodash.clonedeep "^4.3.2"
lodash.mergewith "^4.6.0"
meow "^3.7.0"
mkdirp "^0.5.1"
nan "^2.3.2"
node-gyp "^3.3.1"
npmlog "^4.0.0"
request "^2.79.0"
sass-graph "^2.2.4"
stdout-stream "^1.4.0"

node-sass@^4.2.0, node-sass@^4.5.0:
version "4.5.3"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.5.3.tgz#d09c9d1179641239d1b97ffc6231fdcec53e1568"
dependencies:
Expand Down Expand Up @@ -6046,7 +6069,7 @@ safe-json-parse@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57"

sass-graph@^2.1.1:
sass-graph@^2.1.1, sass-graph@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49"
dependencies:
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "instantsearch.js",
"version": "2.2.3",
"version": "2.2.4",
"description": "instantsearch.js is a library of widgets to build high performance instant search experiences using Algolia",
"homepage": "https://community.algolia.com/instantsearch.js/",
"author": "Algolia <support@algolia.com>",
Expand Down Expand Up @@ -42,9 +42,9 @@
"autoprefixer": "7.1.6",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-eslint": "8.0.1",
"babel-eslint": "8.0.2",
"babel-loader": "7.1.2",
"babel-plugin-module-resolver": "2.7.1",
"babel-plugin-module-resolver": "3.0.0",
"babel-plugin-rewire": "1.1.0",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-plugin-transform-react-constant-elements": "6.23.0",
Expand All @@ -61,13 +61,13 @@
"collect-json": "1.0.8",
"colors": "1.1.2",
"compression": "1.7.1",
"conventional-changelog-cli": "1.3.4",
"conventional-changelog-cli": "1.3.5",
"css-loader": "0.28.7",
"csso-cli": "1.1.0",
"dev-novel": "0.0.6",
"doctoc": "1.3.0",
"enzyme": "2.9.1",
"eslint": "4.10.0",
"eslint": "4.11.0",
"eslint-config-algolia": "12.0.0",
"eslint-config-prettier": "2.7.0",
"eslint-import-resolver-webpack": "0.8.3",
Expand All @@ -83,13 +83,13 @@
"gh-pages": "1.0.0",
"happypack": "4.0.0",
"html-webpack-plugin": "2.30.1",
"inquirer": "3.3.0",
"inquirer": "4.0.0",
"jest": "21.1.0",
"jsdom-global": "3.0.2",
"json": "9.0.6",
"mkdirp": "0.5.1",
"mversion": "1.10.1",
"node-sass": "4.5.3",
"node-sass": "4.6.1",
"postcss-loader": "2.0.6",
"prettier": "1.7.4",
"pretty-bytes-cli": "2.0.0",
Expand All @@ -105,9 +105,9 @@
"watch": "1.0.2",
"wdio-dot-reporter": "0.0.9",
"wdio-mocha-framework": "0.5.11",
"wdio-sauce-service": "0.4.0",
"wdio-sauce-service": "0.4.4",
"wdio-visual-regression-service": "0.8.0",
"webdriverio": "4.8.0",
"webdriverio": "4.9.8",
"webpack": "3.6.0",
"webpack-dev-server": "2.8.2"
},
Expand Down
5 changes: 4 additions & 1 deletion scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const inquirer = require('inquirer');
const shell = require('shelljs');
shell.fatal = true;

// Read CLI flags
const forceBeta = process.argv.includes('--beta');

const {
updateChangelog,
getChangelog,
Expand Down Expand Up @@ -66,7 +69,7 @@ if (currentBranch === 'master') {
process.exit(1);
}

const strategy = currentBranch === 'develop' ? 'stable' : 'beta';
const strategy = currentBranch !== 'develop' || forceBeta ? 'beta' : 'stable';

// called if process aborted before publish,
// nothing is pushed nor published remove local changes
Expand Down
4 changes: 2 additions & 2 deletions src/components/Selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export class RawSelector extends React.Component {
<select
className={this.props.cssClasses.select}
onChange={this.handleChange}
value={currentValue}
value={`${currentValue}`}
>
{options.map(option => (
<option
className={this.props.cssClasses.item}
key={option.label + option.value}
value={option.value}
value={`${option.value}`}
>
{option.label}
</option>
Expand Down
6 changes: 3 additions & 3 deletions src/components/__tests__/__snapshots__/Selector-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ exports[`Selector should render <Selector/> with numbers 1`] = `
<select
className="custom-select"
onChange={[Function]}
value={10}
value="10"
>
<option
className="custom-item"
value={10}
value="10"
>
10 results per page
</option>
<option
className="custom-item"
value={20}
value="20"
>
20 results per page
</option>
Expand Down
Loading

0 comments on commit 75d7cf2

Please sign in to comment.