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

add the custom-init-config partial #903

Merged
merged 4 commits into from
Aug 3, 2021
Merged

Conversation

oshi97
Copy link
Contributor

@oshi97 oshi97 commented Aug 2, 2021

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

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
@coveralls
Copy link

coveralls commented Aug 2, 2021

Coverage Status

Coverage remained the same at 6.43% when pulling 94a1c69 on dev/custom-init-config into 48094d7 on develop.

package.json Outdated Show resolved Hide resolved
script/core.hbs Outdated
@@ -103,7 +103,8 @@
window.iframeLoaded.then(() => {
{{> script/iframe-messaging}}
});
}
},
...{{#stripJsComments}}{{> script/custom-init-config }}{{/stripJsComments}}
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@@ -0,0 +1,5 @@
// This file expects a JS object literal.
Copy link
Collaborator

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.

@oshi97 oshi97 merged commit 4c98ea8 into develop Aug 3, 2021
@oshi97 oshi97 deleted the dev/custom-init-config branch August 3, 2021 15:46
@cea2aj cea2aj mentioned this pull request Aug 24, 2021
cea2aj added a commit that referenced this pull request Aug 24, 2021
### 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)
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.

3 participants