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: more searchBox work #27

Merged
merged 9 commits into from
Aug 4, 2015
Merged

feat: more searchBox work #27

merged 9 commits into from
Aug 4, 2015

Conversation

vvo
Copy link
Contributor

@vvo 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

@vvo vvo added the in progress label Aug 3, 2015
@vvo
Copy link
Contributor Author

vvo commented Aug 3, 2015

or we could use bindall

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,
Copy link
Contributor Author

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.

@vvo vvo changed the title fix: no state needed for Hogan component feat: more searchBox work Aug 3, 2015
vvo added 7 commits August 3, 2015 10:09
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
@vvo vvo force-pushed the feat/searchBox-component branch from c9baae3 to 6c75a05 Compare August 3, 2015 08:10
vvo pushed a commit that referenced this pull request Aug 4, 2015
@vvo vvo merged commit 585e6ba into develop Aug 4, 2015
@vvo vvo removed the in progress label Aug 4, 2015
@redox
Copy link
Contributor

redox commented Aug 4, 2015

Sorry I'm a bit late on that one. I'm still wondering if searchBox is the correct name, what about searchInput?

@vvo
Copy link
Contributor Author

vvo commented Aug 4, 2015

Don't have any preference.

Maybe searchInput is more tied to the underlying HTML element we use while searchBox is not.

@redox
Copy link
Contributor

redox commented Aug 4, 2015

Actually, "search box" seems very OK from a Google Fight POV. Nevermind!

@vvo
Copy link
Contributor Author

vvo commented Aug 4, 2015

Google driven API design

aymeric-giraudet pushed a commit that referenced this pull request Dec 8, 2022
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants