Skip to content

Commit

Permalink
chore: remove featureSearchFrontend flag (#6066)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Jan 31, 2024
1 parent b2c127c commit c6a2303
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 1,252 deletions.
3 changes: 1 addition & 2 deletions frontend/cypress/integration/projects/overview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ describe('project overview', () => {
const featureToggleName = `${featureTogglePrefix}-${randomId}`;
const projectName = `unleash-e2e-project-overview-${randomId}`;
const baseUrl = Cypress.config().baseUrl;
const selectAll =
'[title="Toggle All Rows Selected"] input[type="checkbox"]';
const selectAll = '[title="Select all rows"] input[type="checkbox"]';

before(() => {
cy.runBefore();
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

0 comments on commit c6a2303

Please sign in to comment.