Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Session View] Remove color="ghost" buttons #169305

Merged
merged 3 commits into from
Oct 24, 2023
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
51 changes: 30 additions & 21 deletions x-pack/plugins/session_view/public/components/tty_player/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
* 2.0.
*/
import React, { useRef, useState, useCallback, useMemo, useEffect } from 'react';
import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiButtonIcon, EuiButton } from '@elastic/eui';
import {
EuiPanel,
EuiFlexGroup,
EuiFlexItem,
EuiButtonIcon,
EuiButton,
EuiThemeProvider,
} from '@elastic/eui';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { CoreStart } from '@kbn/core/public';
import useResizeObserver from 'use-resize-observer';
Expand Down Expand Up @@ -217,26 +224,28 @@ export const TTYPlayer = ({
<div ref={ref} data-test-subj="sessionView:TTYPlayer" css={styles.terminal} />
</div>

<TTYPlayerControls
currentProcessEvent={currentProcessEvent}
processStartMarkers={processStartMarkers}
isPlaying={isPlaying}
currentLine={currentLine}
linesLength={lines.length}
onSeekLine={onSeekLine}
onTogglePlayback={onTogglePlayback}
onClose={onClose}
onJumpToEvent={onJumpToEvent}
textSizer={
<TTYTextSizer
tty={tty}
containerHeight={containerHeight}
fontSize={fontSize}
onFontSizeChanged={setFontSize}
isFullscreen={isFullscreen}
/>
}
/>
<EuiThemeProvider colorMode="dark">
<TTYPlayerControls
currentProcessEvent={currentProcessEvent}
processStartMarkers={processStartMarkers}
isPlaying={isPlaying}
currentLine={currentLine}
linesLength={lines.length}
onSeekLine={onSeekLine}
onTogglePlayback={onTogglePlayback}
onClose={onClose}
onJumpToEvent={onJumpToEvent}
textSizer={
<TTYTextSizer
tty={tty}
containerHeight={containerHeight}
fontSize={fontSize}
onFontSizeChanged={setFontSize}
isFullscreen={isFullscreen}
/>
}
/>
</EuiThemeProvider>
</div>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const TTYPlayerControls = ({
const commonButtonProps: Partial<EuiButtonIconProps> = {
display: 'empty',
size: 's',
color: 'ghost',
color: 'text',
css: styles.controlButton,
};

Expand Down Expand Up @@ -188,7 +188,7 @@ export const TTYPlayerControls = ({
onClick={handleViewInSession}
iconType="arrowRight"
aria-label={VIEW_IN_SESSION}
color="ghost"
color="text"
>
{VIEW_IN_SESSION}
</EuiButtonEmpty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface TTYTextSizerDeps {
const commonButtonProps: Partial<EuiButtonIconProps> = {
display: 'empty',
size: 's',
color: 'ghost',
color: 'text',
};

const LINE_HEIGHT_SCALE_RATIO = 1.3;
Expand Down Expand Up @@ -95,7 +95,7 @@ export const TTYTextSizer = ({
iconType={fit ? 'expand' : 'minimize'}
onClick={onToggleFit}
size="s"
color="ghost"
color="text"
/>
</EuiToolTip>
</EuiFlexItem>
Expand Down