Skip to content

Commit

Permalink
docs: fix irregularities and update language (carbon-design-system#9349)
Browse files Browse the repository at this point in the history
* docs: fix irregularities and update language

* docs: fix lint err

Co-authored-by: Andrea N. Cardona <[email protected]>
Co-authored-by: Scott Strubberg <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Aug 2, 2021
1 parent a83021a commit fc76700
Show file tree
Hide file tree
Showing 49 changed files with 76 additions and 71 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,15 @@
"contributions": [
"code"
]
},
{
"login": "adamalston",
"name": "Adam Alston",
"avatar_url": "https://avatars.githubusercontent.com/u/18297826?v=4",
"profile": "https://github.com/adamalston",
"contributions": [
"doc"
]
}
],
"commitConvention": "none"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Breadcrumb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ import BreadcrumbSkeleton from './Breadcrumb.Skeleton';

export { Breadcrumb, BreadcrumbItem, BreadcrumbSkeleton };

// Maintain default export as Breadcrumb for backwards-compatability
// Maintain default export as Breadcrumb for backwards-compatibility
export default Breadcrumb;
4 changes: 2 additions & 2 deletions packages/react/src/components/Button/Button-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ describe('DangerButton', () => {
});

describe('danger--primaryButton', () => {
describe('Renders as exptected', () => {
describe('Renders as expected', () => {
const wrapper = shallow(
<Button kind="danger--primary" className="extra-class" />
);
Expand All @@ -320,7 +320,7 @@ describe('danger--primaryButton', () => {
});

describe('TertiaryButton', () => {
describe('Renders as exptected', () => {
describe('Renders as expected', () => {
const wrapper = shallow(<Button kind="tertiary" className="extra-class" />);

it('has the expected classes', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Button/button-avt.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Each screen reader should be tested when paired with its preferred browser.

### JAWS on Edge/Chrome

1. {tab} "Main fram, Button, button. To activate press SPACEBAR"
1. {tab} "Main frame, Button, button. To activate press SPACEBAR"

### NVDA on Firefox (optional, but recommended)

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Checkbox/Checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ input that is being exposed to the user and is a required prop.
### Checkbox onChange

You can use the `onChange` prop to pass in a custom function for event handling.
This prop recieves three arguements: a boolean, the checkbox id, and the dom
This prop receives three arguments: a boolean, the checkbox id, and the dom
event.

```jsx
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/ComboBox/ComboBox-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('ComboBox', () => {
expect(findMenuNode(wrapper).length).toBe(1);
});

it('should set `inputValue` to an empty string if a falsey-y value is given', () => {
it('should set `inputValue` to an empty string if a false-y value is given', () => {
const wrapper = mount(<ComboBox {...mockProps} />);
expect(wrapper.find('input').instance().value).toBe('');
});
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/ComboBox/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ ComboBox.propTypes = {

/**
* Optional function to render items as custom components instead of strings.
* Defaults to null and is overriden by a getter
* Defaults to null and is overridden by a getter
*/
itemToElement: PropTypes.func,

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/ComboBox/ComboBox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ and is typically used when there are a large amount of options to choose from.

## Disabled

A disabled comobobox is available but should not be used as the sole means of
A disabled combobox is available but should not be used as the sole means of
conveying information. For example, if the user must complete a previous form
input before moving on to the combobox, make sure to make that clear to the user
via an error state on the previous form element in adition to disabling the next
via an error state on the previous form element in addition to disabling the next
element.

<Preview>
Expand Down
18 changes: 7 additions & 11 deletions packages/react/src/components/ComposedModal/ComposedModal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,7 @@ There are four responsive
<ModalHeader />
<ModalBody>
<p className="bx--modal-content__text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
cursus fermentum risus, sit amet fringilla nunc pellentesque quis. Duis
quis odio ultrices, cursus lacus ac, posuere felis. Donec dignissim libero
in augue mattis, a molestie metus vestibulum. Aliquam placerat felis
ultrices lorem condimentum, nec ullamcorper felis porttitor.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse cursus fermentum risus, sit amet fringilla nunc pellentesque quis. Duis quis odio ultrices, cursus lacus ac, posuere felis. Donec dignissim libero in augue mattis, a molestie metus vestibulum. Aliquam placerat felis ultrices lorem condimentum, nec ullamcorper felis porttitor.
</p>
</ModalBody>
</ComposedModal>
Expand Down Expand Up @@ -217,17 +213,17 @@ With `<ComposedModal>`, you can control the buttons with the following code.
kind="secondary"
onClick={() => { (Run some action...) setOpen(false); }}>
Another button
</Buttton>
</Button>
<Button
kind="secondary"
onClick={() => { (Run some action...) setOpen(false); }}>
Secondary button
</Buttton>
</Button>
<Button
kind="primary"
onClick={() => { (Run some action...) setOpen(false); }}>
Priamry button
</Buttton>
Primary button
</Button>
</ModalFooter>
</ComposedModal>
```
Expand All @@ -240,7 +236,7 @@ clarity to an otherwise repetitive title and body message.
To use this pattern with `<Modal>`, you can omit the `children` prop.

```jsx
const modalHeadding =
const modalHeading =
'Are you sure you want to add the "Speech to Text" service ' +
'to the node-test app?';
...
Expand All @@ -255,7 +251,7 @@ To use this pattern with `<ComposedModal>`, you can omit `<ModalBody>`.

```jsx
<ComposedModal>
<ModalHeader label="Modla label">
<ModalHeader label="Modal label">
<h1>
Are you sure you want to add the "Speech to Text" service to the node-test
app?
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Copy/Copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function Copy({

Copy.propTypes = {
/**
* Pass in content to be rendred in the underlying `<button>`
* Pass in content to be rendered in the underlying `<button>`
*/
children: PropTypes.node,

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/DataTable/TableBatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TableBatchActions.propTypes = {

/**
* Hook required to listen for when the user initiates a cancel request
* through this comopnent
* through this component
*/
onCancel: PropTypes.func.isRequired,

Expand All @@ -97,7 +97,7 @@ TableBatchActions.propTypes = {

/**
* Supply a method to translate internal strings with your i18n tool of
* choice. Translation keys are avabile on the `translationKeys` field for
* choice. Translation keys are available on the `translationKeys` field for
* this component.
*/
translateWithId: PropTypes.func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ TableExpandHeader.propTypes = {

/**
* Specify whether this row is expanded or not. This helps coordinate data
* attributes so that `TableExpandRow` and `TableExapndedRow` work together
* attributes so that `TableExpandRow` and `TableExpandedRow` work together
*/
isExpanded: requiredIfGivenPropIsTruthy('enableExpando', PropTypes.bool),

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/TableExpandRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ TableExpandRow.propTypes = {

/**
* Specify whether this row is expanded or not. This helps coordinate data
* attributes so that `TableExpandRow` and `TableExapndedRow` work together
* attributes so that `TableExpandRow` and `TableExpandedRow` work together
*/
isExpanded: PropTypes.bool.isRequired,

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ TableHeader.propTypes = {

/**
* Supply a method to translate internal strings with your i18n tool of
* choice. Translation keys are avabile on the `translationKeys` field for
* choice. Translation keys are available on the `translationKeys` field for
* this component.
*/
translateWithId: PropTypes.func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ TableToolbarSearch.propTypes = {
placeholder: PropTypes.string,

/**
* Provide an optional className for the overal container of the Search
* Provide an optional className for the overall container of the Search
*/
searchContainerClass: PropTypes.string,

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/migrate-to-7.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ import Download16 from '@carbon/icons-react/lib/download/16';

## `<TableExpandedRow>`

- Now manages it's own TabelCell
- Now manages it's own TableCell
- Expects `colSpan` prop to determine width
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/state/sorting.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const getNextSortState = (props, state, { key }) => {
* @param {object} state.cellsById Lookup object for cells by id
* @param {Array<string>} state.initialRowOrder Initial row order for the
* current set of rows
* @param {string} key The key for the given header we are derving the
* @param {string} key The key for the given header we are serving the
* sorted state for
* @param {string} sortDirection The sortState that we want to order by
* @returns {object}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/tools/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

/**
* Default implemention of how we filter rows internally. The idea behind this
* Default implementation of how we filter rows internally. The idea behind this
* implementation is to use the given list of row ids and headers to get the
* individual cell values for a row. Then, we go through each cell value and see
* if any of them includes the given inputValue.
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/components/DatePicker/DatePicker-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('DatePicker', () => {
expect(wrapper.props().value).toEqual('11/08/2017');
});

it('should not initalize a calendar', () => {
it('should not initialize a calendar', () => {
expect(wrapper.cal).toEqual(undefined);
});
});
Expand All @@ -127,7 +127,7 @@ describe('DatePicker', () => {
).toBe(true);
});

it('should initalize a calendar', () => {
it('should initialize a calendar', () => {
expect(wrapper.instance().cal).toBeDefined();
});

Expand Down Expand Up @@ -206,7 +206,7 @@ describe('DatePicker', () => {
).toBe(true);
});

it('should initalize a calendar', () => {
it('should initialize a calendar', () => {
expect(wrapper.instance().cal).toBeDefined();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
export default (config) => (fp) => {
/**
* Adjusts the floating meun position after Flatpicker sets it.
* Adjusts the floating menu position after Flatpicker sets it.
*/
const handlePreCalendarPosition = () => {
Promise.resolve().then(() => {
Expand Down Expand Up @@ -43,7 +43,7 @@ export default (config) => (fp) => {
'Floating menu container must not have `position:static`.'
);
}
// `2` for negative mergin on calendar dropdown
// `2` for negative margin on calendar dropdown
calendarContainer.style.top = `${refBottom - containerTop + 2}px`;
calendarContainer.style.left = `${refLeft - containerLeft}px`;
});
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ Dropdown.propTypes = {

/**
* Function to render items as custom components instead of strings.
* Defaults to null and is overriden by a getter
* Defaults to null and is overridden by a getter
*/
itemToElement: PropTypes.func,

Expand Down Expand Up @@ -312,7 +312,7 @@ Dropdown.propTypes = {

/**
* `onChange` is a utility for this controlled component to communicate to a
* consuming component what kind of internal state changes are occuring.
* consuming component what kind of internal state changes are occurring.
*/
onChange: PropTypes.func,

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Grid/Grid.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ use the `as` prop to change this to another HTML element, or a custom component
from your project.

In the example below, we use the `as` prop on `Row` to change it from a `div` to
a `section`. Simililarly, we use the `as` prop on `Column` to change it from a
a `section`. Similarly, we use the `as` prop on `Column` to change it from a
`div` to an `article`.

```jsx
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/components/Icon/Icon-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ describe('Icon', () => {
expect(wrapper.props().className).toEqual('extra-class');
});

it('should recieve width props', () => {
it('should receive width props', () => {
expect(wrapper.props().width).toEqual('20');
});

it('should recieve height props', () => {
it('should receive height props', () => {
expect(wrapper.props().height).toEqual('20');
});

it('should recieve style props', () => {
it('should receive style props', () => {
expect(wrapper.props().style).toEqual({ transition: '2s' });
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ UxExample.storyName = 'UX example';
UxExample.parameters = {
info: {
text: `
This is a full example of how to levarage the <InlineLoading /> component to create a nice user experience when submitting a form.
This is a full example of how to leverage the <InlineLoading /> component to create a nice user experience when submitting a form.
For the full source code of this example, check out the 'story' panel below.
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('Loading', () => {
expect(container.length).toEqual(1);
});

it('shoud render a loader by default', () => {
it('should render a loader by default', () => {
expect(wrapper.find(Loading).length).toEqual(1);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ InlineLoading.propTypes = {
iconDescription: PropTypes.string,

/**
* Provide an optional handler to be inovked when <InlineLoading> is
* Provide an optional handler to be invoked when <InlineLoading> is
* successful
*/
onSuccess: PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Link/Link-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('Link', () => {
});

describe('keyboard support', () => {
it('should recieve keyboard focus', () => {
it('should receive keyboard focus', () => {
render(
<Link href="/" className="some-class">
A simple link
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/ListBox/ListBoxMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ListBoxMenuItem = React.forwardRef(function ListBoxMenuItem(

ListBoxMenuItem.propTypes = {
/**
* Specify any children nodes that hsould be rendered inside of the ListBox
* Specify any children nodes that should be rendered inside of the ListBox
* Menu Item
*/
children: PropTypes.node,
Expand All @@ -66,7 +66,7 @@ ListBoxMenuItem.propTypes = {
isActive: PropTypes.bool.isRequired,

/**
* Specify whether the current menu item is "highlighed".
* Specify whether the current menu item is "highlighted".
*/
isHighlighted: PropTypes.bool.isRequired,

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Loading/Loading-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('Loading', () => {
expect(loader.length).toEqual(1);
});

it('shoud render an svg', () => {
it('should render an svg', () => {
expect(svg.length).toEqual(1);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Menu/_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function elementFits(elementDimensions, position, boundaries, axis = 'x') {
* @param {number[]} [targetBoundaries] The boundaries of the target the element should attach to: [minX, minY, maxX, maxY]
* @param {number[]} [containerBoundaries] The boundaries of the container the element should be contained in: [minX, minY, maxX, maxY]
* @param {number} [preferredDirection=1] Which direction is preferred. Either 1 (right right) or -1 (to left)
* @returns {object} The determined position and direction of the elemnt: { position: [x, y], direction: 1 | -1 }
* @returns {object} The determined position and direction of the element: { position: [x, y], direction: 1 | -1 }
*/
export function getPosition(
elementDimensions,
Expand Down
Loading

0 comments on commit fc76700

Please sign in to comment.