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

[FEATURE] Implement PROVIDER_CONTEXT_CHANGED event in web-sdk #729

Closed
toddbaert opened this issue Dec 14, 2023 · 0 comments · Fixed by #731
Closed

[FEATURE] Implement PROVIDER_CONTEXT_CHANGED event in web-sdk #729

toddbaert opened this issue Dec 14, 2023 · 0 comments · Fixed by #731
Assignees
Labels
enhancement New feature or request

Comments

@toddbaert
Copy link
Member

Requirements

Implement as described here.

@toddbaert toddbaert added the enhancement New feature or request label Dec 14, 2023
@toddbaert toddbaert self-assigned this Dec 14, 2023
github-merge-queue bot pushed a commit that referenced this issue Jan 8, 2024
This PR:

- adds `PROVIDER_CONTEXT_CHANGED` events, which, in the static paradigm,
can be used to inform the SDK that the flags should be re-evaluated
(important for UI repaints in React, for instance (note this event is
only available in the web-sdk)
- runs the associated `PROVIDER_CONTEXT_CHANGED` handlers if the
provider's context handler function ran successfully or `PROVIDER_ERROR`
handlers otherwise.
- adds associated tests

A decent amount of this is just typing magic to reduce duplicated code
while making the new event only available in the web-sdk.

See: [associated spec
change](open-feature/spec#200)

Fixes: #729

---------

Signed-off-by: Todd Baert <[email protected]>
toddbaert added a commit that referenced this issue Jan 11, 2024
This PR:

- adds `PROVIDER_CONTEXT_CHANGED` events, which, in the static paradigm,
can be used to inform the SDK that the flags should be re-evaluated
(important for UI repaints in React, for instance (note this event is
only available in the web-sdk)
- runs the associated `PROVIDER_CONTEXT_CHANGED` handlers if the
provider's context handler function ran successfully or `PROVIDER_ERROR`
handlers otherwise.
- adds associated tests

A decent amount of this is just typing magic to reduce duplicated code
while making the new event only available in the web-sdk.

See: [associated spec
change](open-feature/spec#200)

Fixes: #729

---------

Signed-off-by: Todd Baert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant