Skip to content

Commit

Permalink
feat(app): debug parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerska committed Apr 26, 2016
1 parent b60cf16 commit d42fdb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Here is a full breakdown of the available options for the JavaScript library:
indexPrefix: 'zendesk_', // or your custom <INDEX_PREFIX>
baseUrl: '/hc/', // the base URL of your Help Center
poweredBy: true, // show the "Search by Algolia" link (required if you're on Algolia's FREE plan)
debug: false, // debug mode prevents the autocomplete to close when trying to inspect it
color: '#D4D4D4', // main color (used for links)
highlightColor: '#D4D4D4', // highlight color to emphasize matching text
responsive: true, // responsive instantsearch page
Expand Down
1 change: 1 addition & 0 deletions app/src/AlgoliasearchZendeskHC.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const optionsStructure = {required: true, type: 'Object', children: {
}},
baseUrl: {type: 'string', value: '/hc/'},
color: {type: 'string', value: '#158EC2'},
debug: {type: 'boolean', value: false},
highlightColor: {type: 'string'},
indexPrefix: {type: 'string', value: 'zendesk_'},
instantsearch: {type: 'Object', value: {}, children: {
Expand Down
3 changes: 2 additions & 1 deletion app/src/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Autocomplete {
},
baseUrl,
color,
debug,
highlightColor,
poweredBy,
translations
Expand Down Expand Up @@ -84,7 +85,7 @@ class Autocomplete {
$input.setAttribute('placeholder', translations.placeholder_autocomplete);
let aa = autocomplete($input, {
hint: false,
debug: process.env.NODE_ENV === 'development',
debug: process.env.NODE_ENV === 'development' || debug,
templates: this._templates({poweredBy, translations})
}, [{
source: this._source(params),
Expand Down
1 change: 1 addition & 0 deletions docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Here is a full breakdown of the available options for the JavaScript library:
indexPrefix: 'zendesk_', // or your custom <INDEX_PREFIX>
baseUrl: '/hc/', // the base URL of your Help Center
poweredBy: true, // show the "Search by Algolia" link (required if you're on Algolia's FREE plan)
debug: false, // debug mode prevents the autocomplete to close when trying to inspect it
color: '#D4D4D4', // main color (used for links)
highlightColor: '#D4D4D4', // highlight color to emphasize matching text
responsive: true, // responsive instantsearch page
Expand Down

0 comments on commit d42fdb6

Please sign in to comment.