Skip to content

Commit

Permalink
Drilldowns finalize (#60371)
Browse files Browse the repository at this point in the history
* fix: πŸ› align flyout content to left side

* fix: πŸ› move context menu item number 1px lower

* fix: πŸ› move flyout back nav chevron up

* fix: πŸ› fix type check after refactor
  • Loading branch information
streamich authored Mar 17, 2020
1 parent 5418305 commit ceb5cfe
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('EmbeddableActionStorage', () => {
const storage = new EmbeddableActionStorage(embeddable);
const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -63,7 +63,7 @@ describe('EmbeddableActionStorage', () => {
const storage = new EmbeddableActionStorage(embeddable);
const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -81,17 +81,17 @@ describe('EmbeddableActionStorage', () => {

const event1: UiActionsSerializedEvent = {
eventId: 'EVENT_ID1',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};
const event2: UiActionsSerializedEvent = {
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};
const event3: UiActionsSerializedEvent = {
eventId: 'EVENT_ID3',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -115,7 +115,7 @@ describe('EmbeddableActionStorage', () => {
const storage = new EmbeddableActionStorage(embeddable);
const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -142,14 +142,14 @@ describe('EmbeddableActionStorage', () => {

const event1: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'foo',
} as any,
};
const event2: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'bar',
} as any,
Expand All @@ -168,28 +168,28 @@ describe('EmbeddableActionStorage', () => {

const event1: UiActionsSerializedEvent = {
eventId: 'EVENT_ID1',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'foo',
} as any,
};
const event2: UiActionsSerializedEvent = {
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'bar',
} as any,
};
const event22: UiActionsSerializedEvent = {
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'baz',
} as any,
};
const event3: UiActionsSerializedEvent = {
eventId: 'EVENT_ID3',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'qux',
} as any,
Expand Down Expand Up @@ -219,7 +219,7 @@ describe('EmbeddableActionStorage', () => {

const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -237,12 +237,12 @@ describe('EmbeddableActionStorage', () => {

const event1: UiActionsSerializedEvent = {
eventId: 'EVENT_ID1',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};
const event2: UiActionsSerializedEvent = {
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -269,7 +269,7 @@ describe('EmbeddableActionStorage', () => {

const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -286,21 +286,21 @@ describe('EmbeddableActionStorage', () => {

const event1: UiActionsSerializedEvent = {
eventId: 'EVENT_ID1',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'foo',
} as any,
};
const event2: UiActionsSerializedEvent = {
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'bar',
} as any,
};
const event3: UiActionsSerializedEvent = {
eventId: 'EVENT_ID3',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {
name: 'qux',
} as any,
Expand Down Expand Up @@ -347,7 +347,7 @@ describe('EmbeddableActionStorage', () => {

const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand Down Expand Up @@ -375,7 +375,7 @@ describe('EmbeddableActionStorage', () => {

const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand Down Expand Up @@ -403,7 +403,7 @@ describe('EmbeddableActionStorage', () => {

const event: UiActionsSerializedEvent = {
eventId: 'EVENT_ID',
triggerId: 'TRIGGER-ID',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand All @@ -422,17 +422,17 @@ describe('EmbeddableActionStorage', () => {

const event1: UiActionsSerializedEvent = {
eventId: 'EVENT_ID1',
triggerId: 'TRIGGER-ID1',
triggers: ['TRIGGER-ID'],
action: {} as any,
};
const event2: UiActionsSerializedEvent = {
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID2',
triggers: ['TRIGGER-ID'],
action: {} as any,
};
const event3: UiActionsSerializedEvent = {
eventId: 'EVENT_ID3',
triggerId: 'TRIGGER-ID3',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand Down Expand Up @@ -476,15 +476,15 @@ describe('EmbeddableActionStorage', () => {

await storage.create({
eventId: 'EVENT_ID1',
triggerId: 'TRIGGER-ID1',
triggers: ['TRIGGER-ID'],
action: {} as any,
});

expect(await storage.count()).toBe(1);

await storage.create({
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID1',
triggers: ['TRIGGER-ID'],
action: {} as any,
});

Expand Down Expand Up @@ -522,13 +522,13 @@ describe('EmbeddableActionStorage', () => {

const event1: UiActionsSerializedEvent = {
eventId: 'EVENT_ID1',
triggerId: 'TRIGGER-ID1',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

const event2: UiActionsSerializedEvent = {
eventId: 'EVENT_ID2',
triggerId: 'TRIGGER-ID1',
triggers: ['TRIGGER-ID'],
action: {} as any,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const MenuItem: React.FC<{ context: EmbeddableContext }> = ({ context })
}, [context.embeddable.dynamicActions, isMounted]);

const badge = !count ? null : (
<EuiNotificationBadge style={{ float: 'right' }}>{count}</EuiNotificationBadge>
<EuiNotificationBadge style={{ float: 'right', marginTop: 1 }}>{count}</EuiNotificationBadge>
);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export const DrilldownHelloBar: React.FC<DrilldownHelloBarProps> = ({
title={
<EuiFlexGroup className="drdHelloBar__content">
<EuiFlexItem grow={false}>
<EuiIcon type="help" />
<div style={{ marginLeft: '8px' }}>
<EuiIcon type="help" />
</div>
</EuiFlexItem>
<EuiFlexItem grow={true}>
<EuiText size={'s'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ export const FlyoutFrame: React.FC<FlyoutFrameProps> = ({
<EuiFlexGroup alignItems="center" gutterSize={'s'} responsive={false}>
{onBack && (
<EuiFlexItem grow={false}>
<EuiButtonIcon
color={'subdued'}
onClick={onBack}
iconType="arrowLeft"
aria-label={txtBack}
/>
<div style={{ marginLeft: '-8px', marginTop: '-4px' }}>
<EuiButtonIcon
color={'subdued'}
onClick={onBack}
iconType="arrowLeft"
aria-label={txtBack}
/>
</div>
</EuiFlexItem>
)}
{title && (
Expand Down

0 comments on commit ceb5cfe

Please sign in to comment.