Skip to content

Commit

Permalink
Merge branch 'next-major' into remove-pagelayout-pane-position-prop
Browse files Browse the repository at this point in the history
  • Loading branch information
radglob committed Jun 20, 2023
2 parents 1bd8fbc + eab4d15 commit f8025d1
Show file tree
Hide file tree
Showing 57 changed files with 177 additions and 543 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-dancers-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Deprecates FilterList and FilteredSearch components
5 changes: 5 additions & 0 deletions .changeset/old-coats-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Removes 'warning' option from form components' `validationStatus` props
9 changes: 6 additions & 3 deletions docs/content/FilterList.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
componentId: filter_list
title: FilterList
status: Alpha
status: Deprecated
description: The FilterList component is a menu with filter options that filter the main content of the page.
---

import data from '../../src/FilterList/FilterList.docs.json'
import data from '../../src/deprecated/FilterList/FilterList.docs.json'

The FilterList component is a menu with filter options that filter the main content of the page.
## Deprecation

Use [ActionList](/ActionList) instead.

## Examples

Expand Down
13 changes: 9 additions & 4 deletions docs/content/FilteredSearch.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
---
componentId: filtered_search
title: FilteredSearch
status: Alpha
status: Deprecated
description: The FilteredSearch component helps style an ActionMenu and a TextInput side-by-side.
---

import data from '../../src/FilteredSearch/FilteredSearch.docs.json'

The FilteredSearch component helps style an ActionMenu and a TextInput side-by-side.
import data from '../../src/deprecated/FilteredSearch/FilteredSearch.docs.json'

**Note:** You _must_ use a `TextInput` and `ActionMenu` (or native `<details>` and `<summary>`) in order for this component to work properly.

## Deprecation

A new filter component is in progress.

Until the new filter component is ready, you can use Button + TextInput + ActionList to reproduce this pattern.

## Examples

```jsx live
Expand Down
26 changes: 8 additions & 18 deletions docs/content/TextInput.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,26 +152,16 @@ render(<WithIconAndLoadingIndicator />)
</FormControl>
```

### With error and warning states
### With error state

```jsx live
<>
<TextInput
validationStatus="error"
aria-label="Zipcode"
name="zipcode"
placeholder="Error"
autoComplete="postal-code"
/>

<TextInput
validationStatus="warning"
aria-label="Zipcode"
name="zipcode"
placeholder="Warning"
autoComplete="postal-code"
/>
</>
<TextInput
validationStatus="error"
aria-label="Zipcode"
name="zipcode"
placeholder="Error"
autoComplete="postal-code"
/>
```

### Block text input
Expand Down
8 changes: 4 additions & 4 deletions docs/src/@primer/gatsby-theme-doctocat/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@
url: /Details
- title: Dialog
url: /Dialog
- title: FilteredSearch
url: /FilteredSearch
- title: FilterList
url: /FilterList
- title: Flash
url: /Flash
- title: FormControl
Expand Down Expand Up @@ -190,6 +186,10 @@
url: /deprecated/Dropdown
- title: DropdownMenu
url: /deprecated/DropdownMenu
- title: FilteredSearch
url: /deprecated/FilteredSearch
- title: FilterList
url: /deprecated/FilterList
- title: Flex
url: /deprecated/Flex
- title: FormGroup
Expand Down
34 changes: 0 additions & 34 deletions e2e/components/CheckboxGroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,38 +174,4 @@ test.describe('CheckboxGroup', () => {
})
}
})

test.describe('Warning', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-checkboxgroup-features--warning',
globals: {
colorScheme: theme,
},
})

// Default state
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(`CheckboxGroup.Warning.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-checkboxgroup-features--warning',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: false,
},
},
})
})
})
}
})
})
28 changes: 0 additions & 28 deletions e2e/components/RadioGroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,34 +143,6 @@ test.describe('RadioGroup', () => {
}
})

test.describe('Warning', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-radiogroup-features--warning',
globals: {
colorScheme: theme,
},
})

// Default state
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(`RadioGroup.Warning.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-radiogroup-features--warning',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations()
})
})
}
})

test.describe('With External Label', () => {
for (const theme of themes) {
test.describe(theme, () => {
Expand Down
35 changes: 0 additions & 35 deletions e2e/components/Select.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,41 +279,6 @@ test.describe('Select', () => {
}
})

test.describe('Warning', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-select-features--warning',
globals: {
colorScheme: theme,
},
})

// Default state
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(`Select.Warning.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-select-features--warning',
globals: {
colorScheme: theme,
},
})
await expect(page.getByText('Warning')).toBeVisible()
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: theme !== 'dark_dimmed',
},
},
})
})
})
}
})

test.describe('With Caption', () => {
for (const theme of themes) {
test.describe(theme, () => {
Expand Down
28 changes: 0 additions & 28 deletions e2e/components/TextInput.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,34 +227,6 @@ test.describe('TextInput', () => {
}
})

test.describe('Warning', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-textinput-features--warning',
globals: {
colorScheme: theme,
},
})

// Default state
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(`TextInput.Warning.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-textinput-features--warning',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations()
})
})
}
})

test.describe('With Caption', () => {
for (const theme of themes) {
test.describe(theme, () => {
Expand Down
28 changes: 0 additions & 28 deletions e2e/components/Textarea.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,34 +171,6 @@ test.describe('Textarea', () => {
}
})

test.describe('Warning', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-textarea-features--warning',
globals: {
colorScheme: theme,
},
})

// Default state
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(`Textarea.Warning.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-textarea-features--warning',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations()
})
})
}
})

test.describe('With Caption', () => {
for (const theme of themes) {
test.describe(theme, () => {
Expand Down
Loading

0 comments on commit f8025d1

Please sign in to comment.