Skip to content

refactor(browser-sdk): refactor overrides API#417

Merged
roncohen merged 3 commits intomainfrom
overrides-refactor
Jun 4, 2025
Merged

refactor(browser-sdk): refactor overrides API#417
roncohen merged 3 commits intomainfrom
overrides-refactor

Conversation

@roncohen
Copy link
Contributor

@roncohen roncohen commented Jun 4, 2025

includes new example of how to make your own toolbar.

Screen.Recording.2025-06-04.at.13.29.10.mov

includes new example of how to make your own toolbar
@roncohen roncohen enabled auto-merge June 4, 2025 11:31
@roncohen roncohen requested review from Swiftwork, Copilot and laander June 4, 2025 11:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@roncohen roncohen added this pull request to the merge queue Jun 4, 2025
Merged via the queue into main with commit 1e2b209 Jun 4, 2025
6 checks passed
@roncohen roncohen deleted the overrides-refactor branch June 4, 2025 12:06
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