From 3c14e0bb1b8973b703b7f97e53167e36649f1cbc Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 26 Mar 2021 17:23:16 -0400 Subject: [PATCH] [Workplace Search] Design polish: overview page (#95363) (#95578) * Rework panels to subdued style * Fix button when source has been onboarded * Update content_section test for EuiSpacer * Update content_section test for EuiSpacer Length * Lint fix for onboarding_card * Remove spacer size due to default Co-authored-by: Scotty Bollinger * Remove test line for Spacer now that size=default Co-authored-by: Scotty Bollinger Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: John Barrier Wilson Co-authored-by: Scotty Bollinger --- .../content_section/content_section.test.tsx | 3 +- .../content_section/content_section.tsx | 4 +- .../views/overview/onboarding_card.tsx | 10 +-- .../views/overview/onboarding_steps.tsx | 11 +-- .../views/overview/organization_stats.tsx | 77 ++++++++++--------- .../views/overview/recent_activity.tsx | 2 +- .../views/overview/statistic_card.tsx | 2 + 7 files changed, 55 insertions(+), 54 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.test.tsx index d9c2d70e78c08..d37af01287c46 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.test.tsx @@ -47,8 +47,7 @@ describe('ContentSection', () => { /> ); - expect(wrapper.find(EuiSpacer).first().prop('size')).toEqual('s'); - expect(wrapper.find(EuiSpacer)).toHaveLength(2); + expect(wrapper.find(EuiSpacer)).toHaveLength(1); expect(wrapper.find('.header')).toHaveLength(1); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.tsx index d9a4ed7eee8b8..f0b86e0cc925b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/components/shared/content_section/content_section.tsx @@ -30,7 +30,6 @@ export const ContentSection: React.FC = ({ description, action, headerChildren, - headerSpacer, testSubj, }) => (
@@ -38,10 +37,9 @@ export const ContentSection: React.FC = ({ <> {headerChildren} - {headerSpacer && } )} {children} - +
); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx index 2d9e5580c6f40..338eda0214ea2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/onboarding_card.tsx @@ -18,7 +18,7 @@ import { IconType, } from '@elastic/eui'; -import { EuiButtonTo, EuiButtonEmptyTo } from '../../../shared/react_router_helpers'; +import { EuiButtonTo } from '../../../shared/react_router_helpers'; import { TelemetryLogic } from '../../../shared/telemetry'; interface OnboardingCardProps { @@ -49,15 +49,15 @@ export const OnboardingCard: React.FC = ({ }); const completeButton = actionPath ? ( - + {actionTitle} - + ) : ( {actionTitle} ); const incompleteButton = actionPath ? ( - + {actionTitle} ) : ( @@ -66,7 +66,7 @@ export const OnboardingCard: React.FC = ({ return ( - + { }); return ( - + - + @@ -158,16 +158,17 @@ export const OrgNameOnboarding: React.FC = () => { - - + diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/organization_stats.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/organization_stats.tsx index 525035030b8cc..d1f0f6a030421 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/organization_stats.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/organization_stats.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { useValues } from 'kea'; -import { EuiFlexGrid } from '@elastic/eui'; +import { EuiFlexGrid, EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -35,45 +35,46 @@ export const OrganizationStats: React.FC = () => { defaultMessage="Usage statistics" /> } - headerSpacer="m" > - - + + + {!isFederatedAuth && ( + <> + + + )} - count={sourcesCount} - actionPath={SOURCES_PATH} - /> - {!isFederatedAuth && ( - <> - - - - )} - - + + + ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx index 62b96442b9ba0..8bda7c2843b9e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/recent_activity.tsx @@ -41,7 +41,7 @@ export const RecentActivity: React.FC = () => { return ( - + {activityFeed.length > 0 ? ( <> {activityFeed.map((props: FeedActivity, index) => ( diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx index 136901f840b89..9b134b511b34e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/overview/statistic_card.tsx @@ -24,6 +24,7 @@ export const StatisticCard: React.FC = ({ title, count = 0, layout="horizontal" title={title} titleSize="xs" + display="plain" description={ {count} @@ -36,6 +37,7 @@ export const StatisticCard: React.FC = ({ title, count = 0, layout="horizontal" title={title} titleSize="xs" + display="plain" description={ {count}