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

poc: warn added widgets require missing clients #5943

Draft
wants to merge 2 commits into
base: poc/multi-clients
Choose a base branch
from

Conversation

dhayab
Copy link
Member

@dhayab dhayab commented Nov 23, 2023

Summary

Result

Copy link

codesandbox-ci bot commented Nov 23, 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 2b06f73:

Sandbox Source
example-multi-clients Configuration

@@ -52,6 +53,8 @@ const connectFrequentlyBoughtTogether: FrequentlyBoughtTogetherConnector =
return {
$$type: 'ais.frequentlyBoughtTogether',

requires: ['recommendClient'],
Copy link
Contributor

Choose a reason for hiding this comment

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

not related to the api, but personally I think what we should do is replace getWidgetSearchParameters with

getWidgetParameters() {
  return {
    search: ...,
    recommend: ...,
  }
}

(we can detect that the same in index of course, but it seems less hardcoded)

Copy link
Contributor

Choose a reason for hiding this comment

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

main difference is that you don't redo the work twice, once for checking and once for actually setting the parameters. If we have getWidgetParameters, you just translate the parameters, then check if anything set parameters for the reco client.

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.

None yet

2 participants