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

"Create drilldown" flyout - design cleanup #60309

Merged
merged 8 commits into from
Mar 17, 2020
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
3 changes: 2 additions & 1 deletion packages/kbn-storybook/storybook_config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ module.exports = async ({ config }) => {
config.module.rules.push({
test: /\.tsx$/,
// Exclude example files, as we don't display props info for them
exclude: /\.examples.tsx$/,
// TODO: validated_dual_range throws: https://github.com/elastic/kibana/issues/60356
exclude: /\.examples.tsx$|validated_dual_range.tsx$/,
use: [
// Parse TS comments to create Props tables in the UI
require.resolve('react-docgen-typescript-loader'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
.auaActionWizard__selectedActionFactoryContainer {
background-color: $euiColorLightestShade;
padding: $euiSize;
border-radius: $euiBorderRadius;
}

.auaActionWizard__actionFactoryItem {
.euiKeyPadMenuItem__label {
height: #{$euiSizeXL};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const SelectedActionFactory: React.FC<SelectedActionFactoryProps> = ({
</EuiFlexItem>
{showDeselect && (
<EuiFlexItem grow={false}>
<EuiButtonEmpty size="s" onClick={() => onDeselect()}>
<EuiButtonEmpty size="xs" onClick={() => onDeselect()}>
{txtChangeButton}
</EuiButtonEmpty>
</EuiFlexItem>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiTextColor,
EuiText,
EuiLink,
EuiSpacer,
EuiButtonEmpty,
EuiIcon,
} from '@elastic/eui';
import './drilldown_hello_bar.scss';
import { txtHideHelpButtonLabel, txtHelpText, txtViewDocsLinkLabel } from './i18n';

export interface DrilldownHelloBarProps {
Expand All @@ -30,12 +31,16 @@ export const DrilldownHelloBar: React.FC<DrilldownHelloBarProps> = ({
}) => {
return (
<EuiCallOut
iconType="help"
data-test-subj={WELCOME_MESSAGE_TEST_SUBJ}
title={
<EuiFlexGroup className="drdHelloBar__content">
<EuiFlexItem grow={false}>
<EuiIcon type="help" />
</EuiFlexItem>
<EuiFlexItem grow={true}>
<EuiTextColor color="subdued">{txtHelpText}</EuiTextColor>
<EuiText size={'s'}>
<EuiTextColor color="subdued">{txtHelpText}</EuiTextColor>
</EuiText>
{docsLink && (
<>
<EuiSpacer size={'xs'} />
Expand All @@ -45,7 +50,7 @@ export const DrilldownHelloBar: React.FC<DrilldownHelloBarProps> = ({
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmpty size="xs" onClick={onHideClick}>
<EuiTextColor color="subdued">{txtHideHelpButtonLabel}</EuiTextColor>
{txtHideHelpButtonLabel}
</EuiButtonEmpty>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,23 @@ storiesOf('components/FlyoutDrilldownWizard', module)
/>
</EuiFlyout>
);
})
.add('open in flyout - edit, just 1 action type', () => {
return (
<EuiFlyout onClose={() => {}}>
<FlyoutDrilldownWizard
onClose={() => {}}
drilldownActionFactories={[dashboardFactory]}
initialDrilldownWizardConfig={{
name: 'My fancy drilldown',
actionFactory: urlFactory as any,
actionConfig: {
url: 'https://elastic.co',
openInNewTab: true,
},
}}
mode={'edit'}
/>
</EuiFlyout>
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const FormDrilldownWizard: React.FC<FormDrilldownWizardProps> = ({

const actionWizard = (
<EuiFormRow
label={txtDrilldownAction}
label={actionFactories?.length > 1 ? txtDrilldownAction : undefined}
fullWidth={true}
className="drdFormDrilldownWizard__formRow"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';
export const txtNameOfDrilldown = i18n.translate(
'xpack.drilldowns.components.FormCreateDrilldown.nameOfDrilldown',
{
defaultMessage: 'Name of drilldown:',
defaultMessage: 'Name',
}
);

Expand All @@ -23,6 +23,6 @@ export const txtUntitledDrilldown = i18n.translate(
export const txtDrilldownAction = i18n.translate(
'xpack.drilldowns.components.FormCreateDrilldown.drilldownAction',
{
defaultMessage: 'Drilldown action:',
defaultMessage: 'Action',
}
);