Skip to content

Commit

Permalink
chore: remove stale flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek committed Nov 7, 2024
1 parent e039cdc commit a6b364d
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 137 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test:snapshot": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" yarn test -u",
"test:watch": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" vitest watch",
"lint:material:icons": "./check-imports.rc",
"lint": "biome lint src --apply",
"lint": "biome lint src --write",
"lint:check": "biome check src",
"fmt": "biome format src --write",
"fmt:check": "biome check src",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { useCallback, useEffect, useMemo, useState, type VFC } from 'react';
import {
Box,
Button,
IconButton,
Link,
Tooltip,
useMediaQuery,
useTheme,
} from '@mui/material';
import { Box, Link, useMediaQuery, useTheme } from '@mui/material';
import { Link as RouterLink } from 'react-router-dom';
import { createColumnHelper, useReactTable } from '@tanstack/react-table';
import { PaginatedTable, TablePlaceholder } from 'component/common/Table';
Expand All @@ -34,12 +26,9 @@ import { FeatureToggleFilters } from './FeatureToggleFilters/FeatureToggleFilter
import { withTableState } from 'utils/withTableState';
import { FeatureTagCell } from 'component/common/Table/cells/FeatureTagCell/FeatureTagCell';
import { FeatureSegmentCell } from 'component/common/Table/cells/FeatureSegmentCell/FeatureSegmentCell';
import { useUiFlag } from 'hooks/useUiFlag';
import { FeatureToggleListActions } from './FeatureToggleListActions/FeatureToggleListActions';
import useLoading from 'hooks/useLoading';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
import { useFeedback } from '../../feedbackNew/useFeedback';
import ReviewsOutlined from '@mui/icons-material/ReviewsOutlined';
import { useGlobalFeatureSearch } from './useGlobalFeatureSearch';

