Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove stale flags #8689

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -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",
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';
@@ -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({
@@ -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
@@ -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,
@@ -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}
@@ -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>
}
/>
</>
)}
</>
}
>
Original file line number Diff line number Diff line change
@@ -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": {},
9 changes: 0 additions & 9 deletions frontend/src/component/menu/routes.ts
Original file line number Diff line number Diff line change
@@ -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';
@@ -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
{
2 changes: 0 additions & 2 deletions frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
@@ -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;
24 changes: 0 additions & 24 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
@@ -28,8 +28,6 @@ export type IFlagKey =
| 'signals'
| 'automatedActions'
| 'celebrateUnleash'
| 'featureSearchFeedback'
| 'featureSearchFeedbackPosting'
| 'extendedUsageMetrics'
| 'adminTokenKillSwitch'
| 'feedbackComments'
@@ -44,7 +42,6 @@ export type IFlagKey =
| 'outdatedSdksBanner'
| 'responseTimeMetricsFix'
| 'disableShowContextFieldSelectionValues'
| 'projectOverviewRefactorFeedback'
| 'manyStrategiesPagination'
| 'enableLegacyVariants'
| 'extendedMetrics'
@@ -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,
@@ -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,
2 changes: 0 additions & 2 deletions src/server-dev.ts
Original file line number Diff line number Diff line change
@@ -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,