Skip to content

Commit

Permalink
Merge branch 'develop' into feat/2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
bobylito authored May 29, 2018
2 parents 95ca043 + a5d7064 commit 3de8c2b
Show file tree
Hide file tree
Showing 24 changed files with 833 additions and 580 deletions.
46 changes: 0 additions & 46 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve InstantSearch.js

---

<!--
Thanks for participating in this project! We will try to answer as soon as possible 🙏
-->

**Describe the bug 🐛**
A clear and concise description of what the bug is.

**To Reproduce 🔍**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

A live example helps a lot! We have a simple online template for you to use for your explanations:
https://codesandbox.io/s/github/algolia/instantsearch-templates/tree/master/src/InstantSearch.js

**Expected behavior 💭**
A clear and concise description of what you expected to happen.

**Screenshots 🖥**
If applicable, add screenshots to help explain your problem.

**Environment:**
- OS: [e.g. iOS / windows / mac / android]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this project

---

<!--
Thanks for participating in this project! We will try to answer as soon as possible 🙏
-->

**Is your feature request related to a problem? Please describe 🙏**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like 🤔**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered ✨**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<a name="2.7.5"></a>
## [2.7.5](https://github.com/algolia/instantsearch.js/compare/v2.7.4...v2.7.5) (2018-05-28)


### Bug Fixes

