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

[Gitar] Cleaning up stale flag: featureSearchFeedback with value true #8369

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ 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';
Expand All @@ -55,7 +54,7 @@ const feedbackCategory = 'search';

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

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

const { openFeedback } = useFeedback(
feedbackCategory,
Expand Down Expand Up @@ -322,64 +318,53 @@ 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 />
}
{featureSearchFeedback?.enabled && (
<>
<ConditionallyRender
condition={variant === 'withoutText'}
show={
<Tooltip
title='Provide feedback'
arrow
>
<IconButton
onClick={
createFeedbackContext
}
variant='outlined'
size='large'
>
Provide feedback
</Button>
}
/>
</>
)}
<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
1 change: 0 additions & 1 deletion frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export type UiFlags = {
signals?: boolean;
automatedActions?: boolean;
celebrateUnleash?: boolean;
featureSearchFeedback?: Variant;
enableLicense?: boolean;
adminTokenKillSwitch?: boolean;
feedbackComments?: Variant;
Expand Down
14 changes: 0 additions & 14 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export type IFlagKey =
| 'signals'
| 'automatedActions'
| 'celebrateUnleash'
| 'featureSearchFeedback'
| 'featureSearchFeedbackPosting'
| 'extendedUsageMetrics'
| 'adminTokenKillSwitch'
Expand Down Expand Up @@ -147,19 +146,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,
Expand Down
Loading