Skip to content

Commit

Permalink
[ExpansionPanel] Rename to Accordion (mui#21494)
Browse files Browse the repository at this point in the history
* wip

* wip

* reverted some changes

* sorting

* migration

* fix in migration

* fix in migration

* fix in migration

* Update docs/src/pages/getting-started/supported-components/supported-components.md

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* added redirect

* fixed material design links

* codemod fix

* prettier + formatted

* changed accordions to accordion

* docs:api

* renamed accordions to accordion

* Update docs/src/pages/components/accordion/accordion.md

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* Update docs/src/pages/components/accordion/accordion.md

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* Update docs/src/pages/components/accordion/accordion.md

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* added deprecated exports for ExpansionPanel components

* added motivation for renaming component

* Update docs/src/pages/components/accordion/accordion.md

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* Update docs/src/pages/guides/migration-v4/migration-v4.md

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* Update docs/src/pages/guides/migration-v4/migration-v4.md

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>

* cleandup migration

* prettier

* changed comments on deprecated components

* removed

* reverted del files

* renamed

* fixed d.ts fiels

* r

* added

* renamed

* renamed types

* redirects

* Revert markdown source changes

* Move markdown source from expansion-panel to accordion

* Expansion Panel -> Accordion

* Revert attempt at renaming

Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com>
  • Loading branch information
3 people committed Jun 24, 2020
1 parent 9e7c0c1 commit 109e334
Show file tree
Hide file tree
Showing 85 changed files with 1,089 additions and 860 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';

const pageFilename = 'api/expansion-panel-actions';
const requireRaw = require.context('!raw-loader!./', false, /\/expansion-panel-actions\.md$/);
const pageFilename = 'api/accordion-actions';
const requireRaw = require.context('!raw-loader!./', false, /\/accordion-actions\.md$/);

export default function Page({ docs }) {
return <MarkdownDocs docs={docs} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
filename: /packages/material-ui/src/ExpansionPanelActions/ExpansionPanelActions.js
filename: /packages/material-ui/src/AccordionActions/AccordionActions.js
---

<!--- This documentation is automatically generated, do not try to edit it. -->

# ExpansionPanelActions API
# AccordionActions API

<p class="description">The API documentation of the ExpansionPanelActions React component. Learn more about the props and the CSS customization points.</p>
<p class="description">The API documentation of the AccordionActions React component. Learn more about the props and the CSS customization points.</p>

## Import

```js
import ExpansionPanelActions from '@material-ui/core/ExpansionPanelActions';
import AccordionActions from '@material-ui/core/AccordionActions';
// or
import { ExpansionPanelActions } from '@material-ui/core';
import { AccordionActions } from '@material-ui/core';
```

You can learn more about the difference by [reading this guide](/guides/minimizing-bundle-size/).
Expand All @@ -22,7 +22,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi

## Component name

The `MuiExpansionPanelActions` name can be used for providing [default props](/customization/globals/#default-props) or [style overrides](/customization/globals/#css) at the theme level.
The `MuiAccordionActions` name can be used for providing [default props](/customization/globals/#default-props) or [style overrides](/customization/globals/#css) at the theme level.

## Props

Expand All @@ -40,18 +40,18 @@ Any other props supplied will be provided to the root element (native element).

| Rule name | Global class | Description |
|:-----|:-------------|:------------|
| <span class="prop-name">root</span> | <span class="prop-name">.MuiExpansionPanelActions-root</span> | Styles applied to the root element.
| <span class="prop-name">spacing</span> | <span class="prop-name">.MuiExpansionPanelActions-spacing</span> | Styles applied to the root element if `disableSpacing={false}`.
| <span class="prop-name">root</span> | <span class="prop-name">.MuiAccordionActions-root</span> | Styles applied to the root element.
| <span class="prop-name">spacing</span> | <span class="prop-name">.MuiAccordionActions-spacing</span> | Styles applied to the root element if `disableSpacing={false}`.

You can override the style of the component thanks to one of these customization points:

- With a rule name of the [`classes` object prop](/customization/components/#overriding-styles-with-classes).
- With a [global class name](/customization/components/#overriding-styles-with-global-class-names).
- With a theme and an [`overrides` property](/customization/globals/#css).

If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/ExpansionPanelActions/ExpansionPanelActions.js) for more detail.
If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/AccordionActions/AccordionActions.js) for more detail.

## Demos

- [Expansion Panels](/components/expansion-panels/)
- [Accordion](/components/accordion/)

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';

const pageFilename = 'api/expansion-panel-summary';
const requireRaw = require.context('!raw-loader!./', false, /\/expansion-panel-summary\.md$/);
const pageFilename = 'api/accordion-details';
const requireRaw = require.context('!raw-loader!./', false, /\/accordion-details\.md$/);

export default function Page({ docs }) {
return <MarkdownDocs docs={docs} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
filename: /packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js
filename: /packages/material-ui/src/AccordionDetails/AccordionDetails.js
---

<!--- This documentation is automatically generated, do not try to edit it. -->

# ExpansionPanelDetails API
# AccordionDetails API

<p class="description">The API documentation of the ExpansionPanelDetails React component. Learn more about the props and the CSS customization points.</p>
<p class="description">The API documentation of the AccordionDetails React component. Learn more about the props and the CSS customization points.</p>

## Import

```js
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';
import AccordionDetails from '@material-ui/core/AccordionDetails';
// or
import { ExpansionPanelDetails } from '@material-ui/core';
import { AccordionDetails } from '@material-ui/core';
```

You can learn more about the difference by [reading this guide](/guides/minimizing-bundle-size/).
Expand All @@ -22,13 +22,13 @@ You can learn more about the difference by [reading this guide](/guides/minimizi

## Component name

The `MuiExpansionPanelDetails` name can be used for providing [default props](/customization/globals/#default-props) or [style overrides](/customization/globals/#css) at the theme level.
The `MuiAccordionDetails` name can be used for providing [default props](/customization/globals/#default-props) or [style overrides](/customization/globals/#css) at the theme level.

## Props

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | The content of the expansion panel details. |
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | The content of the accordion details. |
| <span class="prop-name">classes</span> | <span class="prop-type">object</span> | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |

The `ref` is forwarded to the root element.
Expand All @@ -39,17 +39,17 @@ Any other props supplied will be provided to the root element (native element).

| Rule name | Global class | Description |
|:-----|:-------------|:------------|
| <span class="prop-name">root</span> | <span class="prop-name">.MuiExpansionPanelDetails-root</span> | Styles applied to the root element.
| <span class="prop-name">root</span> | <span class="prop-name">.MuiAccordionDetails-root</span> | Styles applied to the root element.

You can override the style of the component thanks to one of these customization points:

- With a rule name of the [`classes` object prop](/customization/components/#overriding-styles-with-classes).
- With a [global class name](/customization/components/#overriding-styles-with-global-class-names).
- With a theme and an [`overrides` property](/customization/globals/#css).

If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js) for more detail.
If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/AccordionDetails/AccordionDetails.js) for more detail.

## Demos

- [Expansion Panels](/components/expansion-panels/)
- [Accordion](/components/accordion/)

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';

const pageFilename = 'api/expansion-panel-details';
const requireRaw = require.context('!raw-loader!./', false, /\/expansion-panel-details\.md$/);
const pageFilename = 'api/accordion-summary';
const requireRaw = require.context('!raw-loader!./', false, /\/accordion-summary\.md$/);

export default function Page({ docs }) {
return <MarkdownDocs docs={docs} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
filename: /packages/material-ui/src/ExpansionPanelSummary/ExpansionPanelSummary.js
filename: /packages/material-ui/src/AccordionSummary/AccordionSummary.js
---

<!--- This documentation is automatically generated, do not try to edit it. -->

# ExpansionPanelSummary API
# AccordionSummary API

<p class="description">The API documentation of the ExpansionPanelSummary React component. Learn more about the props and the CSS customization points.</p>
<p class="description">The API documentation of the AccordionSummary React component. Learn more about the props and the CSS customization points.</p>

## Import

```js
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';
import AccordionSummary from '@material-ui/core/AccordionSummary';
// or
import { ExpansionPanelSummary } from '@material-ui/core';
import { AccordionSummary } from '@material-ui/core';
```

You can learn more about the difference by [reading this guide](/guides/minimizing-bundle-size/).
Expand All @@ -22,13 +22,13 @@ You can learn more about the difference by [reading this guide](/guides/minimizi

## Component name

The `MuiExpansionPanelSummary` name can be used for providing [default props](/customization/globals/#default-props) or [style overrides](/customization/globals/#css) at the theme level.
The `MuiAccordionSummary` name can be used for providing [default props](/customization/globals/#default-props) or [style overrides](/customization/globals/#css) at the theme level.

## Props

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | The content of the expansion panel summary. |
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | The content of the accordion summary. |
| <span class="prop-name">classes</span> | <span class="prop-type">object</span> | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |
| <span class="prop-name">expandIcon</span> | <span class="prop-type">node</span> | | The icon to display as the expand indicator. |
| <span class="prop-name">IconButtonProps</span> | <span class="prop-type">object</span> | | Props applied to the `IconButton` element wrapping the expand icon. |
Expand All @@ -41,20 +41,20 @@ Any other props supplied will be provided to the root element ([ButtonBase](/api

| Rule name | Global class | Description |
|:-----|:-------------|:------------|
| <span class="prop-name">root</span> | <span class="prop-name">.MuiExpansionPanelSummary-root</span> | Styles applied to the root element.
| <span class="prop-name">root</span> | <span class="prop-name">.MuiAccordionSummary-root</span> | Styles applied to the root element.
| <span class="prop-name">expanded</span> | <span class="prop-name">.Mui-expanded</span> | Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`.
| <span class="prop-name">focused</span> | <span class="prop-name">.Mui-focused</span> | Pseudo-class applied to the root element if `focused={true}`.
| <span class="prop-name">disabled</span> | <span class="prop-name">.Mui-disabled</span> | Pseudo-class applied to the root element if `disabled={true}`.
| <span class="prop-name">content</span> | <span class="prop-name">.MuiExpansionPanelSummary-content</span> | Styles applied to the children wrapper element.
| <span class="prop-name">expandIcon</span> | <span class="prop-name">.MuiExpansionPanelSummary-expandIcon</span> | Styles applied to the `IconButton` component when `expandIcon` is supplied.
| <span class="prop-name">content</span> | <span class="prop-name">.MuiAccordionSummary-content</span> | Styles applied to the children wrapper element.
| <span class="prop-name">expandIcon</span> | <span class="prop-name">.MuiAccordionSummary-expandIcon</span> | Styles applied to the `IconButton` component when `expandIcon` is supplied.

You can override the style of the component thanks to one of these customization points:

- With a rule name of the [`classes` object prop](/customization/components/#overriding-styles-with-classes).
- With a [global class name](/customization/components/#overriding-styles-with-global-class-names).
- With a theme and an [`overrides` property](/customization/globals/#css).

If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/ExpansionPanelSummary/ExpansionPanelSummary.js) for more detail.
If that's not sufficient, you can check the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/AccordionSummary/AccordionSummary.js) for more detail.

## Inheritance

Expand All @@ -63,5 +63,5 @@ You can take advantage of this behavior to [target nested components](/guides/ap

## Demos

- [Expansion Panels](/components/expansion-panels/)
- [Accordion](/components/accordion/)

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';

const pageFilename = 'api/expansion-panel';
const requireRaw = require.context('!raw-loader!./', false, /\/expansion-panel\.md$/);
const pageFilename = 'api/accordion';
const requireRaw = require.context('!raw-loader!./', false, /\/accordion\.md$/);

export default function Page({ docs }) {
return <MarkdownDocs docs={docs} />;
Expand Down

0 comments on commit 109e334

Please sign in to comment.