Skip to content

Commit

Permalink
Revert "[index management] Borealis theme improvements" (elastic#204400)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime authored Dec 16, 2024
1 parent 6f38a4c commit 67d7547
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React, { FunctionComponent, useState } from 'react';
import { css } from '@emotion/react';
import { euiThemeVars } from '@kbn/ui-theme';
import { i18n } from '@kbn/i18n';
import {
EuiBadge,
Expand All @@ -22,7 +23,6 @@ import {
EuiText,
EuiTextColor,
EuiTitle,
useEuiTheme,
} from '@elastic/eui';

import { Index } from '../../../../../../../common';
Expand All @@ -31,7 +31,6 @@ import { OverviewCard } from './overview_card';
const MAX_VISIBLE_ALIASES = 3;

export const AliasesDetails: FunctionComponent<{ aliases: Index['aliases'] }> = ({ aliases }) => {
const { euiTheme } = useEuiTheme();
const [isShowingAliases, setIsShowingAliases] = useState<boolean>(false);
if (!Array.isArray(aliases)) {
return null;
Expand Down Expand Up @@ -59,7 +58,7 @@ export const AliasesDetails: FunctionComponent<{ aliases: Index['aliases'] }> =
<EuiFlexItem grow={false}>
<EuiText
css={css`
font-size: ${euiTheme.font.scale.l};
font-size: ${euiThemeVars.euiFontSizeL};
`}
>
{aliases.length}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,9 @@

import React, { FunctionComponent, ReactNode } from 'react';
import { i18n } from '@kbn/i18n';
import {
EuiButton,
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiText,
EuiTextColor,
useEuiTheme,
} from '@elastic/eui';
import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiTextColor } from '@elastic/eui';
import { css } from '@emotion/react';
import { euiThemeVars } from '@kbn/ui-theme';
import { SectionLoading } from '@kbn/es-ui-shared-plugin/public';

import { FormattedMessage } from '@kbn/i18n-react';
Expand All @@ -29,7 +22,6 @@ import { OverviewCard } from './overview_card';
export const DataStreamDetails: FunctionComponent<{ dataStreamName: string }> = ({
dataStreamName,
}) => {
const { euiTheme } = useEuiTheme();
const { error, data: dataStream, isLoading, resendRequest } = useLoadDataStream(dataStreamName);
const {
core: { getUrlForApp },
Expand All @@ -40,7 +32,7 @@ export const DataStreamDetails: FunctionComponent<{ dataStreamName: string }> =
<EuiFlexItem grow={false}>
<EuiText
css={css`
font-size: ${euiTheme.font.scale.l};
font-size: ${euiThemeVars.euiFontSizeL};
`}
>
{dataStream?.generation}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@

import React, { FunctionComponent, ReactNode } from 'react';
import { css } from '@emotion/react';
import {
EuiFlexGroup,
EuiFlexItem,
EuiSpacer,
EuiSplitPanel,
EuiTitle,
useEuiTheme,
} from '@elastic/eui';
import { euiThemeVars } from '@kbn/ui-theme';
import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiSplitPanel, EuiTitle } from '@elastic/eui';

interface Props {
title: string;
Expand All @@ -35,7 +29,6 @@ export const OverviewCard: FunctionComponent<Props> = ({
footer: { left: footerLeft, right: footerRight } = {},
'data-test-subj': dataTestSubj,
}) => {
const { euiTheme } = useEuiTheme();
return (
<EuiFlexItem>
<EuiSplitPanel.Outer grow hasBorder={true} data-test-subj={dataTestSubj}>
Expand All @@ -50,7 +43,7 @@ export const OverviewCard: FunctionComponent<Props> = ({
wrap={true}
alignItems="center"
css={css`
min-height: ${euiTheme.size.xl};
min-height: ${euiThemeVars.euiButtonHeightSmall};
`}
>
<EuiFlexItem grow={false}>{contentLeft}</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@

import React, { FunctionComponent } from 'react';
import { css } from '@emotion/react';
import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiText,
EuiTextColor,
useEuiTheme,
} from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiTextColor } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { euiThemeVars } from '@kbn/ui-theme';
import type { Index } from '../../../../../../../common';
import { useAppContext } from '../../../../../app_context';
import { OverviewCard } from './overview_card';
Expand All @@ -24,7 +18,6 @@ export const SizeDocCountDetails: FunctionComponent<{
size: Index['size'];
documents: Index['documents'];
}> = ({ size, documents }) => {
const { euiTheme } = useEuiTheme();
const { config } = useAppContext();
if (!config.enableSizeAndDocCount) {
return null;
Expand All @@ -41,7 +34,7 @@ export const SizeDocCountDetails: FunctionComponent<{
<EuiFlexItem grow={false}>
<EuiText
css={css`
font-size: ${euiTheme.font.scale.l};
font-size: ${euiThemeVars.euiFontSizeL};
`}
>
{size}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
EuiText,
EuiTextColor,
EuiBadgeProps,
useEuiTheme,
} from '@elastic/eui';
import { css } from '@emotion/react';
import { euiThemeVars } from '@kbn/ui-theme';

import { useAppContext } from '../../../../../app_context';
import { Index } from '../../../../../../../common';
Expand Down Expand Up @@ -54,7 +54,6 @@ export const StatusDetails: FunctionComponent<{
status: Index['status'];
health: Index['health'];
}> = ({ documents, documentsDeleted, status, health }) => {
const { euiTheme } = useEuiTheme();
const { config } = useAppContext();
if (!config.enableIndexStats || !health) {
return null;
Expand All @@ -73,7 +72,7 @@ export const StatusDetails: FunctionComponent<{
<EuiText
color={status === 'close' ? 'danger' : 'success'}
css={css`
font-size: ${euiTheme.font.scale.l};
font-size: ${euiThemeVars.euiFontSizeL};
`}
>
{status === 'close'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
import React, { FunctionComponent } from 'react';
import { css } from '@emotion/react';
import { i18n } from '@kbn/i18n';
import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiText,
EuiTextColor,
useEuiTheme,
} from '@elastic/eui';
import { euiThemeVars } from '@kbn/ui-theme';
import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiTextColor } from '@elastic/eui';

import { useAppContext } from '../../../../../app_context';
import { Index } from '../../../../../../../common';
Expand All @@ -27,7 +21,6 @@ export const StorageDetails: FunctionComponent<{
primary: Index['primary'];
replica: Index['replica'];
}> = ({ primarySize, size, primary, replica }) => {
const { euiTheme } = useEuiTheme();
const { config } = useAppContext();
if (!config.enableIndexStats) {
return null;
Expand All @@ -44,7 +37,7 @@ export const StorageDetails: FunctionComponent<{
<EuiFlexItem grow={false}>
<EuiText
css={css`
font-size: ${euiTheme.font.scale.l};
font-size: ${euiThemeVars.euiFontSizeL};
`}
>
{primarySize}
Expand All @@ -64,7 +57,7 @@ export const StorageDetails: FunctionComponent<{
<EuiFlexItem grow={false}>
<EuiText
css={css`
font-size: ${euiTheme.font.scale.l};
font-size: ${euiThemeVars.euiFontSizeL};
`}
>
{size}
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/index_management/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@kbn/core-http-browser",
"@kbn/search-api-panels",
"@kbn/cloud-plugin",
"@kbn/ui-theme",
"@kbn/code-editor",
"@kbn/monaco",
"@kbn/console-plugin",
Expand Down

0 comments on commit 67d7547

Please sign in to comment.