-
Notifications
You must be signed in to change notification settings - Fork 525
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
demo should be easy to read #98
Comments
@redox Not sure how to deal with it. Currently the templates are well separated in example/templates/*.html. If I start rewriting the demo "old school" then I will need to put the templates either in the js files or in the main html file. It would be a pain for us then to update it. If the goal is for the user to understand the underlying code, we can definitely link from the demo page to the github example/ folder where it will be easier to them to understand. |
I would rather do something like: <script src="//cdn,jsdelivr.com/............/latest/instantsearch.js"></script>
<!-- or -->
<script src="../dist/instantsearch.js"></script>
<script>
$(function() {
var search = instantsearch(....);
search.addWidget(
instantsearch.widgets.searchBox({
container: '#q-container',
cssClass: 'form-control input-lg'
})
);
// [...]
search.start();
});
</script> |
Yes that's what I wanted to do, but then, where do we store the templates? I do not want to again include templates in I'd rather prefer them to discover the underlying simple webpack config file and great things like require('template.html'). From a documentation point of view we will do the straightforward things: no webpack advice etc.. But still, as for our own code, the fact that we do use webpack should not be an issue for them. If they want to see the code and templates I will link to the github project. Even inlining everything will have it's own limit, we would end up with a very big html file. If the user is smart enough to "view source" then it will be no problem for him to come to github I am sure. What do you think? |
I get your point but that's what we're gonna do in most integrations.
Sure fair enough, but let's just make it readable by including the dist file + another non-minified include with the templates and the widgets setup; most users don't want to understand the github repository/build system when looking at a demo. <script src="//cdn,jsdelivr.com/............/latest/instantsearch.js"></script>
<!-- or -->
<script src="../dist/instantsearch.js"></script>
<script src="app.js"></script> var hitTemplate = '......'; /* require("hit.html") */
var search = instantsearch(....);
search.addWidget(
instantsearch.widgets.searchBox({
container: '#q-container',
cssClass: 'form-control input-lg'
})
);
// [...]
search.start(); |
Split the example and library bundle files into several ones to improve the readability of the example while inspecting the source code. Fix #98
You want to keep track of the issue thats it? Wfm |
Wrong waffle manipulation actually :) |
* fix(panel): align button and make clearer fixes #97 * chore: remove headerText
* fix(panel): align button and make clearer fixes #97 * chore: remove headerText
* FIX : algolia/algoliasearch-helper-js#29 Avoid callback for outdated queries * FIX : algolia/algoliasearch-helper-js#64 Sum up the processing time of all queries * FIX : algolia/algoliasearch-helper-js#92 Parameters that can be set in the dashboard shouldn't have defaults * FIX : algolia/algoliasearch-helper-js#62 Make sure disctinct is set to false when it's not possible to use distinct in Algolia * FEATURE : algolia/algoliasearch-helper-js#91 Support for tags (with support for the raw format #98) * FEATURE : algolia/algoliasearch-helper-js#70 Ability to get all refined values : helper.getRefinements( facetname ) * FEATURE : algolia/algoliasearch-helper-js#51 multiple filters for a single conjunctive facet (tests) * FEATURE : Ability to modify any parameter of the state easily (algolia/algoliasearch-helper-js#76 #84 #12) * FEATURE : algolia/algoliasearch-helper-js#69 Ability to know if a facet is refined, whatever the value * FEATURE : algolia/algoliasearch-helper-js#86 Expose SearchParameters, AlgoliaSearchHelper, SearchResults to users directly in the builds * FEATURE : algolia/algoliasearch-helper-js#25 let the user do a clearRefinement with a function as a filter * REFACTORING : SearchParameters is immutable (algolia/algoliasearch-helper-js#14) * REFACTORING : Ensure SearchParameters is totally frozen (algolia/algoliasearch-helper-js#14) * LIB : Update lodash version to 3.9.x
use the standard build and standard js file instead of a full webpack example.
The text was updated successfully, but these errors were encountered: