Skip to content

Commit 2e22b9c

Browse files
JimmyChoiMDBJimmy Choi
andauthored
feat(aggregations): add feature flag for search activation program phase 1 COMPASS-9571 (#7113)
* initial commit * fix test --------- Co-authored-by: Jimmy Choi <jimmy.choi@mongodb.xom>
1 parent a6f8780 commit 2e22b9c

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

packages/compass-aggregations/src/components/aggregations/aggregations.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ describe('Aggregations [Component]', function () {
1212
showExportButton={true}
1313
showRunButton={true}
1414
showExplainButton={true}
15+
enableSearchActivationProgramP1={false}
1516
/>
1617
);
1718
});

packages/compass-aggregations/src/components/pipeline/pipeline.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export type PipelineProps = Pick<
7575
limit?: number;
7676
maxTimeMS?: number | null;
7777
largeLimit?: number;
78+
enableSearchActivationProgramP1: boolean;
7879
};
7980
class Pipeline extends PureComponent<
8081
PipelineProps,
@@ -106,6 +107,7 @@ class Pipeline extends PureComponent<
106107
showExportButton: PropTypes.bool.isRequired,
107108
showRunButton: PropTypes.bool.isRequired,
108109
showExplainButton: PropTypes.bool.isRequired,
110+
enableSearchActivationProgramP1: PropTypes.bool.isRequired,
109111
};
110112

111113
static defaultProps = {

packages/compass-aggregations/src/plugin.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ export const AggregationsPlugin: React.FunctionComponent<
1010
const showExportButton = usePreference('enableImportExport');
1111
const showRunButton = usePreference('enableAggregationBuilderRunPipeline');
1212
const showExplainButton = usePreference('enableExplainPlan');
13+
const enableSearchActivationProgramP1 = usePreference(
14+
'enableSearchActivationProgramP1'
15+
);
1316

1417
return (
1518
<ConfirmationModalArea>
1619
<Aggregations
1720
showExportButton={showExportButton}
1821
showRunButton={showRunButton}
1922
showExplainButton={showExplainButton}
23+
enableSearchActivationProgramP1={enableSearchActivationProgramP1}
2024
/>
2125
</ConfirmationModalArea>
2226
);

packages/compass-preferences-model/src/feature-flags.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export type FeatureFlags = {
2727
enableIndexesGuidanceExp: boolean;
2828
showIndexesGuidanceVariant: boolean;
2929
enableContextMenus: boolean;
30+
enableSearchActivationProgramP1: boolean;
3031
};
3132

3233
export const featureFlags: Required<{
@@ -148,4 +149,14 @@ export const featureFlags: Required<{
148149
short: 'Enable context (right-click) menus',
149150
},
150151
},
152+
153+
/**
154+
* Feature flag for CLOUDP-308952.
155+
*/
156+
enableSearchActivationProgramP1: {
157+
stage: 'development',
158+
description: {
159+
short: 'Enable interface to view and modify search indexes',
160+
},
161+
},
151162
};

0 commit comments

Comments
 (0)