Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): provide information about stalled search to widgets #2569

Merged
merged 23 commits into from
Nov 28, 2017
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
51c7df7
feat(core): the core provides information about stalled search
Nov 9, 2017
a3a5947
feat(searchbox): implements a loading indicator
Nov 9, 2017
b95c3b0
chore(lint): fix prettier and eslint check
Nov 9, 2017
0e37c0c
Merge branch 'develop' into poc/central-loading-state
bobylito Nov 10, 2017
75d7cf2
Merge branch 'develop' into poc/central-loading-state
vvo Nov 16, 2017
59fdbaf
feat(core): add option to configure stalled search delay
Nov 16, 2017
1d0aa21
Merge branch 'poc/central-loading-state' of github.com:algolia/instan…
Nov 16, 2017
6821e09
feat(searchbox): add options to set a loading indicator
Nov 22, 2017
4ecf773
Merge branch 'develop' into poc/central-loading-state
Nov 22, 2017
a4d4b89
chore: update test to match the lib changes
Nov 24, 2017
ca4ed04
chore(search-box-test): remove sinon
Nov 24, 2017
852e4ab
chore(connectSearchBox): remove sinon from test
Nov 24, 2017
d5398f5
chore(doc): add isStalledSearch on connectSearchBox rendering options
Nov 24, 2017
7a450b1
chore(validation): merge commit length should not be checked
Nov 24, 2017
ea2d14f
test(core): test new render step with stalled search
Nov 25, 2017
16475ab
Merge branch 'develop' into poc/central-loading-state
vvo Nov 27, 2017
0cd59a5
Merge branch 'develop' into poc/central-loading-state
vvo Nov 27, 2017
e3a9940
chore(searchbox): test with input tag container
Nov 27, 2017
dc5ee62
chore(doc): fix inconsistencies and add details
Nov 27, 2017
5583d18
chore(searchbox): use `.ais-stalled-search` and fix use of input
Nov 27, 2017
7e9157e
chore(doc): fix content
Nov 27, 2017
36c5dcd
Merge branch 'feat/2.3' into poc/central-loading-state
bobylito Nov 27, 2017
737d28e
chore: merge with 2.3, update snapshot
Nov 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions dev/app/builtin/stories/search-box.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,34 @@ export default () => {
);
})
)
.add(
'display loading indicator',
wrapWithHits(container => {
window.search.addWidget(
instantsearch.widgets.searchBox({
container,
placeholder: 'Search for products',
poweredBy: true,
loadingIndicator: true,
})
);
})
)
.add(
'display loading indicator with a template',
wrapWithHits(container => {
window.search.addWidget(
instantsearch.widgets.searchBox({
container,
placeholder: 'Search for products',
poweredBy: true,
loadingIndicator: {
template: '⚡️',
},
})
);
})
)
.add(
'with custom templates',
wrapWithHits(container => {
Expand Down Expand Up @@ -66,5 +94,32 @@ export default () => {
})
);
})
)
.add(
'with a provided input',
wrapWithHits(container => {
container.innerHTML = '<input/>';
const input = container.firstChild;
container.appendChild(input);
window.search.addWidget(
instantsearch.widgets.searchBox({
container: input,
})
);
})
)
.add(
'with a provided input and the loading indicator',
wrapWithHits(container => {
container.innerHTML = '<input/>';
const input = container.firstChild;
container.appendChild(input);
window.search.addWidget(
instantsearch.widgets.searchBox({
container: input,
loadingIndicator: true,
})
);
})
);
};
6 changes: 3 additions & 3 deletions scripts/validate-commit-msgs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ for sha in `git log --format=oneline "$RANGE" | cut '-d ' -f1`; do

FIRST_LINE=`git log --format=%B -n 1 $sha | head -1`
MSG_LENGTH=`echo "$FIRST_LINE" | wc -c`
if [ $MSG_LENGTH -gt 100 ]; then
if echo $FIRST_LINE | grep -qE '^Merge (pull request|branch)'; then
echo "OK (merge)"
elif [ $MSG_LENGTH -gt 100 ]; then
echo "KO (too long): $FIRST_LINE"
EXIT=2
elif echo $FIRST_LINE | grep -qE '^v\d+\.\d+\.\d+(-beta\.\d+)?'; then
echo "OK (version)"
elif echo $FIRST_LINE | grep -qE '^Merge (pull request|branch)'; then
echo "OK (merge)"
elif echo $FIRST_LINE | grep -qE '^(feat|fix|docs?|style|refactor|perf|tests?|chore|revert)(\(.+\))?: .*'; then
echo "OK"
else
Expand Down
Loading