MM-51711_Feature flag: APPS sidebar category (#22766)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3b8a0f224b
Коммит
9156205178
@@ -697,6 +697,7 @@ const defaultServerConfig: AdminConfig = {
|
|||||||
ThreadsEverywhere: false,
|
ThreadsEverywhere: false,
|
||||||
GlobalDrafts: true,
|
GlobalDrafts: true,
|
||||||
OnboardingTourTips: true,
|
OnboardingTourTips: true,
|
||||||
|
AppsSidebarCategory: false,
|
||||||
},
|
},
|
||||||
ImportSettings: {
|
ImportSettings: {
|
||||||
Directory: './import',
|
Directory: './import',
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ type FeatureFlags struct {
|
|||||||
GlobalDrafts bool
|
GlobalDrafts bool
|
||||||
|
|
||||||
OnboardingTourTips bool
|
OnboardingTourTips bool
|
||||||
|
|
||||||
|
AppsSidebarCategory bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FeatureFlags) SetDefaults() {
|
func (f *FeatureFlags) SetDefaults() {
|
||||||
@@ -102,6 +104,7 @@ func (f *FeatureFlags) SetDefaults() {
|
|||||||
f.WysiwygEditor = false
|
f.WysiwygEditor = false
|
||||||
f.OnboardingAutoShowLinkedBoard = false
|
f.OnboardingAutoShowLinkedBoard = false
|
||||||
f.OnboardingTourTips = true
|
f.OnboardingTourTips = true
|
||||||
|
f.AppsSidebarCategory = false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FeatureFlags) Plugins() map[string]string {
|
func (f *FeatureFlags) Plugins() map[string]string {
|
||||||
|
|||||||
@@ -732,3 +732,41 @@ describe('shouldShowUnreadsCategory', () => {
|
|||||||
expect(Selectors.shouldShowUnreadsCategory(state)).toBe(true);
|
expect(Selectors.shouldShowUnreadsCategory(state)).toBe(true);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('get feature flags', () => {
|
||||||
|
test('should check the value of feature flag AppsSidebarCategory', () => {
|
||||||
|
let state = {
|
||||||
|
entities: {
|
||||||
|
general: {
|
||||||
|
config: {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as GlobalState;
|
||||||
|
|
||||||
|
expect(Selectors.appsSidebarCategoryEnabled(state)).toBe(false);
|
||||||
|
|
||||||
|
state = {
|
||||||
|
entities: {
|
||||||
|
general: {
|
||||||
|
config: {
|
||||||
|
FeatureFlagAppsSidebarCategory: 'false',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as GlobalState;
|
||||||
|
|
||||||
|
expect(Selectors.appsSidebarCategoryEnabled(state)).toBe(false);
|
||||||
|
|
||||||
|
state = {
|
||||||
|
entities: {
|
||||||
|
general: {
|
||||||
|
config: {
|
||||||
|
FeatureFlagAppsSidebarCategory: 'true',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as GlobalState;
|
||||||
|
|
||||||
|
expect(Selectors.appsSidebarCategoryEnabled(state)).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -299,3 +299,7 @@ export function autoShowLinkedBoardFFEnabled(state: GlobalState): boolean {
|
|||||||
export function onboardingTourTipsEnabled(state: GlobalState): boolean {
|
export function onboardingTourTipsEnabled(state: GlobalState): boolean {
|
||||||
return getFeatureFlagValue(state, 'OnboardingTourTips') === 'true';
|
return getFeatureFlagValue(state, 'OnboardingTourTips') === 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function appsSidebarCategoryEnabled(state: GlobalState): boolean {
|
||||||
|
return getFeatureFlagValue(state, 'AppsSidebarCategory') === 'true';
|
||||||
|
}
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ export type ClientConfig = {
|
|||||||
ExperimentalViewArchivedChannels: string;
|
ExperimentalViewArchivedChannels: string;
|
||||||
FileLevel: string;
|
FileLevel: string;
|
||||||
FeatureFlagAppsEnabled: string;
|
FeatureFlagAppsEnabled: string;
|
||||||
|
FeatureFlagAppsSidebarCategory: string;
|
||||||
FeatureFlagBoardsProduct: string;
|
FeatureFlagBoardsProduct: string;
|
||||||
FeatureFlagCallsEnabled: string;
|
FeatureFlagCallsEnabled: string;
|
||||||
FeatureFlagGraphQL: string;
|
FeatureFlagGraphQL: string;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user