MM-51711_Feature flag: APPS sidebar category (#22766)

This commit is contained in:
Julian Mondragón 2023-03-31 15:08:52 -05:00 committed by GitHub
parent 3b8a0f224b
commit 9156205178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 0 deletions

View File

@ -697,6 +697,7 @@ const defaultServerConfig: AdminConfig = {
ThreadsEverywhere: false,
GlobalDrafts: true,
OnboardingTourTips: true,
AppsSidebarCategory: false,
},
ImportSettings: {
Directory: './import',

View File

@ -74,6 +74,8 @@ type FeatureFlags struct {
GlobalDrafts bool
OnboardingTourTips bool
AppsSidebarCategory bool
}
func (f *FeatureFlags) SetDefaults() {
@ -102,6 +104,7 @@ func (f *FeatureFlags) SetDefaults() {
f.WysiwygEditor = false
f.OnboardingAutoShowLinkedBoard = false
f.OnboardingTourTips = true
f.AppsSidebarCategory = false
}
func (f *FeatureFlags) Plugins() map[string]string {

View File

@ -732,3 +732,41 @@ describe('shouldShowUnreadsCategory', () => {
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);
});
});

View File

@ -299,3 +299,7 @@ export function autoShowLinkedBoardFFEnabled(state: GlobalState): boolean {
export function onboardingTourTipsEnabled(state: GlobalState): boolean {
return getFeatureFlagValue(state, 'OnboardingTourTips') === 'true';
}
export function appsSidebarCategoryEnabled(state: GlobalState): boolean {
return getFeatureFlagValue(state, 'AppsSidebarCategory') === 'true';
}

View File

@ -116,6 +116,7 @@ export type ClientConfig = {
ExperimentalViewArchivedChannels: string;
FileLevel: string;
FeatureFlagAppsEnabled: string;
FeatureFlagAppsSidebarCategory: string;
FeatureFlagBoardsProduct: string;
FeatureFlagCallsEnabled: string;
FeatureFlagGraphQL: string;