Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated to the changes, but I noticed that the age input doesn't look correct here

Screenshot 2024-11-14 at 14 28 03

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/eui/changelogs/upcoming/8113.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Breaking changes**

- Removed `EuiFormRow`'s deprecated `columnCompressedSwitch` display prop. Use `columnCompressed` instead
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,12 @@ export const FormCompressedExample = {
EuiFormRow,
},
demo: <FormHorizontal />,
snippet: [
`<EuiFormRow
snippet: `<EuiFormRow
label="Text field"
display="columnCompressed"
>
<EuiFieldText compressed />
</EuiFormRow>`,
`<EuiFormRow
label="Switch"
display="columnCompressedSwitch"
>
<EuiSwitch compressed />
</EuiFormRow>`,
],
},
{
title: 'Contextual help',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ export const EuiColorPicker: FunctionComponent<EuiColorPickerProps> = ({
mode === 'secondaryInput' || secondaryInputDisplay !== 'none';
const inlineInput = showSecondaryInput && (
<EuiFormRow
display="rowCompressed"
isInvalid={isInvalid}
error={isInvalid ? colorErrorMessage : null}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,6 @@ exports[`EuiFormRow props display type columnCompressed is rendered 1`] = `
</div>
`;

exports[`EuiFormRow props display type columnCompressedSwitch is rendered 1`] = `
<div
class="euiFormRow emotion-euiFormRow-columnCompressed"
id="generated-id-row"
>
<div
class="euiFormRow__fieldWrapper"
>
<input
id="generated-id"
/>
</div>
</div>
`;

exports[`EuiFormRow props display type row is rendered 1`] = `
<div
class="euiFormRow emotion-euiFormRow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ export const euiFormRowStyles = (euiThemeContext: UseEuiTheme) => {
${logicalCSS('margin-top', euiTheme.size.base)}
}
`,
// No difference from the uncompressed row for this current theme AFAICT
// TODO: Deprecate prop
// No difference from the uncompressed row for the current EUI theme
get rowCompressed() {
return this.row;
},
Expand Down Expand Up @@ -94,11 +93,6 @@ export const euiFormRowStyles = (euiThemeContext: UseEuiTheme) => {
}
}
`,
// Handled by :has CSS now rather than a separate modifier/prop
// TODO: Deprecate prop
get columnCompressedSwitch() {
return this.columnCompressed;
},

// Center display is primarily for inline form rows, which may have have
// field content that is shorter than form controls (e.g. switches, text),
Expand Down
8 changes: 2 additions & 6 deletions packages/eui/src/components/form/form_row/form_row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ export const DISPLAYS = [
'center',
'centerCompressed',
/**
* @deprecated
*/
'columnCompressedSwitch',
/**
* @deprecated
* This currently does not affect styles/appearances
* in EUI's present primary theme, but may in the future.
*/
'rowCompressed',
] as const;
Expand All @@ -49,7 +46,6 @@ export type EuiFormRowDisplayKeys = (typeof DISPLAYS)[number];
type EuiFormRowCommonProps = CommonProps & {
/**
* - `columnCompressed` creates a compressed and horizontal layout
* - `columnCompressedSwitch` - **deprecated**, use `columnCompressed` instead
* - `center`/`centerCompressed` helps align non-input content better with inline form layouts
* - `rowCompressed` - **deprecated**, does not currently affect styling
*/
Expand Down