Skip to content

Commit

Permalink
remove deprecated components, improve spacing and title (elastic#163378)
Browse files Browse the repository at this point in the history
## Summary

Partially addresses elastic#161425

New look:

<img width="1645" alt="image"
src="https://github.com/elastic/kibana/assets/82822460/9da0ae4a-9f6e-4744-80c1-9a13b6d23d1c">
  • Loading branch information
vadimkibana authored Aug 8, 2023
1 parent a69870b commit 346fc7e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 31 deletions.
15 changes: 9 additions & 6 deletions examples/expressions_explorer/public/actions_and_expressions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import {
EuiFlexItem,
EuiFlexGroup,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageTemplate,
EuiPageSection,
EuiPageHeader,
EuiPageHeaderSection,
EuiPanel,
EuiText,
EuiTitle,
EuiSpacer,
} from '@elastic/eui';
import { ExpressionsStart } from '@kbn/expressions-plugin/public';
import { UiActionsStart } from '@kbn/ui-actions-plugin/public';
Expand Down Expand Up @@ -55,8 +56,8 @@ export function ActionsExpressionsExample({ expressions, actions }: Props) {
</EuiTitle>
</EuiPageHeaderSection>
</EuiPageHeader>
<EuiPageContent data-test-subj="expressionsActionsTest">
<EuiPageContentBody>
<EuiPageTemplate.Section data-test-subj="expressionsActionsTest">
<EuiPageSection>
<EuiFlexGroup>
<EuiFlexItem>
<EuiText>
Expand All @@ -67,6 +68,8 @@ export function ActionsExpressionsExample({ expressions, actions }: Props) {
</EuiFlexItem>
</EuiFlexGroup>

<EuiSpacer />

<EuiFlexGroup gutterSize="l">
<EuiFlexItem>
<EuiPanel data-test-subj="expressionEditor" paddingSize="none" role="figure">
Expand All @@ -86,8 +89,8 @@ export function ActionsExpressionsExample({ expressions, actions }: Props) {
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContentBody>
</EuiPageContent>
</EuiPageSection>
</EuiPageTemplate.Section>
</EuiPageBody>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import {
EuiFlexItem,
EuiFlexGroup,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageTemplate,
EuiPageSection,
EuiPageHeader,
EuiPageHeaderSection,
EuiPanel,
EuiText,
EuiTitle,
EuiSpacer,
} from '@elastic/eui';
import { ExpressionsStart } from '@kbn/expressions-plugin/public';
import { UiActionsStart } from '@kbn/ui-actions-plugin/public';
Expand Down Expand Up @@ -54,8 +55,8 @@ export function ActionsExpressionsExample2({ expressions, actions }: Props) {
</EuiTitle>
</EuiPageHeaderSection>
</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody data-test-subj="expressionsVariablesTest">
<EuiPageTemplate.Section>
<EuiPageSection data-test-subj="expressionsVariablesTest">
<EuiFlexGroup>
<EuiFlexItem>
<EuiText>
Expand All @@ -65,6 +66,8 @@ export function ActionsExpressionsExample2({ expressions, actions }: Props) {
</EuiFlexItem>
</EuiFlexGroup>

<EuiSpacer />

<EuiFlexGroup gutterSize="l">
<EuiFlexItem>
<EuiPanel data-test-subj="expressionEditor" paddingSize="none" role="figure">
Expand All @@ -86,8 +89,8 @@ export function ActionsExpressionsExample2({ expressions, actions }: Props) {
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContentBody>
</EuiPageContent>
</EuiPageSection>
</EuiPageTemplate.Section>
</EuiPageBody>
);
}
16 changes: 9 additions & 7 deletions examples/expressions_explorer/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
EuiPage,
EuiPageHeader,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageTemplate,
EuiPageSection,
EuiSpacer,
EuiText,
EuiLink,
Expand Down Expand Up @@ -55,9 +55,11 @@ const ExpressionsExplorer = ({
<KibanaReactContextProvider>
<EuiPage>
<EuiPageBody>
<EuiPageHeader>Expressions Explorer</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody>
<EuiPageSection>
<EuiPageHeader pageTitle="Expressions Explorer" />
</EuiPageSection>
<EuiPageTemplate.Section>
<EuiPageSection>
<EuiText>
<p>
There are a couple of ways to run the expressions. Below some of the options are
Expand Down Expand Up @@ -87,8 +89,8 @@ const ExpressionsExplorer = ({
<EuiSpacer />

<ActionsExpressionsExample2 expressions={expressions} actions={actions} />
</EuiPageContentBody>
</EuiPageContent>
</EuiPageSection>
</EuiPageTemplate.Section>
</EuiPageBody>
</EuiPage>
</KibanaReactContextProvider>
Expand Down
15 changes: 9 additions & 6 deletions examples/expressions_explorer/public/render_expressions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ import {
EuiFlexItem,
EuiFlexGroup,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageTemplate,
EuiPageSection,
EuiPageHeader,
EuiPageHeaderSection,
EuiPanel,
EuiText,
EuiTitle,
EuiButton,
EuiSpacer,
} from '@elastic/eui';
import { ExpressionsStart } from '@kbn/expressions-plugin/public';
import { Start as InspectorStart } from '@kbn/inspector-plugin/public';
Expand Down Expand Up @@ -49,8 +50,8 @@ export function RenderExpressionsExample({ expressions, inspector }: Props) {
</EuiTitle>
</EuiPageHeaderSection>
</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody>
<EuiPageTemplate.Section>
<EuiPageSection>
<EuiFlexGroup>
<EuiFlexItem>
<EuiText>
Expand All @@ -69,6 +70,8 @@ export function RenderExpressionsExample({ expressions, inspector }: Props) {
</EuiFlexItem>
</EuiFlexGroup>

<EuiSpacer />

<EuiFlexGroup gutterSize="l">
<EuiFlexItem>
<EuiPanel data-test-subj="expressionEditor" paddingSize="none" role="figure">
Expand All @@ -90,8 +93,8 @@ export function RenderExpressionsExample({ expressions, inspector }: Props) {
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContentBody>
</EuiPageContent>
</EuiPageSection>
</EuiPageTemplate.Section>
</EuiPageBody>
);
}
15 changes: 9 additions & 6 deletions examples/expressions_explorer/public/run_expressions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import {
EuiFlexItem,
EuiFlexGroup,
EuiPageBody,
EuiPageContent_Deprecated as EuiPageContent,
EuiPageContentBody_Deprecated as EuiPageContentBody,
EuiPageTemplate,
EuiPageSection,
EuiPageHeader,
EuiPageHeaderSection,
EuiPanel,
EuiText,
EuiTitle,
EuiButton,
EuiSpacer,
} from '@elastic/eui';
import { ExpressionsStart } from '@kbn/expressions-plugin/public';
import { Adapters, Start as InspectorStart } from '@kbn/inspector-plugin/public';
Expand Down Expand Up @@ -64,8 +65,8 @@ export function RunExpressionsExample({ expressions, inspector }: Props) {
</EuiTitle>
</EuiPageHeaderSection>
</EuiPageHeader>
<EuiPageContent>
<EuiPageContentBody>
<EuiPageTemplate.Section>
<EuiPageSection>
<EuiFlexGroup>
<EuiFlexItem>
<EuiText>
Expand All @@ -84,6 +85,8 @@ export function RunExpressionsExample({ expressions, inspector }: Props) {
</EuiFlexItem>
</EuiFlexGroup>

<EuiSpacer />

<EuiFlexGroup gutterSize="l">
<EuiFlexItem>
<EuiPanel data-test-subj="expressionEditor" paddingSize="none" role="figure">
Expand All @@ -104,8 +107,8 @@ export function RunExpressionsExample({ expressions, inspector }: Props) {
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContentBody>
</EuiPageContent>
</EuiPageSection>
</EuiPageTemplate.Section>
</EuiPageBody>
);
}

0 comments on commit 346fc7e

Please sign in to comment.