diff --git a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx index ca9237eff6ea..d905e2fff66f 100644 --- a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx +++ b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyForm/FeatureStrategyForm.tsx @@ -45,8 +45,6 @@ import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; import { formatStrategyName } from 'utils/strategyNames'; import { Badge } from 'component/common/Badge/Badge'; import EnvironmentIcon from 'component/common/EnvironmentIcon/EnvironmentIcon'; -import { useFeedback } from 'component/feedbackNew/useFeedback'; -import { useUiFlag } from 'hooks/useUiFlag'; interface IFeatureStrategyFormProps { feature: IFeatureToggle; @@ -187,8 +185,6 @@ const StyledBadge = styled(Badge)(({ theme }) => ({ marginLeft: theme.spacing(1), })); -const feedbackCategory = 'newStrategyForm'; - export const FeatureStrategyForm = ({ projectId, feature, @@ -207,10 +203,6 @@ export const FeatureStrategyForm = ({ setTab, StrategyVariants, }: IFeatureStrategyFormProps) => { - const { openFeedback, hasSubmittedFeedback } = useFeedback( - feedbackCategory, - 'manual', - ); const { trackEvent } = usePlausibleTracker(); const [showProdGuard, setShowProdGuard] = useState(false); const hasValidConstraints = useConstraintsValidation(strategy.constraints); @@ -221,9 +213,6 @@ export const FeatureStrategyForm = ({ environmentId, ); const { strategyDefinition } = useStrategy(strategy?.name); - const newStrategyConfigurationFeedback = useUiFlag( - 'newStrategyConfigurationFeedback', - ); useEffect(() => { trackEvent('new-strategy-form', { @@ -312,15 +301,6 @@ export const FeatureStrategyForm = ({ navigate(formatFeaturePath(feature.project, feature.name)); }; - const createFeedbackContext = () => { - openFeedback({ - title: 'How easy was it to work with the new strategy form?', - positiveLabel: 'What do you like most about the new strategy form?', - areasForImprovementsLabel: - 'What should be improved the new strategy form?', - }); - }; - const onSubmitWithValidation = async (event: React.FormEvent) => { if (Array.isArray(strategy.variants) && strategy.variants?.length > 0) { trackEvent('strategy-variants', { @@ -343,19 +323,7 @@ export const FeatureStrategyForm = ({ if (enableProdGuard && !isChangeRequest) { setShowProdGuard(true); } else { - await onSubmitWithFeedback(); - } - }; - - const onSubmitWithFeedback = async () => { - try { - await onSubmit(); - - if (newStrategyConfigurationFeedback && !hasSubmittedFeedback) { - createFeedbackContext(); - } - } catch (e) { - console.error(e); + onSubmit(); } }; @@ -584,7 +552,7 @@ export const FeatureStrategyForm = ({ setShowProdGuard(false)} - onClick={onSubmitWithFeedback} + onClick={onSubmit} loading={loading} label='Save strategy' /> diff --git a/frontend/src/hooks/useSubmittedFeedback.ts b/frontend/src/hooks/useSubmittedFeedback.ts index e70cc95b3f09..6e4626c02e46 100644 --- a/frontend/src/hooks/useSubmittedFeedback.ts +++ b/frontend/src/hooks/useSubmittedFeedback.ts @@ -2,7 +2,6 @@ import { createLocalStorage } from '../utils/createLocalStorage'; export type IFeedbackCategory = | 'search' - | 'newStrategyForm' | 'insights' | 'applicationOverview' | 'newProjectOverview'; diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 4903f50a06a9..fcf17c85377e 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -67,7 +67,6 @@ export type UiFlags = { celebrateUnleash?: boolean; featureSearchFeedback?: Variant; enableLicense?: boolean; - newStrategyConfigurationFeedback?: boolean; adminTokenKillSwitch?: boolean; executiveDashboardUI?: boolean; feedbackComments?: Variant; diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index cc8472fbe5bd..22083d36eacf 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -130,7 +130,6 @@ exports[`should create default config 1`] = ` }, "migrationLock": true, "newContextFieldsUI": false, - "newStrategyConfigurationFeedback": false, "outdatedSdksBanner": false, "personalAccessTokensKillSwitch": false, "projectOverviewRefactor": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 33052b1632db..d98fadd1e81e 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -32,7 +32,6 @@ export type IFlagKey = | 'celebrateUnleash' | 'featureSearchFeedback' | 'featureSearchFeedbackPosting' - | 'newStrategyConfigurationFeedback' | 'edgeBulkMetrics' | 'extendedUsageMetrics' | 'adminTokenKillSwitch' @@ -165,10 +164,6 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_FEATURE_SEARCH_FEEDBACK_POSTING, false, ), - newStrategyConfigurationFeedback: parseEnvVarBoolean( - process.env.UNLEASH_EXPERIMENTAL_NEW_STRATEGY_CONFIGURATION_FEEDBACK, - false, - ), encryptEmails: parseEnvVarBoolean( process.env.UNLEASH_EXPERIMENTAL_ENCRYPT_EMAILS, false, diff --git a/src/server-dev.ts b/src/server-dev.ts index f8ed65f9ffb3..dd9785b0cae4 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -43,7 +43,6 @@ process.nextTick(async () => { stripClientHeadersOn304: true, stripHeadersOnAPI: true, celebrateUnleash: true, - newStrategyConfigurationFeedback: true, featureSearchFeedbackPosting: true, executiveDashboard: true, executiveDashboardUI: true,