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(metadata): register metadata around middleware #5492

Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Feb 21, 2023

Summary

Since $$type and $$internal are added in #5488, we can use this to give some information around middleware in metadata

Result

A new type of widgets is available, with a shape like this:

{
  "widgets": [{ "middleware": true, "type": "ais.insights", "internal": false }]
}

We don't know the parameters passed by the users, as it's defaulted early on in the arguments and there's no equivalent to getWidgetRenderState().widgetParams.

However, in the router middleware, the router and state mapping are also identified in the $$type

This is the same as #5491, but in the existing widgets key.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 21, 2023

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 41b7629:

Sandbox Source
InstantSearch.js Configuration
react-instantsearch-app Configuration
example-react-instantsearch-hooks-default-theme Configuration
example-vue-instantsearch-default-theme Configuration

@Haroenv Haroenv force-pushed the feat/automatic-insights-middleware branch from 5b35140 to 3d7aa28 Compare February 21, 2023 14:25
Base automatically changed from feat/automatic-insights-middleware to feat/automatic-insights February 23, 2023 10:56
We don't know the parameters passed by the users, as it's defaulted early on in the arguments and there's no equivalent to getWidgetRenderState().widgetParams
@Haroenv Haroenv force-pushed the feat/telemetry-middleware-as-widgets branch from 00ba10e to 81c934c Compare February 27, 2023 14:07
@Haroenv Haroenv force-pushed the feat/telemetry-middleware-as-widgets branch from 81c934c to 41b7629 Compare February 27, 2023 14:13
@Haroenv Haroenv requested review from a team, FabienMotte and sarahdayan and removed request for a team February 27, 2023 14:13
@Haroenv Haroenv merged commit ad20519 into feat/automatic-insights Mar 1, 2023
@Haroenv Haroenv deleted the feat/telemetry-middleware-as-widgets branch March 1, 2023 08: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.

3 participants