diff --git a/.changeset/pink-actors-cross.md b/.changeset/pink-actors-cross.md new file mode 100644 index 00000000000..56e5dfc2135 --- /dev/null +++ b/.changeset/pink-actors-cross.md @@ -0,0 +1,5 @@ +--- +'@primer/react': major +--- + +Remove the deprecated FilterList component from Primer React diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-colorblind-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-colorblind-linux.png deleted file mode 100644 index 7c488f299c7..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-dimmed-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-dimmed-linux.png deleted file mode 100644 index cfd41304a73..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-dimmed-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-high-contrast-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-high-contrast-linux.png deleted file mode 100644 index 1aa6277b03d..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-linux.png deleted file mode 100644 index 7c488f299c7..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-tritanopia-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-tritanopia-linux.png deleted file mode 100644 index 7c488f299c7..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-dark-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-colorblind-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-colorblind-linux.png deleted file mode 100644 index 031d26b8eac..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-high-contrast-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-high-contrast-linux.png deleted file mode 100644 index 77ff372a463..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-linux.png deleted file mode 100644 index 031d26b8eac..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-tritanopia-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-tritanopia-linux.png deleted file mode 100644 index 031d26b8eac..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Default-light-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-colorblind-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-colorblind-linux.png deleted file mode 100644 index 7c488f299c7..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-dimmed-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-dimmed-linux.png deleted file mode 100644 index cfd41304a73..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-dimmed-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-high-contrast-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-high-contrast-linux.png deleted file mode 100644 index 1aa6277b03d..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-linux.png deleted file mode 100644 index 7c488f299c7..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-tritanopia-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-tritanopia-linux.png deleted file mode 100644 index 7c488f299c7..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-dark-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-colorblind-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-colorblind-linux.png deleted file mode 100644 index 031d26b8eac..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-high-contrast-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-high-contrast-linux.png deleted file mode 100644 index 77ff372a463..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-linux.png deleted file mode 100644 index 031d26b8eac..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-tritanopia-linux.png b/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-tritanopia-linux.png deleted file mode 100644 index 031d26b8eac..00000000000 Binary files a/.playwright/snapshots/components/FilterList.test.ts-snapshots/FilterList-Playground-light-tritanopia-linux.png and /dev/null differ diff --git a/docs/content/FilterList.mdx b/docs/content/FilterList.mdx deleted file mode 100644 index f461920b99f..00000000000 --- a/docs/content/FilterList.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -componentId: filter_list -title: FilterList -status: Deprecated -description: The FilterList component is a menu with filter options that filter the main content of the page. -source: https://github.com/primer/react/tree/main/packages/react/src/FilterList ---- - -import data from '../../packages/react/src/deprecated/FilterList/FilterList.docs.json' - -## Deprecation - -Use [ActionList](/ActionList) instead. - -## Examples - -```jsx live - - - First Filter - - - Second Filter - - Third Filter - -``` - -## Props - - diff --git a/e2e/components/FilterList.test.ts b/e2e/components/FilterList.test.ts deleted file mode 100644 index d83ed9dd13b..00000000000 --- a/e2e/components/FilterList.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import {test, expect} from '@playwright/test' -import {visit} from '../test-helpers/storybook' -import {themes} from '../test-helpers/themes' - -test.describe('FilterList', () => { - test.describe('Default', () => { - for (const theme of themes) { - test.describe(theme, () => { - test('default @vrt', async ({page}) => { - await visit(page, { - id: 'deprecated-components-filterlist--default', - globals: { - colorScheme: theme, - }, - }) - - // Default state - expect(await page.screenshot()).toMatchSnapshot(`FilterList.Default.${theme}.png`) - }) - - test('axe @aat', async ({page}) => { - await visit(page, { - id: 'deprecated-components-filterlist--default', - globals: { - colorScheme: theme, - }, - }) - await expect(page).toHaveNoViolations() - }) - }) - } - }) - - test.describe('Playground', () => { - for (const theme of themes) { - test.describe(theme, () => { - test('default @vrt', async ({page}) => { - await visit(page, { - id: 'deprecated-components-filterlist--playground', - globals: { - colorScheme: theme, - }, - }) - - // Default state - expect(await page.screenshot()).toMatchSnapshot(`FilterList.Playground.${theme}.png`) - }) - - test('axe @aat', async ({page}) => { - await visit(page, { - id: 'deprecated-components-filterlist--playground', - globals: { - colorScheme: theme, - }, - }) - await expect(page).toHaveNoViolations() - }) - }) - } - }) -}) diff --git a/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap b/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap index 518f01381c6..88d05f1f2e1 100644 --- a/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap +++ b/packages/react/src/__tests__/__snapshots__/exports.test.ts.snap @@ -237,9 +237,6 @@ exports[`@primer/react/deprecated should not update exports without a semver cha "type DialogProps", "FilteredSearch", "type FilteredSearchProps", - "FilterList", - "type FilterListItemProps", - "type FilterListProps", "Octicon", "type OcticonProps", "Pagehead", diff --git a/packages/react/src/__tests__/deprecated/FilterList.test.tsx b/packages/react/src/__tests__/deprecated/FilterList.test.tsx deleted file mode 100644 index ab369022b4e..00000000000 --- a/packages/react/src/__tests__/deprecated/FilterList.test.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react' -import {FilterList} from '../../deprecated' -import {render, behavesAsComponent, checkExports} from '../../utils/testing' -import {render as HTMLRender} from '@testing-library/react' -import axe from 'axe-core' - -describe('FilterList', () => { - behavesAsComponent({Component: FilterList}) - - checkExports('deprecated/FilterList', { - default: FilterList, - }) - - it('should have no axe violations', async () => { - const {container} = HTMLRender(Hello) - const results = await axe.run(container) - expect(results).toHaveNoViolations() - }) - - it('renders a