Skip to content

Commit

Permalink
Deprecations, October 2021 Edition (#5323)
Browse files Browse the repository at this point in the history
* remove betaBadgeLabel, betaBadgeTooltipContent, betaBadgeTitle props from EuiCard

* remove panelPaddingSize from EuiPageContent

* remove secondary color prop options

* remove makeId

* remove old mobile only props from EuiTableRowCell

* remove EuiLoadingKibana

* remove EuiCodeEditor

* remove loading_kibana and code_editor scss imports

* remove subdued color prop option from EuiButtonIcon

* CL

* secondary -> success

* EuiCard beta badge:

- Convert touched docs files to `.tsx`
- Simplified one of the examples
- Updated prop comment

* Removing `secondary`: More finds

* EuiTableRowCell mobile props:

- Just fixind a demo cell that should be hidden in mobile

* EuiLoadingKibana

- Putting `.euiLoadingLogo` styles back 😬

* clean up

* [EuiButtonDisplay] Setting better fallbacks for color vs `null`

* restore i18ntokens.json

* Found more `mobileOptions.fullWidth`

And fixed `align: center` for mobile

* 🤦‍♀️ Undo `secondary` button

* A couple last fixes found from console errors

- [EuiMark] change prop type of `children` from `string` to `ReactNode`
- [useEuiTextDiff] renders back a `span` instead of `div`
- Fix docs-only erros

* cl

Co-authored-by: cchaos <caroline.horn@elastic.co>
  • Loading branch information
thompsongl and cchaos authored Oct 29, 2021
1 parent 0f478ed commit 09791d7
Show file tree
Hide file tree
Showing 101 changed files with 223 additions and 2,288 deletions.
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@

- Added `EuiAutoSizer` component for setting dimensions on virtualized lists ([#5278](https://github.com/elastic/eui/pull/5278))
- Added `testenv` mock for `EuiAutoSizer` ([#5278](https://github.com/elastic/eui/pull/5278))
- Changed render of `useEuiTextDiff` to a `span` instead of `div` ([#5323](https://github.com/elastic/eui/pull/5323))
- Changed change prop type of `children` for `EuiMark` from `string` to `ReactNode` ([#5323](https://github.com/elastic/eui/pull/5323))

**Bug fixes**

- Fixed styling of `align: center` for mobile version of `EuiTableRowCell` ([#5323](https://github.com/elastic/eui/pull/5323))

**Breaking changes**

- Removed `EuiCodeEditor` ([#5323](https://github.com/elastic/eui/pull/5323))
- Removed `betaBadgeLabel`, `betaBadgeTooltipContent`, `betaBadgeTitle` props from `EuiCard` ([#5323](https://github.com/elastic/eui/pull/5323))
- Removed `EuiLoadingKibana` ([#5323](https://github.com/elastic/eui/pull/5323))
- Removed `secondary` color prop options ([#5323](https://github.com/elastic/eui/pull/5323))
- Removed `subdued` color prop option from `EuiButtonIcon` ([#5323](https://github.com/elastic/eui/pull/5323))
- Removed `panelPaddingSize` from `EuiPageContent` ([#5323](https://github.com/elastic/eui/pull/5323))
- Removed `makeId` ([#5323](https://github.com/elastic/eui/pull/5323))
- Removed mobile-only props from `EuiTableRowCell` ([#5323](https://github.com/elastic/eui/pull/5323))

## [`40.1.0`](https://github.com/elastic/eui/tree/v40.1.0)

- Added styling support for `valign` prop on `EuiTableRowCell` ([#5283](https://github.com/elastic/eui/pull/5283))
- Added `remark-breaks` plugin to mimic GitHub-flavored markdown line breaks within `EuiMarkdownEditor` ([#5272](https://github.com/elastic/eui/pull/5272))
- Removed `EuiErrorBoundary` from `EuiDatePicker` when unsupported props are used ([#5318](https://github.com/elastic/eui/pull/5318))

**Bug fixes**

- Fixed default text alignment in `EuiTableRowCell` on Safari ([#5283](https://github.com/elastic/eui/pull/5283))
Expand Down Expand Up @@ -37,7 +54,7 @@
## [`39.1.2`](https://github.com/elastic/eui/tree/v39.1.2)

**Note: this release is a backport containing changes originally made in `40.1.0`**

**Bug fixes**

- Fixed `EuiDataGrid` to dynamically update row heights when set to `auto` ([#5281](https://github.com/elastic/eui/pull/5281))
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
"mdast-util-to-hast": "^10.0.0",
"numeral": "^2.0.6",
"prop-types": "^15.6.0",
"react-ace": "^7.0.5",
"react-beautiful-dnd": "^13.0.0",
"react-dropzone": "^11.2.0",
"react-focus-on": "^3.5.0",
Expand Down
3 changes: 0 additions & 3 deletions src-docs/src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ import { CardExample } from './views/card/card_example';

import { CallOutExample } from './views/call_out/call_out_example';

import { CodeEditorExample } from './views/code_editor/code_editor_example';

import { CodeExample } from './views/code/code_example';

import { CollapsibleNavExample } from './views/collapsible_nav/collapsible_nav_example';
Expand Down Expand Up @@ -480,7 +478,6 @@ const navigation = [
MarkdownFormatExample,
MarkdownEditorExample,
MarkdownPluginExample,
CodeEditorExample,
CodeExample,
].map((example) => createExample(example)),
},
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/services/playground/knobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ const KnobColumn = ({ state, knobNames, error, set, isPlayground }) => {
textOnly={false}
mobileOptions={{
header: false,
fullWidth: true,
width: '100%',
}}
>
<div>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/button/button_toggle_aria.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default () => {
title="Autosave"
iconType="save"
aria-pressed={toggle3On}
color={toggle3On ? 'primary' : 'subdued'}
color={toggle3On ? 'primary' : 'text'}
onClick={() => {
setToggle3On((isOn) => !isOn);
}}
Expand Down
16 changes: 8 additions & 8 deletions src-docs/src/views/button/guidelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export default () => (
Continue
</EuiButton>
&nbsp;&nbsp;
<EuiButton iconType="check" color="secondary" fill>
<EuiButton iconType="check" color="success" fill>
Save and complete
</EuiButton>
</div>
Expand Down Expand Up @@ -434,7 +434,7 @@ export default () => (

<EuiTableBody>
<EuiTableRow>
<EuiTableRowCell isMobileFullWidth>
<EuiTableRowCell mobileOptions={{ width: '100%' }}>
<EuiButton>Add thing</EuiButton>
</EuiTableRowCell>

Expand All @@ -447,7 +447,7 @@ export default () => (
</EuiTableRow>

<EuiTableRow>
<EuiTableRowCell isMobileFullWidth>
<EuiTableRowCell mobileOptions={{ width: '100%' }}>
<EuiButtonEmpty size="s">Cancel</EuiButtonEmpty>
</EuiTableRowCell>
<EuiTableRowCell>
Expand All @@ -458,7 +458,7 @@ export default () => (
</EuiTableRow>

<EuiTableRow>
<EuiTableRowCell isMobileFullWidth>
<EuiTableRowCell mobileOptions={{ width: '100%' }}>
<EuiButton fill>Create thing</EuiButton>
</EuiTableRowCell>

Expand All @@ -471,7 +471,7 @@ export default () => (
</EuiTableRow>

<EuiTableRow>
<EuiTableRowCell isMobileFullWidth>
<EuiTableRowCell mobileOptions={{ width: '100%' }}>
<EuiButton color="danger" fill>
Delete
</EuiButton>
Expand All @@ -495,7 +495,7 @@ export default () => (
</EuiTableRow>

<EuiTableRow>
<EuiTableRowCell isMobileFullWidth>
<EuiTableRowCell mobileOptions={{ width: '100%' }}>
<EuiButton color="danger">Remove</EuiButton>&nbsp;&nbsp;
<EuiButtonIcon
size="s"
Expand All @@ -512,9 +512,9 @@ export default () => (
</EuiTableRow>

<EuiTableRow>
<EuiTableRowCell isMobileFullWidth>
<EuiTableRowCell mobileOptions={{ width: '100%' }}>
<EuiButton fill>Save</EuiButton>&nbsp;&nbsp;
<EuiButton fill color="secondary" iconType="check">
<EuiButton fill color="success" iconType="check">
Save and complete
</EuiButton>
</EuiTableRowCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,29 @@ import {
EuiFlexItem,
} from '../../../../src/components';

const icons = ['dashboard', 'monitoring'];
const badges = [null, 'Beta'];

const cardNodes = icons.map(function (item, index) {
return (
<EuiFlexItem key={index}>
export default () => (
<EuiFlexGroup gutterSize="l">
<EuiFlexItem>
<EuiCard
icon={<EuiIcon size="xxl" type={`${item}App`} />}
title={`Kibana ${item}`}
icon={<EuiIcon size="xxl" type="dashboardApp" />}
title="Dashboards"
description="Example of a card's description. Stick to one or two sentences."
betaBadgeLabel={badges[index]}
betaBadgeTooltipContent={
badges[index]
? 'This module is not GA. Please help us by reporting any bugs.'
: undefined
}
onClick={() => {}}
/>
</EuiFlexItem>
);
});

export default () => (
<EuiFlexGroup gutterSize="l">
{cardNodes}
<EuiFlexItem>
<EuiCard
icon={<EuiIcon size="xxl" type="monitoringApp" />}
title="Monitoring"
description="Example of a card's description. Stick to one or two sentences."
betaBadgeProps={{
label: 'Beta',
tooltipContent:
'This module is not GA. Please help us by reporting any bugs.',
}}
onClick={() => {}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiCard
icon={<EuiIcon size="xxl" type="lensApp" />}
Expand All @@ -41,9 +39,9 @@ export default () => (
betaBadgeProps={{
href: 'http://www.elastic.co/subscriptions',
target: '_blank',
label: 'Basic',
tooltipContent: 'This feature requires a Basic License',
}}
betaBadgeLabel="Basic"
betaBadgeTooltipContent="This feature requires a Basic License"
onClick={() => {}}
/>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ export default () => (
title="Transparent"
display="transparent"
description="This one doesn't have a background color anymore."
betaBadgeLabel="Beta"
betaBadgeTooltipContent="This module is not GA. Please help us by reporting any bugs."
betaBadgeProps={{
label: 'Beta',
tooltipContent:
'This module is not GA. Please help us by reporting any bugs.',
}}
onClick={() => {}}
/>
</EuiFlexItem>
Expand Down
16 changes: 9 additions & 7 deletions src-docs/src/views/card/card_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ export const CardExample = {
text: (
<p>
If the card links to or references a module that is not GA (beta, lab,
etc), you can add a <EuiCode>betaBadgeLabel</EuiCode> and{' '}
<EuiCode>betaBadgeTooltipContent</EuiCode> to the card and it will
properly create and position an <strong>EuiBetaBadge</strong>. If you
want to change the title of the tooltip, supply a{' '}
<EuiCode>betaBadgeTitle</EuiCode> prop.
etc), you can add a <EuiCode>betaBadgeProps.label</EuiCode> and{' '}
<EuiCode>betaBadgeProps.tooltipContent</EuiCode> to the card and it
will properly create and position an <strong>EuiBetaBadge</strong>. If
you want to change the title of the tooltip, supply a{' '}
<EuiCode>betaBadgeProps.title</EuiCode> prop.
</p>
),
props: { EuiCard },
Expand All @@ -259,8 +259,10 @@ export const CardExample = {
title="title"
description="description"
onClick={handleClick}
betaBadgeLabel="betaBadgeLabel"
betaBadgeTooltipContent={betaBadgeTooltipContent}
betaBadgeProps={{
label: 'betaBadgeLabel',
toolTipContent: 'betaBadgeTooltipContent',
}}
/>`,
},
{
Expand Down
5 changes: 0 additions & 5 deletions src-docs/src/views/card/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ export const cardConfig = () => {
type: PropTypes.String,
};

propsToUse.betaBadgeTooltipContent = {
...propsToUse.betaBadgeTooltipContent,
type: PropTypes.String,
};

propsToUse.onClick = simulateFunction(propsToUse.onClick);
propsToUse.display = createOptionalEnum(propsToUse.display);

Expand Down
33 changes: 0 additions & 33 deletions src-docs/src/views/code_editor/code_editor.js

This file was deleted.

32 changes: 0 additions & 32 deletions src-docs/src/views/code_editor/code_editor_example.js

This file was deleted.

30 changes: 0 additions & 30 deletions src-docs/src/views/code_editor/custom_mode.js

This file was deleted.

Loading

0 comments on commit 09791d7

Please sign in to comment.