1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

chore: remove stale flags (#8689)

- `projectOverviewRefactorFeedback`
- `featureSearchFeedbackPosting`
- `featureSearchFeedback`
This commit is contained in:
Tymoteusz Czech 2024-11-08 09:40:17 +01:00 committed by GitHub
parent c46ce85611
commit 656483d819
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 2 additions and 137 deletions

View File

@ -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",

View File

@ -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>
}
/>
</>
)}
</>
}
>

View File

@ -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": {},

View File

@ -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
{

View File

@ -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;

View File

@ -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,

View File

@ -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,