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(connectors): cleanup life cycle without dispose #6497

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Dec 30, 2024

In dispose, we no longer have any logic other than clearing listeners and removing rendering. This causes a significant simplification in all connectors.

One side-effect of this is that configure no longer can be collaborating in ui state. If we'd want that, there's no way to distinguish between the ui state set for one configure or the one set for another. Therefore the configure widget is completely in charge of its parameters. If you want to synchronise configure with the URL, do that separately of the UI State.

Small side-effect of this PR is the deduplication of the test/mock createWidget files

BREAKING CHANGE: widgets no longer explicitly clean in dispose (handled in index widget automatically)
BREAKING CHANGE: configure no longer shows in ui state or routing.

FX-3209

@Haroenv Haroenv added this to the instantsearch.js v5 milestone Dec 30, 2024
Copy link

codesandbox-ci bot commented Dec 30, 2024

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 713fb0c:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv Haroenv changed the title feat(connectors): rely entirely on gWSP and gUS for parameters in dispose feat(connectors): cleanup life cycle without dispose Dec 30, 2024
Copy link
Member

@dhayab dhayab left a comment

Choose a reason for hiding this comment

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

Awesome. I tested empirically and e2e passed on the branch (except for js-umd but the error is unrelated).

…pose

In `dispose`, we no longer have any logic other than clearing listeners and removing rendering. This causes a significant simplification in all connectors.

One side-effect of this is that `configure` no longer can be collaborating in ui state. If we'd want that, there's no way to distinguish between the ui state set for one configure or the one set for another. Therefore the configure widget is completely in charge of its parameters. If you want to synchronise configure with the URL, do that separately of the UI State.

Small side-effect of this PR is the deduplication of the test/mock createWidget files

BREAKING CHANGE: widgets no longer explicitly clean in dispose (handled in index widget automatically)
BREAKING CHANGE: configure no longer shows in ui state or routing.

[FX-3209]
@Haroenv Haroenv force-pushed the feat/simplify-dispose branch from fff286e to 713fb0c Compare December 31, 2024 09:50
@Haroenv
Copy link
Contributor Author

Haroenv commented Dec 31, 2024

Thanks, the e2e test doesn't really deal with adding and removing widgets though, so it makes sense it has no impact

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