export const featuresPlaceholder = Array(15).fill({
Expand All @@ -55,7 +44,6 @@ const feedbackCategory = 'search';

export const FeatureToggleListTable: VFC = () => {
const theme = useTheme();
const featureSearchFeedback = useUiFlag('featureSearchFeedback');
const { trackEvent } = usePlausibleTracker();
const { environments } = useEnvironments();
const enabledEnvironments = environments
Expand All @@ -68,17 +56,6 @@ export const FeatureToggleListTable: VFC = () => {
const { setToastApiError } = useToast();
const { uiConfig } = useUiConfig();

const variant =
featureSearchFeedback !== false
? (featureSearchFeedback?.name ?? '')
: '';

const { openFeedback } = useFeedback(
feedbackCategory,
'automatic',
variant,
);

const {
features,
total,
Expand Down Expand Up @@ -269,15 +246,6 @@ export const FeatureToggleListTable: VFC = () => {
return null;
}

const createFeedbackContext = () => {
openFeedback({
title: 'How easy was it to use search and filters?',
positiveLabel: 'What do you like most about search and filters?',
areasForImprovementsLabel:
'What should be improved in search and filters page?',
});
};

return (
<PageContent
disableLoading={true}
Expand Down Expand Up @@ -322,64 +290,6 @@ export const FeatureToggleListTable: VFC = () => {
<FeatureToggleListActions
onExportClick={() => setShowExportDialog(true)}
/>
{featureSearchFeedback !== false &&
featureSearchFeedback?.enabled && (
<>
<ConditionallyRender
condition={
variant === 'withoutText'
}
show={
<Tooltip
title='Provide feedback'
arrow
>
<IconButton
onClick={
createFeedbackContext
}
size='large'
>
<ReviewsOutlined />
</IconButton>
</Tooltip>
}
/>
<ConditionallyRender
condition={variant === 'withText'}
show={
<Button
startIcon={
<ReviewsOutlined />
}
onClick={
createFeedbackContext
}
>
Provide feedback
</Button>
}
/>{' '}
<ConditionallyRender
condition={
variant === 'withTextOutlined'
}
show={
<Button
startIcon={
<ReviewsOutlined />
}
onClick={
createFeedbackContext
}
variant='outlined'
>
Provide feedback
</Button>
}
/>
</>
)}
</>
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,6 @@ exports[`returns all baseRoutes 1`] = `
"title": "Environments",
"type": "protected",
},
{
"component": [Function],
"flag": "featureSearchFeedbackPosting",
"menu": {},
"path": "/feedback",
"title": "Feedback",
"type": "protected",
},
{
"component": [Function],
"menu": {},
Expand Down
9 changes: 0 additions & 9 deletions frontend/src/component/menu/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import { ViewIntegration } from 'component/integrations/ViewIntegration/ViewInte
import { PaginatedApplicationList } from '../application/ApplicationList/PaginatedApplicationList';
import { AddonRedirect } from 'component/integrations/AddonRedirect/AddonRedirect';
import { Insights } from '../insights/Insights';
import { FeedbackList } from '../feedbackNew/FeedbackList';
import { Application } from 'component/application/Application';
import { Signals } from 'component/signals/Signals';
import { LazyCreateProject } from '../project/Project/CreateProject/LazyCreateProject';
Expand Down Expand Up @@ -279,14 +278,6 @@ export const routes: IRoute[] = [
menu: { mobile: true, advanced: true },
enterprise: true,
},
{
path: '/feedback',
title: 'Feedback',
component: FeedbackList,
type: 'protected',
flag: 'featureSearchFeedbackPosting',
menu: {},
},

// Tags
{
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ export type UiFlags = {
signals?: boolean;
automatedActions?: boolean;
celebrateUnleash?: boolean;
featureSearchFeedback?: Variant;
enableLicense?: boolean;
adminTokenKillSwitch?: boolean;
feedbackComments?: Variant;
showInactiveUsers?: boolean;
featureSearchFeedbackPosting?: boolean;
userAccessUIEnabled?: boolean;
outdatedSdksBanner?: boolean;
estimateTrafficDataCost?: boolean;
Expand Down
24 changes: 0 additions & 24 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export type IFlagKey =
| 'signals'
| 'automatedActions'
| 'celebrateUnleash'
| 'featureSearchFeedback'
| 'featureSearchFeedbackPosting'
| 'extendedUsageMetrics'
| 'adminTokenKillSwitch'
| 'feedbackComments'
Expand All @@ -44,7 +42,6 @@ export type IFlagKey =
| 'outdatedSdksBanner'
| 'responseTimeMetricsFix'
| 'disableShowContextFieldSelectionValues'
| 'projectOverviewRefactorFeedback'
| 'manyStrategiesPagination'
| 'enableLegacyVariants'
| 'extendedMetrics'
Expand Down Expand Up @@ -147,23 +144,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_CELEBRATE_UNLEASH,
false,
),
featureSearchFeedback: {
name: 'withText',
enabled: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_FEATURE_SEARCH_FEEDBACK,
false,
),
payload: {
type: PayloadType.JSON,
value:
process.env
.UNLEASH_EXPERIMENTAL_FEATURE_SEARCH_FEEDBACK_PAYLOAD ?? '',
},
},
featureSearchFeedbackPosting: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_FEATURE_SEARCH_FEEDBACK_POSTING,
false,
),
encryptEmails: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ENCRYPT_EMAILS,
false,
Expand Down Expand Up @@ -234,10 +214,6 @@ const flags: IFlags = {
.UNLEASH_EXPERIMENTAL_DISABLE_SHOW_CONTEXT_FIELD_SELECTION_VALUES,
false,
),
projectOverviewRefactorFeedback: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_PROJECT_OVERVIEW_REFACTOR_FEEDBACK,
false,
),
manyStrategiesPagination: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_MANY_STRATEGIES_PAGINATION,
false,
Expand Down
2 changes: 0 additions & 2 deletions src/server-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ process.nextTick(async () => {
anonymiseEventLog: false,
responseTimeWithAppNameKillSwitch: false,
celebrateUnleash: true,
featureSearchFeedbackPosting: true,
userAccessUIEnabled: true,
outdatedSdksBanner: true,
disableShowContextFieldSelectionValues: false,
projectOverviewRefactorFeedback: true,
manyStrategiesPagination: true,
enableLegacyVariants: false,
extendedMetrics: true,
Expand Down

0 comments on commit a6b364d

Please sign in to comment.