-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename and deprecate Breadcrumb to Breadcrumbs (#1448)
* Rename and deprecate Breadcrum to Breadcrums * Update codemod for deprecated breadcrum * Remove codemod changes for now * Create itchy-horses-travel.md * Update src/__tests__/Breadcrumbs.tsx Co-authored-by: Cole Bemis <colebemis@github.com> * Add deprecation messages to old types * Remove injected classname * Optimize imports * Create pretty-walls-brake.md * Update deprecation comments Co-authored-by: Cole Bemis <colebemis@github.com>
- Loading branch information
Showing
10 changed files
with
92 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/components": patch | ||
--- | ||
|
||
Rename `Breadcrumb` component to `Breadcrumbs` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/components": major | ||
--- | ||
|
||
Remove `.Breadcrumb` classname from the root element of the `Breadcrumbs` component. This change shouldn't break anything unless you have styles, scripts, or tests that reference the `.Breadcrumb` classname. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react' | ||
import {Breadcrumbs, Breadcrumb} from '..' | ||
import {render, behavesAsComponent, checkExports} from '../utils/testing' | ||
import {COMMON} from '../constants' | ||
import {render as HTMLRender, cleanup} from '@testing-library/react' | ||
import {axe, toHaveNoViolations} from 'jest-axe' | ||
import 'babel-polyfill' | ||
expect.extend(toHaveNoViolations) | ||
|
||
describe('Breadcrumbs', () => { | ||
behavesAsComponent({Component: Breadcrumbs, systemPropArray: [COMMON]}) | ||
|
||
checkExports('Breadcrumbs', { | ||
default: Breadcrumbs, | ||
Breadcrumb | ||
}) | ||
|
||
it('should have no axe violations', async () => { | ||
const {container} = HTMLRender(<Breadcrumbs />) | ||
const results = await axe(container) | ||
expect(results).toHaveNoViolations() | ||
cleanup() | ||
}) | ||
|
||
it('renders a <nav>', () => { | ||
expect(render(<Breadcrumbs />).type).toEqual('nav') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters