refactor(browser-sdk): refactor overrides API#417
Merged
Conversation
includes new example of how to make your own toolbar
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the overrides API for feature flags across the browser and react SDKs and introduces a new example toolbar for custom feature control.
- Refactors API methods to use setIsEnabledOverride instead of legacy setFeatureOverride/getFeatureOverride.
- Updates tests and UI components (Toolbar and FeaturesTable) accordingly to support local override changes.
- Adds a new CustomToolbar component in the react-sdk to demonstrate how to create a custom toolbar.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/react-sdk/dev/plain/app.tsx | Adds CustomToolbar import and usage in the demos section. |
| packages/browser-sdk/test/usage.test.ts | Updates tests to include new override API properties. |
| packages/browser-sdk/test/client.test.ts | Refactors tests to use getFeature(...).setIsEnabledOverride method. |
| packages/browser-sdk/src/toolbar/Toolbar.tsx | Replaces legacy override logic with direct use of isEnabledOverride. |
| packages/browser-sdk/src/toolbar/Features.tsx | Updates props and event handlers to use setIsEnabledOverride. |
| packages/browser-sdk/src/client.ts | Removes legacy API and adds new isEnabledOverride APIs. |
Swiftwork
approved these changes
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
includes new example of how to make your own toolbar.
Screen.Recording.2025-06-04.at.13.29.10.mov