-
Notifications
You must be signed in to change notification settings - Fork 5
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
add the custom-init-config partial #903
Conversation
I considered adding this in HitchhikerJS, which would give us better error messages if the a Hitchhiker messes up JS syntax. On the other hand Rose asked for a partial, and I'm a little worried about confusing Hitchhikers. On the other hand probably only advanced Hitchhikers will use this. In the future I was thinking jambo could pass a getter for templates and partials into templatedatavalidator, or even the whole HBS instance, so we can easily validate template/partials. J=SLAP-1447 TEST=manual,auto add a custom-init-config in the test site, with functions for onVerticalSearch and onUniversalSearch
script/core.hbs
Outdated
@@ -103,7 +103,8 @@ | |||
window.iframeLoaded.then(() => { | |||
{{> script/iframe-messaging}} | |||
}); | |||
} | |||
}, | |||
...{{#stripJsComments}}{{> script/custom-init-config }}{{/stripJsComments}} |
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.
Should we wrap all of onReady
in this helper?
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.
I was thinking it wouldn't hurt to let them override onReady if they wanted, but at that point you should probably override core.hbs
script/custom-init-config.js
Outdated
@@ -0,0 +1,5 @@ | |||
// This file expects a JS object literal. |
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.
What about naming this additional-answers-config
or something like that? It's a small nit, but there is already custom init config in some sense in the form of the userConfig
that's passed in.
### Features - Support for new languages including Chinese (Traditional), Chinese (Simplified), Russian, Polish, Portuguese, Dutch, Arabic, Korean, Swedish, and Hindi (#918) (#900) - A loading indicator can now be enabled on the search bar (#875) - Voice search support (#894) - Analytics, session tracking, and query source can now be toggled through Runtime Config (#869) (#879) - Added validation to ensure that parts of global_config and page configs are valid (#888) - Font preloads are now located in the layouts/preload-fonts.hbs file (#893) - Global config now includes "sessionTrackingEnabled" and "analyticsEventsEnabled" (#898) - Added a partial for additional Answers configuration (#903) - Map pins now support custom label colors (#922) ### Enhancements - The full-page-map "Search This Area" functionality is better optimized when a user quickly zooms in or out of the map (#861) - Improved build time during development mode (#865) - Icons were updated from components to Handlebars partials to improve performance (#874) ### Bugfixes - When upgrading the theme version, the global config will no longer contain duplicate options which are commented out (#916) - When upgrading the theme, the tests folders are now removed which improves build performance (#913)
I considered adding this in HitchhikerJS, which
would give us better error messages if the a Hitchhiker messes
up JS syntax. On the other hand Rose asked for a partial,
and I'm a little worried about confusing Hitchhikers.
In the future I was thinking jambo could pass a getter for
templates and partials into templatedatavalidator, or even
the whole HBS instance, so we can easily validate template/partials.
J=SLAP-1447
TEST=manual
add an additional-answers-config to the test site, with functions for onVerticalSearch
and onUniversalSearch