-
-
Notifications
You must be signed in to change notification settings - Fork 255
feat: add override functionality to remote feature flags #7271
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
base: main
Are you sure you want to change the base?
Changes from 20 commits
bec04d7
e78270a
fe7db8b
4413b2d
e07e67c
ec17188
fbdbd14
c9cd5aa
4d02e47
e3a4f8f
35b8470
4201e40
7ae47a3
71e4b7a
ca479c8
0063bce
9bbf745
414f0f0
f17c947
4d349ed
6a6b98f
7e3500d
434c892
6c75509
e562809
a09ceaa
ffd58e9
c1af969
9d99264
1f49998
e8f2ff1
83017de
6447545
28a8548
c3d09e5
10c168d
d1357b7
fb818a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
|
|
||||
| ## [Unreleased] | ||||
|
|
||||
| ### Added | ||||
|
|
||||
| - Add override functionality to remote feature flags ([#7271](https://github.com/MetaMask/core/pull/7271)) | ||||
| - `setFlagOverride(flagName, value)` - Set a local override for a specific feature flag | ||||
| - `clearFlagOverride(flagName)` - Clear the local override for a specific feature flag | ||||
| - `clearAllOverrides()` - Clear all local feature flag overrides | ||||
| - Add new controller state properties ([#7271](https://github.com/MetaMask/core/pull/7271)) | ||||
| - `localOverrides` - Local overrides for feature flags that take precedence over remote flags | ||||
| - `rawProcessedRemoteFeatureFlags` - Raw flag value for arrays that were processed from arrays to single value | ||||
| - Export additional controller action types ([#7271](https://github.com/MetaMask/core/pull/7271)) | ||||
| - `RemoteFeatureFlagControllerSetFlagOverrideAction` | ||||
| - `RemoteFeatureFlagControllerClearFlagOverrideAction` | ||||
| - `RemoteFeatureFlagControllerClearAllOverridesAction` | ||||
|
|
||||
| ### Changed | ||||
|
|
||||
| - Enhanced feature flag processing to preserve raw A/B test arrays for visibility and override capabilities ([#7271](https://github.com/MetaMask/core/pull/7271)) | ||||
| - Local overrides now take precedence over remote feature flags when both exist ([#7271](https://github.com/MetaMask/core/pull/7271)) | ||||
asalsys marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| - Controller state now includes metadata for new properties with appropriate persistence and logging settings ([#7271](https://github.com/MetaMask/core/pull/7271)) | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this covered by "Add new controller state properties"? Perhaps we don't need it.
Suggested change
|
||||
|
|
||||
| ## [3.0.0] | ||||
|
|
||||
| ### Added | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,3 +51,25 @@ export type ServiceResponse = { | |
| remoteFeatureFlags: FeatureFlags; | ||
| cacheTimestamp: number | null; | ||
| }; | ||
|
|
||
| /** | ||
| * Describes the shape of the state object for the {@link RemoteFeatureFlagController}. | ||
| */ | ||
| export type RemoteFeatureFlagControllerState = { | ||
| /** | ||
| * The collection of feature flags and their respective values, which can be objects. | ||
| */ | ||
| remoteFeatureFlags: FeatureFlags; | ||
| /** | ||
| * Local overrides for feature flags that take precedence over remote flags. | ||
| */ | ||
| localOverrides: FeatureFlags; | ||
| /** | ||
| * Raw A/B test flag arrays for flags that were processed from arrays to single values. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this always true? Will feature flags always contain A/B test arrays from now on? There don't seem to be any changes to the |
||
| */ | ||
| rawProcessedRemoteFeatureFlags: FeatureFlags; | ||
| /** | ||
| * The timestamp of the last successful feature flag cache. | ||
| */ | ||
| cacheTimestamp: number; | ||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.