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:snapshot": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" yarn test -u",
"test:watch": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" vitest watch", "test:watch": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" vitest watch",
"lint:material:icons": "./check-imports.rc", "lint:material:icons": "./check-imports.rc",
"lint": "biome lint src --apply", "lint": "biome lint src --write",
"lint:check": "biome check src", "lint:check": "biome check src",
"fmt": "biome format src --write", "fmt": "biome format src --write",
"fmt:check": "biome check src", "fmt:check": "biome check src",

View File

@ -1,13 +1,5 @@
import { useCallback, useEffect, useMemo, useState, type VFC } from 'react'; import { useCallback, useEffect, useMemo, useState, type VFC } from 'react';
import { import { Box, Link, useMediaQuery, useTheme } from '@mui/material';
Box,
Button,
IconButton,
Link,
Tooltip,
useMediaQuery,
useTheme,
} from '@mui/material';
import { Link as RouterLink } from 'react-router-dom'; import { Link as RouterLink } from 'react-router-dom';
import { createColumnHelper, useReactTable } from '@tanstack/react-table'; import { createColumnHelper, useReactTable } from '@tanstack/react-table';
import { PaginatedTable, TablePlaceholder } from 'component/common/Table'; import { PaginatedTable, TablePlaceholder } from 'component/common/Table';
@ -34,12 +26,9 @@ import { FeatureToggleFilters } from './FeatureToggleFilters/FeatureToggleFilter
import { withTableState } from 'utils/withTableState'; import { withTableState } from 'utils/withTableState';
import { FeatureTagCell } from 'component/common/Table/cells/FeatureTagCell/FeatureTagCell'; import { FeatureTagCell } from 'component/common/Table/cells/FeatureTagCell/FeatureTagCell';
import { FeatureSegmentCell } from 'component/common/Table/cells/FeatureSegmentCell/FeatureSegmentCell'; import { FeatureSegmentCell } from 'component/common/Table/cells/FeatureSegmentCell/FeatureSegmentCell';
import { useUiFlag } from 'hooks/useUiFlag';
import { FeatureToggleListActions } from './FeatureToggleListActions/FeatureToggleListActions'; import { FeatureToggleListActions } from './FeatureToggleListActions/FeatureToggleListActions';
import useLoading from 'hooks/useLoading'; import useLoading from 'hooks/useLoading';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
import { useFeedback } from '../../feedbackNew/useFeedback';
import ReviewsOutlined from '@mui/icons-material/ReviewsOutlined';
import { useGlobalFeatureSearch } from './useGlobalFeatureSearch'; import { useGlobalFeatureSearch } from './useGlobalFeatureSearch';
export const featuresPlaceholder = Array(15).fill({ export const featuresPlaceholder = Array(15).fill({
@ -55,7 +44,6 @@ const feedbackCategory = 'search';
export const FeatureToggleListTable: VFC = () => { export const FeatureToggleListTable: VFC = () => {
const theme = useTheme(); const theme = useTheme();
const featureSearchFeedback = useUiFlag('featureSearchFeedback');
const { trackEvent } = usePlausibleTracker(); const { trackEvent } = usePlausibleTracker();
const { environments } = useEnvironments(); const { environments } = useEnvironments();
const enabledEnvironments = environments const enabledEnvironments = environments
@ -68,17 +56,6 @@ export const FeatureToggleListTable: VFC = () => {
const { setToastApiError } = useToast(); const { setToastApiError } = useToast();
const { uiConfig } = useUiConfig(); const { uiConfig } = useUiConfig();
const variant =
featureSearchFeedback !== false
? (featureSearchFeedback?.name ?? '')
: '';
const { openFeedback } = useFeedback(
feedbackCategory,
'automatic',
variant,
);
const { const {
features, features,
total, total,
@ -269,15 +246,6 @@ export const FeatureToggleListTable: VFC = () => {
return null; 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 ( return (
<PageContent <PageContent
disableLoading={true} disableLoading={true}
@ -322,64 +290,6 @@ export const FeatureToggleListTable: VFC = () => {
<FeatureToggleListActions <FeatureToggleListActions
onExportClick={() => setShowExportDialog(true)} 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", "title": "Environments",
"type": "protected", "type": "protected",
}, },
{
"component": [Function],
"flag": "featureSearchFeedbackPosting",
"menu": {},
"path": "/feedback",
"title": "Feedback",
"type": "protected",
},
{ {
"component": [Function], "component": [Function],
"menu": {}, "menu": {},

View File

@ -43,7 +43,6 @@ import { ViewIntegration } from 'component/integrations/ViewIntegration/ViewInte
import { PaginatedApplicationList } from '../application/ApplicationList/PaginatedApplicationList'; import { PaginatedApplicationList } from '../application/ApplicationList/PaginatedApplicationList';
import { AddonRedirect } from 'component/integrations/AddonRedirect/AddonRedirect'; import { AddonRedirect } from 'component/integrations/AddonRedirect/AddonRedirect';
import { Insights } from '../insights/Insights'; import { Insights } from '../insights/Insights';
import { FeedbackList } from '../feedbackNew/FeedbackList';
import { Application } from 'component/application/Application'; import { Application } from 'component/application/Application';
import { Signals } from 'component/signals/Signals'; import { Signals } from 'component/signals/Signals';
import { LazyCreateProject } from '../project/Project/CreateProject/LazyCreateProject'; import { LazyCreateProject } from '../project/Project/CreateProject/LazyCreateProject';
@ -279,14 +278,6 @@ export const routes: IRoute[] = [
menu: { mobile: true, advanced: true }, menu: { mobile: true, advanced: true },
enterprise: true, enterprise: true,
}, },
{
path: '/feedback',
title: 'Feedback',
component: FeedbackList,
type: 'protected',
flag: 'featureSearchFeedbackPosting',
menu: {},
},
// Tags // Tags
{ {

View File

@ -71,12 +71,10 @@ export type UiFlags = {
signals?: boolean; signals?: boolean;
automatedActions?: boolean; automatedActions?: boolean;
celebrateUnleash?: boolean; celebrateUnleash?: boolean;
featureSearchFeedback?: Variant;
enableLicense?: boolean; enableLicense?: boolean;
adminTokenKillSwitch?: boolean; adminTokenKillSwitch?: boolean;
feedbackComments?: Variant; feedbackComments?: Variant;
showInactiveUsers?: boolean; showInactiveUsers?: boolean;
featureSearchFeedbackPosting?: boolean;
userAccessUIEnabled?: boolean; userAccessUIEnabled?: boolean;
outdatedSdksBanner?: boolean; outdatedSdksBanner?: boolean;
estimateTrafficDataCost?: boolean; estimateTrafficDataCost?: boolean;

View File

@ -28,8 +28,6 @@ export type IFlagKey =
| 'signals' | 'signals'
| 'automatedActions' | 'automatedActions'
| 'celebrateUnleash' | 'celebrateUnleash'
| 'featureSearchFeedback'
| 'featureSearchFeedbackPosting'
| 'extendedUsageMetrics' | 'extendedUsageMetrics'
| 'adminTokenKillSwitch' | 'adminTokenKillSwitch'
| 'feedbackComments' | 'feedbackComments'
@ -44,7 +42,6 @@ export type IFlagKey =
| 'outdatedSdksBanner' | 'outdatedSdksBanner'
| 'responseTimeMetricsFix' | 'responseTimeMetricsFix'
| 'disableShowContextFieldSelectionValues' | 'disableShowContextFieldSelectionValues'
| 'projectOverviewRefactorFeedback'
| 'manyStrategiesPagination' | 'manyStrategiesPagination'
| 'enableLegacyVariants' | 'enableLegacyVariants'
| 'extendedMetrics' | 'extendedMetrics'
@ -147,23 +144,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_CELEBRATE_UNLEASH, process.env.UNLEASH_EXPERIMENTAL_CELEBRATE_UNLEASH,
false, 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( encryptEmails: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ENCRYPT_EMAILS, process.env.UNLEASH_EXPERIMENTAL_ENCRYPT_EMAILS,
false, false,
@ -234,10 +214,6 @@ const flags: IFlags = {
.UNLEASH_EXPERIMENTAL_DISABLE_SHOW_CONTEXT_FIELD_SELECTION_VALUES, .UNLEASH_EXPERIMENTAL_DISABLE_SHOW_CONTEXT_FIELD_SELECTION_VALUES,
false, false,
), ),
projectOverviewRefactorFeedback: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_PROJECT_OVERVIEW_REFACTOR_FEEDBACK,
false,
),
manyStrategiesPagination: parseEnvVarBoolean( manyStrategiesPagination: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_MANY_STRATEGIES_PAGINATION, process.env.UNLEASH_EXPERIMENTAL_MANY_STRATEGIES_PAGINATION,
false, false,

View File

@ -41,11 +41,9 @@ process.nextTick(async () => {
anonymiseEventLog: false, anonymiseEventLog: false,
responseTimeWithAppNameKillSwitch: false, responseTimeWithAppNameKillSwitch: false,
celebrateUnleash: true, celebrateUnleash: true,
featureSearchFeedbackPosting: true,
userAccessUIEnabled: true, userAccessUIEnabled: true,
outdatedSdksBanner: true, outdatedSdksBanner: true,
disableShowContextFieldSelectionValues: false, disableShowContextFieldSelectionValues: false,
projectOverviewRefactorFeedback: true,
manyStrategiesPagination: true, manyStrategiesPagination: true,
enableLegacyVariants: false, enableLegacyVariants: false,
extendedMetrics: true, extendedMetrics: true,