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(index): expose createURL #4603

Merged
merged 3 commits into from
Dec 18, 2020
Merged

feat(index): expose createURL #4603

merged 3 commits into from
Dec 18, 2020

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Dec 8, 2020

Summary

This is useful for recreating what an index widget does when it renders, see ssr in Vue, as well as poc/telemetry2

I think in the future we might want a function to retrieve the parameters given to render / init.

Result

index exposes the scoped createURL function to be used in render / init / getWidgetRenderState etc.

This is useful for recreating what an index widget does when it renders, see ssr in Vue, as well as poc/telemetry2

I think in the future we might want a function to retrieve the parameters given to render / init.
@Haroenv Haroenv requested a review from a team December 8, 2020 17:02
@ghost ghost requested review from francoischalifour and shortcuts and removed request for a team December 8, 2020 17:02
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 8, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 13383e4:

Sandbox Source
InstantSearch.js Configuration

@Haroenv
Copy link
Contributor Author

Haroenv commented Dec 9, 2020

just realised the tests didn't get committed, let's add something now

instance.init(
createInitOptions({
instantSearchInstance: createInstantSearch({
// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still needed as it's called at L679?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this function is meant to return a string, but an object is easier to assert on

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🥇

@Haroenv Haroenv merged commit f57e9c5 into master Dec 18, 2020
@Haroenv Haroenv deleted the feat/index-create-url branch December 18, 2020 13:56
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