* **clear-all:** apply excludeAttribute correctly with clearsQuery ([#2935](https://github.com/algolia/instantsearch.js/issues/2935)) ([e782ab8](https://github.com/algolia/instantsearch.js/commit/e782ab8))
* **connectInfiniteHits:** fix [#2928](https://github.com/algolia/instantsearch.js/issues/2928) ([#2939](https://github.com/algolia/instantsearch.js/issues/2939)) ([0293a31](https://github.com/algolia/instantsearch.js/commit/0293a31))



<a name="2.7.4"></a>
## [2.7.4](https://github.com/algolia/instantsearch.js/compare/v2.7.3...v2.7.4) (2018-05-03)

Expand Down
4 changes: 3 additions & 1 deletion dev/app/builtin/stories/geo-search.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import instantsearch from '../../../../index';
import { wrapWithHits } from '../../utils/wrap-with-hits';
import createInfoBox from '../../utils/create-info-box';

const API_KEY = 'AIzaSyBawL8VbstJDdU5397SUX7pEt9DslAwWgQ';

const wrapWithHitsAndConfiguration = (story, searchParameters) =>
wrapWithHits(story, {
indexName: 'airbnb',
Expand All @@ -18,7 +20,7 @@ const wrapWithHitsAndConfiguration = (story, searchParameters) =>

const injectGoogleMaps = fn => {
injectScript(
'https://maps.googleapis.com/maps/api/js?v=3.31&key=AIzaSyCl2TTJXpwxGuuc2zQZkAlIkWhpYbyjjP8',
`https://maps.googleapis.com/maps/api/js?v=3.31&key=${API_KEY}`,
fn
);
};
Expand Down
17 changes: 17 additions & 0 deletions dev/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,37 @@ registerDisposer(() => {

const q = window.location.search;

let selectedTab = '';
switch (true) {
case q.includes('widgets=vanilla'):
initVanillaWidgets();
selectedTab = 'vanilla';
break;
case q.includes('widgets=jquery'):
initJqueryWidgets();
selectedTab = 'jquery';
break;
case q.includes('widgets=unmount'):
initUnmountWidgets();
selectedTab = 'unmount';
break;
default:
initBuiltInWidgets();
}

const selectStories = document.createElement('div');
selectStories.className = 'story-selector';
selectStories.innerHTML = `
<a href="?" class="tab ${selectedTab === '' ? 'active' : ''}">Built-in</a>
<a href="?widgets=jquery" class="tab ${
selectedTab === 'jquery' ? 'active' : ''
}">Connectors with jQuery</a>
<a href="?widgets=unmount" class="tab ${
selectedTab === 'unmount' ? 'active' : ''
}">Disposable widgets</a>
`;
document.body.appendChild(selectStories);

start({
projectName: 'instantsearch.js',
projectLink: 'https://community.algolia.com/instantsearch.js/',
Expand Down
20 changes: 20 additions & 0 deletions dev/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,23 @@
.my-custom-info-box__text {
text-align: center;
}

.story-selector {
padding-left: 5px;
background: #333;
}

.tab {
height: 30px;
display: inline-block;
padding: 5px;
margin: 5px 2px 0 2px;
background: #d6d6d6;
color: #777;
text-decoration: none;
}

.tab.active {
background: #f7f7f7;
color: black;
}
8 changes: 8 additions & 0 deletions docgen/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ toggleDocumentationSidebar();
window.addEventListener('resize', () => {
toggleDocumentationSidebar();
});

const openIssueLink = document.querySelector('#link-open-issue');
if (openIssueLink) {
openIssueLink.href = openIssueLink.href.replace(
/__LOCATION__/g,
window.location.href
);
}
2 changes: 1 addition & 1 deletion docgen/layouts/archetypes/content-with-menu.pug
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body.documentation
block content
hr
p
strong Can't find what you are looking for? #[a(href="https://github.com/algolia/instantsearch.js/issues/new?title=I could not find what I was looking for&body=Hi! I have a documentation issue on InstantSearch.js, I could not find what I was looking for which is: -- PLEASE FILL IN HERE --") Open an issue], we'll get back to you.
strong Can't find what you are looking for? #[a(href=`https://github.com/algolia/instantsearch.js/issues/new?title=Question on the page "${title}"&body=Hi! I have a documentation issue on InstantSearch.js. I could not find what I was looking for on the page "[${title}](__LOCATION__)".%0A%0A<!-- Describe what you're looking for here. -->&labels=Doc: question`, id="link-open-issue") Open an issue], we'll get back to you.

include ../common/footer.pug
script(src=webpack.assets['js/main.js'])
Expand Down
2 changes: 1 addition & 1 deletion docgen/src/examples/tourism/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<!-- /Results -->
<script src="https://cdn.jsdelivr.net/react/15.5.4/react.min.js" async></script>
<script src="https://cdn.jsdelivr.net/react/15.5.4/react-dom.min.js" async></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCL0SatoeN9oZ5Z2ToYR8hoENTmZg6iUnY" async></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBawL8VbstJDdU5397SUX7pEt9DslAwWgQ" async></script>
<script src="https://cdn.jsdelivr.net/instantsearch-googlemaps/1/instantsearch-googlemaps.min.js" async></script>

<script src="search.js"></script>
6 changes: 3 additions & 3 deletions docgen/src/getting-started.md.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const search = instantsearch({
appId: 'latency',
apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
indexName: 'instant_search',
urlSync: true
routing: true
});

search.start();
Expand All @@ -102,7 +102,7 @@ You can synchronise the current search with the browser url. It provides two ben
* Working back/next browser buttons
* Copy and share the current search url

To configure this feature, pass `urlSync: true` option to `instantsearch()`. The `urlSync` option has more parameters ([see InstantSearch.js API documentation](instantsearch.html)).
To configure this feature, pass `routing: true` option to `instantsearch()`. The `routing` option has [more parameters](v2/instantsearch.html#struct-RoutingOptions).

Congrats 🎉 ! Your website is now connected to Algolia.

Expand Down Expand Up @@ -245,7 +245,7 @@ Since the dataset used here is an e-commerce one, let’s add a [RefinementList]
search.addWidget(
instantsearch.widgets.refinementList({
container: '#refinement-list',
attributeName: 'category'
attributeName: 'categories'
})
);
Expand Down
6 changes: 3 additions & 3 deletions docgen/src/widgets-common-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ search.addWidget(instantsearch.searchbox({
`cssClasses` is a parameter that let you specify one or more classes to add to
some specific element of the rendered widget. When available, this parameter is
an object of either string or array of strings. The different keys available
is define in the widget reference.
is defined in the widget reference.

```javascript
const search = instantsearch(/* parameters here */);
Expand Down Expand Up @@ -79,8 +79,8 @@ search.addWidget(instantsearch.refinementList({
## transformData

`transformData` is used to provide function that will transform the data
passed to the templates. This is particularly handy when using using mustache
because it only accepts conditionnals over `boolean` value.
passed to the templates. This is particularly handy when using mustache
because it only accepts conditionals over `Boolean` values.

Those function map the different template keys available, when it makes sense.
For example, if a widget accepts an `item` template, you can provide an `item`
Expand Down
10 changes: 6 additions & 4 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ const {
} = require('./conventionalChangelog.js');

// check if user can publish new version to npm
const { code: isNotOwner } = shell.exec('$(npm owner add `npm whoami`)', {
silent: true,
});
const ownersFound = parseFloat(
shell.exec('npm owner ls | grep "`npm whoami` " | wc -l', {
silent: true,
})
);

if (isNotOwner) {
if (ownersFound !== 1) {
shell.echo(
colors.red(`
You are not an owner of the npm repository,
Expand Down
Loading

0 comments on commit 3de8c2b

Please sign in to comment.