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 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
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
Loading