-
Notifications
You must be signed in to change notification settings - Fork 557
feat(searchbox): implement InstantSearch.css #3127
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
10fe263
chore(searchbox): migration guide
8499965
feat(searchbox): remove powered-by
4acfb9c
feat(searchbox): remove non-wrapped input feature
1182b34
feat(searchbox): searchOnEnterKeyPressOnly -> searchAsYouType
7992ccd
feat(searchbox): move UI elements options into templates and cssClasses
319635d
feat(searchbox): update markup
be2e8c3
Merge branch 'feat/3.0' into feat/3.0-searchbox
d934419
feat(searchbox): implement UX refinements
77e14e3
docs(v3): correctly reference the update to `showSubmit`
2f086c3
docs(searchbox): update storiest
f8d8e69
docs(searchbox): better input error message
622f665
fix(searchbox): favor submit event
a01763d
chore: clean up
98127de
fix(searchbox): autofocus now only supports boolean and defaults to f…
fb9fe83
chore: remove instances of autofocus to false
francoischalifour d6866e0
feat: update autofocus code and tests
francoischalifour 8698522
feat(stories): remove placeholder
francoischalifour fba87fc
docs(searchbox): remove IE8 comment
francoischalifour 0d51cc3
feat(searchbox): blur on enter
francoischalifour 12f9c77
feat(searchbox): remove IE8 support
francoischalifour 2e36eac
refactor(searchbox): invert listener events condition
francoischalifour 615e100
fix(searchbox): remove unused function
francoischalifour e6f4072
feat(searchbox): apply changes
francoischalifour ee0e2d5
fix(searchbox): query with input value
francoischalifour 1ff5c0a
fix: merge conflicts
francoischalifour d4c60cd
fix(searchbox): allow custom CSS
francoischalifour b363da6
fix(searchbox): do not render at init
francoischalifour 725f992
feat(searchbox): update error messages
francoischalifour da5673a
feat(searchbox): simplify widget import
francoischalifour 002d8d0
docs(migration): update
francoischalifour 97fdf6c
docs(searchbox): update
francoischalifour f2c6c24
fix: merge conflicts
francoischalifour 658d8a8
feat(searchbox): focus on reset and add empty action
francoischalifour 94b797f
docs(searchbox): add explanation
francoischalifour 43ec998
test(searchbox): test markup
francoischalifour f3eba24
docs(searchbox): add missing options
francoischalifour b13d468
feat(searchbox): add autofocus story
francoischalifour 0c4f45a
fix(searchbox): fix loadingIcon class
francoischalifour File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
115 changes: 115 additions & 0 deletions
115
src/widgets/search-box/__tests__/__snapshots__/search-box-test.js.snap
This file contains hidden or 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,115 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`searchBox() markup renders correctly 1`] = ` | ||
| <div | ||
| class="ais-SearchBox" | ||
| > | ||
| <form | ||
| action="" | ||
| class="ais-SearchBox-form" | ||
| novalidate="" | ||
| > | ||
| <input | ||
| autocapitalize="off" | ||
| autocomplete="off" | ||
| autocorrect="off" | ||
| class="ais-SearchBox-input" | ||
| placeholder="" | ||
| role="textbox" | ||
| spellcheck="false" | ||
| type="text" | ||
| value="" | ||
| /> | ||
| <button | ||
| class="ais-SearchBox-submit" | ||
| title="Submit the search query" | ||
| type="submit" | ||
| > | ||
| <svg | ||
| class="ais-SearchBox-submitIcon" | ||
| height="10" | ||
| viewBox="0 0 40 40" | ||
| width="10" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| > | ||
|
|
||
| <path | ||
| d="M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z" | ||
| /> | ||
|
|
||
| </svg> | ||
| </button> | ||
| <button | ||
| class="ais-SearchBox-reset" | ||
| hidden="" | ||
| title="Clear the search query" | ||
| type="reset" | ||
| > | ||
| <svg | ||
| class="ais-SearchBox-resetIcon" | ||
| height="10" | ||
| viewBox="0 0 20 20" | ||
| width="10" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| > | ||
|
|
||
| <path | ||
| d="M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z" | ||
| /> | ||
|
|
||
| </svg> | ||
| </button> | ||
| <span | ||
| class="ais-SearchBox-loadingIndicator" | ||
| hidden="" | ||
| > | ||
| <svg | ||
| class="ais-SearchBox-loadingIcon" | ||
| height="16" | ||
| stroke="#444" | ||
| viewBox="0 0 38 38" | ||
| width="16" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| > | ||
|
|
||
| <g | ||
| fill="none" | ||
| fillrule="evenodd" | ||
| > | ||
|
|
||
| <g | ||
| strokewidth="2" | ||
| transform="translate(1 1)" | ||
| > | ||
|
|
||
| <circle | ||
| cx="18" | ||
| cy="18" | ||
| r="18" | ||
| strokeopacity=".5" | ||
| /> | ||
|
|
||
| <path | ||
| d="M36 18c0-9.94-8.06-18-18-18" | ||
| > | ||
|
|
||
| <animatetransform | ||
| attributeName="transform" | ||
| dur="1s" | ||
| from="0 18 18" | ||
| repeatCount="indefinite" | ||
| to="360 18 18" | ||
| type="rotate" | ||
| /> | ||
|
|
||
| </path> | ||
|
|
||
| </g> | ||
|
|
||
| </g> | ||
|
|
||
| </svg> | ||
| </span> | ||
| </form> | ||
| </div> | ||
| `; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.