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 featureSearchFrontend flag #6066

Merged
merged 13 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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 @@ -56,11 +56,7 @@ export const ApplicationList = () => {
() => [
{
id: 'Icon',
Cell: ({
row: {
original: { icon },
},
}: any) => (
Cell: ({ row: { original: { icon } } }: any) => (
<IconCell
icon={
<Avatar>
Expand All @@ -76,9 +72,7 @@ export const ApplicationList = () => {
accessor: 'appName',
width: '50%',
Cell: ({
row: {
original: { appName, description },
},
row: { original: { appName, description } },
}: any) => (
<LinkCell
title={appName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,7 @@ export const ChangeRequestsTabs = ({
.includes(feature.name.toLowerCase()),
);
},
Cell: ({
value,
row: {
original: { title },
},
}: any) => (
Cell: ({ value, row: { original: { title } } }: any) => (
<FeaturesCell
project={projectId}
value={value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ const ContextList: VFC = () => {
Header: 'Name',
accessor: 'name',
width: '70%',
Cell: ({
row: {
original: { name, description },
},
}: any) => (
Cell: ({ row: { original: { name, description } } }: any) => (
<LinkCell
title={name}
to={`/context/edit/${name}`}
Expand All @@ -95,11 +91,7 @@ const ContextList: VFC = () => {
Header: 'Actions',
id: 'Actions',
align: 'center',
Cell: ({
row: {
original: { name },
},
}: any) => (
Cell: ({ row: { original: { name } } }: any) => (
<ContextActionsCell
name={name}
onDelete={() => {
Expand Down
21 changes: 12 additions & 9 deletions frontend/src/component/demo/DemoSteps/DemoSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,18 @@ export const DemoSteps = ({
const currentStep = currentTopic.steps[step];
if (!currentStep) return;

setTimeout(() => {
if (
currentStep.href &&
!location.pathname.endsWith(currentStep.href.split('?')[0])
) {
navigate(currentStep.href);
}
waitForLoad(currentStep);
}, currentStep.delay ?? 0);
setTimeout(
() => {
if (
currentStep.href &&
!location.pathname.endsWith(currentStep.href.split('?')[0])
) {
navigate(currentStep.href);
}
waitForLoad(currentStep);
},
currentStep.delay ?? 0,
);
}, [topic, step]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Paper, styled, Typography } from '@mui/material';
import { Box, styled, Typography } from '@mui/material';
import { PageHeader } from 'component/common/PageHeader/PageHeader';
import { VFC } from 'react';
import { UsersChart } from './UsersChart/UsersChart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ const setupNoFeaturesReturned = () =>
});

const setupApi = (features: APIFeature[], projects: APIProject[]) => {
testServerRoute(server, '/api/admin/ui-config', {
flags: {
featureSearchFrontend: true,
},
});

testServerRoute(server, '/api/admin/projects', {
projects,
});
Expand Down Expand Up @@ -146,6 +140,6 @@ test('Filter table by project', async () => {
'No feature toggles found matching your criteria. Get started by adding a new feature toggle.',
);
expect(window.location.href).toContain(
'?sort=createdAt&order=desc&offset=0&columns=&project=IS%3Aproject-b',
'?offset=0&columns=&project=IS%3Aproject-b',
);
}, 10000);
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import { usePersistentTableState } from 'hooks/usePersistentTableState';
import { FeatureTagCell } from 'component/common/Table/cells/FeatureTagCell/FeatureTagCell';
import { FeatureSegmentCell } from 'component/common/Table/cells/FeatureSegmentCell/FeatureSegmentCell';
import { useUiFlag } from 'hooks/useUiFlag';
import { FeatureToggleListTable as LegacyFeatureToggleListTable } from './LegacyFeatureToggleListTable';
import { FeatureToggleListActions } from './FeatureToggleListActions/FeatureToggleListActions';
import useLoading from 'hooks/useLoading';
import { usePlausibleTracker } from 'hooks/usePlausibleTracker';
Expand All @@ -68,7 +67,7 @@ export const featuresPlaceholder = Array(15).fill({
const columnHelper = createColumnHelper<FeatureSearchResponseSchema>();
const feedbackCategory = 'search';

const FeatureToggleListTableComponent: VFC = () => {
export const FeatureToggleListTable: VFC = () => {
const theme = useTheme();
const { openFeedback } = useFeedback(feedbackCategory, 'automatic');
const { trackEvent } = usePlausibleTracker();
Expand Down Expand Up @@ -428,11 +427,3 @@ const FeatureToggleListTableComponent: VFC = () => {
</PageContent>
);
};

export const FeatureToggleListTable: VFC = () => {
const featureSearchFrontend = useUiFlag('featureSearchFrontend');

if (featureSearchFrontend) return <FeatureToggleListTableComponent />;

return <LegacyFeatureToggleListTable />;
};
Loading
Loading