Skip to content

Commit

Permalink
[Logs onboarding] design feedback (#159790)
Browse files Browse the repository at this point in the history
closes #159655.

- [x] Make sure inputs in configure logs step occupy the whole width
- [x] Fix copy button in apiKey callout, currently is cropped
- [x] Add space bellow action buttons (back and continue)

Apart from the tasks above, we are hiding `Give feedback` button from
plugin root page, since the form is dedicated to logs onboarding.



https://github.com/elastic/kibana/assets/1313018/80872e8a-f239-4584-9b15-7ec8cdd32d5d
  • Loading branch information
yngrdyn authored Jun 20, 2023
1 parent 8d83f64 commit 06a00d6
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ export function ApiKeyBanner({
iconType="copyClipboard"
onClick={copy}
color="success"
style={{ backgroundColor: 'transparent' }}
css={{
'> svg.euiIcon': {
borderRadius: '0 !important',
},
}}
aria-label={i18n.translate(
'xpack.observability_onboarding.apiKeyBanner.field.copyButton',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export function ConfigureLogs() {
direction="column"
gutterSize="xs"
>
<EuiFlexItem grow={false}>
<EuiFlexItem style={{ width: '100%' }}>
<EuiAccordion
id="advancedSettingsAccordion"
css={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,32 @@
import { EuiButton } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { useLocation } from 'react-router-dom';

const OBSERVABILITY_ONBOARDING_FEEDBACK_LINK =
'https://ela.st/logs-onboarding-feedback';
const LOGS_ONBOARDING_FEEDBACK_LINK = 'https://ela.st/logs-onboarding-feedback';

export function ObservabilityOnboardingHeaderActionMenu() {
return (
<EuiButton
data-test-subj="observabilityOnboardingPageGiveFeedback"
href={OBSERVABILITY_ONBOARDING_FEEDBACK_LINK}
size="s"
target="_blank"
color="warning"
iconType="editorComment"
>
{i18n.translate('xpack.observability_onboarding.header.feedback', {
defaultMessage: 'Give feedback',
})}
</EuiButton>
);
const location = useLocation();
const normalizedPathname = location.pathname.replace(/\/$/, '');

const isRootPage = normalizedPathname === '';

if (!isRootPage) {
return (
<EuiButton
data-test-subj="observabilityOnboardingPageGiveFeedback"
href={LOGS_ONBOARDING_FEEDBACK_LINK}
size="s"
target="_blank"
color="warning"
iconType="editorComment"
>
{i18n.translate('xpack.observability_onboarding.header.feedback', {
defaultMessage: 'Give feedback',
})}
</EuiButton>
);
}

return <></>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
EuiPanelProps,
EuiSpacer,
EuiTitle,
useEuiTheme,
} from '@elastic/eui';

interface StepPanelProps {
Expand Down Expand Up @@ -57,8 +58,10 @@ interface StepPanelFooterProps {
}
export function StepPanelFooter(props: StepPanelFooterProps) {
const { items = [], children } = props;
const { euiTheme } = useEuiTheme();

return (
<EuiFlexItem grow={false}>
<EuiFlexItem grow={false} style={{ marginBottom: euiTheme.size.l }}>
{children}
{items && (
<EuiFlexGroup justifyContent="spaceBetween">
Expand Down

0 comments on commit 06a00d6

Please sign in to comment.