Skip to content

Commit

Permalink
Rename 'original' to 'pre-wrapped' wrap mode
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort committed Mar 11, 2020
1 parent e283dc8 commit 1b0e3ee
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('LogEntryFieldColumn', () => {
isActiveHighlight={false}
isHighlighted={false}
isHovered={false}
wrapMode="original"
wrapMode="pre-wrapped"
/>,
{ wrappingComponent: EuiThemeProvider } as any // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/36075
);
Expand Down Expand Up @@ -58,7 +58,7 @@ describe('LogEntryFieldColumn', () => {
isActiveHighlight={false}
isHighlighted={false}
isHovered={false}
wrapMode="original"
wrapMode="pre-wrapped"
/>,
{ wrappingComponent: EuiThemeProvider } as any // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/36075
);
Expand All @@ -80,7 +80,7 @@ describe('LogEntryFieldColumn', () => {
isActiveHighlight={false}
isHighlighted={false}
isHovered={false}
wrapMode="original"
wrapMode="pre-wrapped"
/>,
{ wrappingComponent: EuiThemeProvider } as any // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/36075
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { LogEntryColumnContent } from './log_entry_column';
import {
hoveredContentStyle,
longWrappedContentStyle,
originalWrappedContentStyle,
preWrappedContentStyle,
unwrappedContentStyle,
WrapMode,
} from './text_styles';
Expand Down Expand Up @@ -94,7 +94,7 @@ const FieldColumnContent = euiStyled(LogEntryColumnContent)<LogEntryColumnConten
${props =>
props.wrapMode === 'long'
? longWrappedContentStyle
: props.wrapMode === 'original'
? originalWrappedContentStyle
: props.wrapMode === 'pre-wrapped'
? preWrappedContentStyle
: unwrappedContentStyle};
`;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { LogEntryColumnContent } from './log_entry_column';
import {
hoveredContentStyle,
longWrappedContentStyle,
originalWrappedContentStyle,
preWrappedContentStyle,
unwrappedContentStyle,
WrapMode,
} from './text_styles';
Expand Down Expand Up @@ -66,8 +66,8 @@ const MessageColumnContent = euiStyled(LogEntryColumnContent)<MessageColumnConte
${props =>
props.wrapMode === 'long'
? longWrappedContentStyle
: props.wrapMode === 'original'
? originalWrappedContentStyle
: props.wrapMode === 'pre-wrapped'
? preWrappedContentStyle
: unwrappedContentStyle};
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const LogEntryRow = memo(
isHighlighted={isHighlighted}
isActiveHighlight={isActiveHighlight}
isHovered={isHovered}
wrapMode={wrap ? 'long' : 'original'}
wrapMode={wrap ? 'long' : 'pre-wrapped'}
/>
) : null}
</LogEntryColumn>
Expand All @@ -170,7 +170,7 @@ export const LogEntryRow = memo(
isActiveHighlight={isActiveHighlight}
isHighlighted={isHighlighted}
isHovered={isHovered}
wrapMode={wrap ? 'long' : 'original'}
wrapMode={wrap ? 'long' : 'pre-wrapped'}
/>
) : null}
</LogEntryColumn>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React, { useMemo, useState, useCallback } from 'react';
import { euiStyled, css } from '../../../../../observability/public';
import { TextScale } from '../../../../common/log_text_scale';

export type WrapMode = 'none' | 'original' | 'long';
export type WrapMode = 'none' | 'pre-wrapped' | 'long';

export const monospaceTextStyle = (scale: TextScale) => css`
font-family: ${props => props.theme.eui.euiCodeFontFamily};
Expand Down Expand Up @@ -42,7 +42,7 @@ export const longWrappedContentStyle = css`
word-break: break-all;
`;

export const originalWrappedContentStyle = css`
export const preWrappedContentStyle = css`
overflow: hidden;
white-space: pre;
`;
Expand Down

0 comments on commit 1b0e3ee

Please sign in to comment.