-
Notifications
You must be signed in to change notification settings - Fork 529
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: more searchBox work #27
Conversation
vvo
commented
Aug 3, 2015
- do no send the full helper to widgets, bind functions
- switch from widgets.searchbox to widgets.searchBox namespace (start with camelcase right now, avoid bad names later on)
- allow adding classes to the generated input
- add some doc
- change folder requires to have a trailing slash
Yes we could do that at some point if needed. This is more of a reference issue (having the same "search" binded function accross widgets) than a performance issue since the binding is only done at instantiation. |
var SearchBox = React.createClass({ | ||
propTypes: { | ||
helper: React.PropTypes.instanceOf(AlgoliasearchHelper), | ||
results: React.PropTypes.instanceOf(SearchResults), | ||
onFocus: React.PropTypes.func, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I removed onFocus without any specific commit. This was done to clean the widget API before we decide we do need an onFocus prop and expose it in the widget.
At first when I saw the component had a propType that included the full helper I thought "Maybe that's too much". What do you think @bobylito? Would this also help testing/exporting individual react component in npm modules?
Widgets names should be camel case to avoid future issues like widgets.wowwidget
c9baae3
to
6c75a05
Compare
Sorry I'm a bit late on that one. I'm still wondering if |
Don't have any preference. Maybe searchInput is more tied to the underlying HTML element we use while searchBox is not. |
Actually, "search box" seems very OK from a Google Fight POV. Nevermind! |
Google driven API design |
* feat: Support InstantSearch templates (a870767af9a409275f2a749923cc2d2e9f5fc37b) Closes #9 * feat: Support custom templates (#30) * test(e2e): Test template installations (#14) * test(e2e): Test template snapshots (9b938cca54b5e583284ec4778c22a333bbf570e7) * ci(travis): Add Travis configuration (#22) * docs(readme): Update documentation (#26) * feat(release): Create templates release script (#27) * feat(release): Create release scripts (#28)