Skip to content

Commit

Permalink
Add tag bulk action context menu (#82816)
Browse files Browse the repository at this point in the history
* add the delete tag bulk action

* add unit tests for bulk delete

* fix duplicate i18n key

* add RBAC test on bulk delete

* add functional tests

* self review

* design nits

* add maxWidth option for confirm modal and add missing doc

* change bulk delete confirm modal max width

* add more missing doc

* only show loading state when performing the bulk delete

* use spacer instead of custom margin on horizontal rule

* use link instead of button to remove custom styles

* remove spacers, just use styles

* add divider when action menu is displayed

* set max-width for single delete confirm

* a11y fixes

* address nits

* add aria-label to delete action

Co-authored-by: Michail Yasonik <[email protected]>
  • Loading branch information
pgayvallet and Michail Yasonik authored Nov 18, 2020
1 parent 27125bc commit a7e5f07
Show file tree
Hide file tree
Showing 56 changed files with 1,419 additions and 51 deletions.
5 changes: 5 additions & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [NotificationsSetup](./kibana-plugin-core-public.notificationssetup.md) | |
| [NotificationsStart](./kibana-plugin-core-public.notificationsstart.md) | |
| [OverlayBannersStart](./kibana-plugin-core-public.overlaybannersstart.md) | |
| [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) | |
| [OverlayFlyoutStart](./kibana-plugin-core-public.overlayflyoutstart.md) | APIs to open and manage fly-out dialogs. |
| [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) | |
| [OverlayModalOpenOptions](./kibana-plugin-core-public.overlaymodalopenoptions.md) | |
| [OverlayModalStart](./kibana-plugin-core-public.overlaymodalstart.md) | APIs to open and manage modal dialogs. |
| [OverlayRef](./kibana-plugin-core-public.overlayref.md) | Returned by [OverlayStart](./kibana-plugin-core-public.overlaystart.md) methods for closing a mounted overlay. |
| [OverlayStart](./kibana-plugin-core-public.overlaystart.md) | |
| [Plugin](./kibana-plugin-core-public.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; ["data-test-subj"](./kibana-plugin-core-public.overlayflyoutopenoptions._data-test-subj_.md)

## OverlayFlyoutOpenOptions."data-test-subj" property

<b>Signature:</b>

```typescript
'data-test-subj'?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; [className](./kibana-plugin-core-public.overlayflyoutopenoptions.classname.md)

## OverlayFlyoutOpenOptions.className property

<b>Signature:</b>

```typescript
className?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; [closeButtonAriaLabel](./kibana-plugin-core-public.overlayflyoutopenoptions.closebuttonarialabel.md)

## OverlayFlyoutOpenOptions.closeButtonAriaLabel property

<b>Signature:</b>

```typescript
closeButtonAriaLabel?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md)

## OverlayFlyoutOpenOptions interface


<b>Signature:</b>

```typescript
export interface OverlayFlyoutOpenOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| ["data-test-subj"](./kibana-plugin-core-public.overlayflyoutopenoptions._data-test-subj_.md) | <code>string</code> | |
| [className](./kibana-plugin-core-public.overlayflyoutopenoptions.classname.md) | <code>string</code> | |
| [closeButtonAriaLabel](./kibana-plugin-core-public.overlayflyoutopenoptions.closebuttonarialabel.md) | <code>string</code> | |
| [ownFocus](./kibana-plugin-core-public.overlayflyoutopenoptions.ownfocus.md) | <code>boolean</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutOpenOptions](./kibana-plugin-core-public.overlayflyoutopenoptions.md) &gt; [ownFocus](./kibana-plugin-core-public.overlayflyoutopenoptions.ownfocus.md)

## OverlayFlyoutOpenOptions.ownFocus property

<b>Signature:</b>

```typescript
ownFocus?: boolean;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutStart](./kibana-plugin-core-public.overlayflyoutstart.md)

## OverlayFlyoutStart interface

APIs to open and manage fly-out dialogs.

<b>Signature:</b>

```typescript
export interface OverlayFlyoutStart
```

## Methods

| Method | Description |
| --- | --- |
| [open(mount, options)](./kibana-plugin-core-public.overlayflyoutstart.open.md) | Opens a flyout panel with the given mount point inside. You can use <code>close()</code> on the returned FlyoutRef to close the flyout. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayFlyoutStart](./kibana-plugin-core-public.overlayflyoutstart.md) &gt; [open](./kibana-plugin-core-public.overlayflyoutstart.open.md)

## OverlayFlyoutStart.open() method

Opens a flyout panel with the given mount point inside. You can use `close()` on the returned FlyoutRef to close the flyout.

<b>Signature:</b>

```typescript
open(mount: MountPoint, options?: OverlayFlyoutOpenOptions): OverlayRef;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| mount | <code>MountPoint</code> | |
| options | <code>OverlayFlyoutOpenOptions</code> | |

<b>Returns:</b>

`OverlayRef`

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; ["data-test-subj"](./kibana-plugin-core-public.overlaymodalconfirmoptions._data-test-subj_.md)

## OverlayModalConfirmOptions."data-test-subj" property

<b>Signature:</b>

```typescript
'data-test-subj'?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [buttonColor](./kibana-plugin-core-public.overlaymodalconfirmoptions.buttoncolor.md)

## OverlayModalConfirmOptions.buttonColor property

<b>Signature:</b>

```typescript
buttonColor?: EuiConfirmModalProps['buttonColor'];
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [cancelButtonText](./kibana-plugin-core-public.overlaymodalconfirmoptions.cancelbuttontext.md)

## OverlayModalConfirmOptions.cancelButtonText property

<b>Signature:</b>

```typescript
cancelButtonText?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [className](./kibana-plugin-core-public.overlaymodalconfirmoptions.classname.md)

## OverlayModalConfirmOptions.className property

<b>Signature:</b>

```typescript
className?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [closeButtonAriaLabel](./kibana-plugin-core-public.overlaymodalconfirmoptions.closebuttonarialabel.md)

## OverlayModalConfirmOptions.closeButtonAriaLabel property

<b>Signature:</b>

```typescript
closeButtonAriaLabel?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [confirmButtonText](./kibana-plugin-core-public.overlaymodalconfirmoptions.confirmbuttontext.md)

## OverlayModalConfirmOptions.confirmButtonText property

<b>Signature:</b>

```typescript
confirmButtonText?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [defaultFocusedButton](./kibana-plugin-core-public.overlaymodalconfirmoptions.defaultfocusedbutton.md)

## OverlayModalConfirmOptions.defaultFocusedButton property

<b>Signature:</b>

```typescript
defaultFocusedButton?: EuiConfirmModalProps['defaultFocusedButton'];
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [maxWidth](./kibana-plugin-core-public.overlaymodalconfirmoptions.maxwidth.md)

## OverlayModalConfirmOptions.maxWidth property

Sets the max-width of the modal. Set to `true` to use the default (`euiBreakpoints 'm'`<!-- -->), set to `false` to not restrict the width, set to a number for a custom width in px, set to a string for a custom width in custom measurement.

<b>Signature:</b>

```typescript
maxWidth?: boolean | number | string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md)

## OverlayModalConfirmOptions interface


<b>Signature:</b>

```typescript
export interface OverlayModalConfirmOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| ["data-test-subj"](./kibana-plugin-core-public.overlaymodalconfirmoptions._data-test-subj_.md) | <code>string</code> | |
| [buttonColor](./kibana-plugin-core-public.overlaymodalconfirmoptions.buttoncolor.md) | <code>EuiConfirmModalProps['buttonColor']</code> | |
| [cancelButtonText](./kibana-plugin-core-public.overlaymodalconfirmoptions.cancelbuttontext.md) | <code>string</code> | |
| [className](./kibana-plugin-core-public.overlaymodalconfirmoptions.classname.md) | <code>string</code> | |
| [closeButtonAriaLabel](./kibana-plugin-core-public.overlaymodalconfirmoptions.closebuttonarialabel.md) | <code>string</code> | |
| [confirmButtonText](./kibana-plugin-core-public.overlaymodalconfirmoptions.confirmbuttontext.md) | <code>string</code> | |
| [defaultFocusedButton](./kibana-plugin-core-public.overlaymodalconfirmoptions.defaultfocusedbutton.md) | <code>EuiConfirmModalProps['defaultFocusedButton']</code> | |
| [maxWidth](./kibana-plugin-core-public.overlaymodalconfirmoptions.maxwidth.md) | <code>boolean &#124; number &#124; string</code> | Sets the max-width of the modal. Set to <code>true</code> to use the default (<code>euiBreakpoints 'm'</code>), set to <code>false</code> to not restrict the width, set to a number for a custom width in px, set to a string for a custom width in custom measurement. |
| [title](./kibana-plugin-core-public.overlaymodalconfirmoptions.title.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalConfirmOptions](./kibana-plugin-core-public.overlaymodalconfirmoptions.md) &gt; [title](./kibana-plugin-core-public.overlaymodalconfirmoptions.title.md)

## OverlayModalConfirmOptions.title property

<b>Signature:</b>

```typescript
title?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-core-public.overlaymodalopenoptions.md) &gt; ["data-test-subj"](./kibana-plugin-core-public.overlaymodalopenoptions._data-test-subj_.md)

## OverlayModalOpenOptions."data-test-subj" property

<b>Signature:</b>

```typescript
'data-test-subj'?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-core-public.overlaymodalopenoptions.md) &gt; [className](./kibana-plugin-core-public.overlaymodalopenoptions.classname.md)

## OverlayModalOpenOptions.className property

<b>Signature:</b>

```typescript
className?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-core-public.overlaymodalopenoptions.md) &gt; [closeButtonAriaLabel](./kibana-plugin-core-public.overlaymodalopenoptions.closebuttonarialabel.md)

## OverlayModalOpenOptions.closeButtonAriaLabel property

<b>Signature:</b>

```typescript
closeButtonAriaLabel?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalOpenOptions](./kibana-plugin-core-public.overlaymodalopenoptions.md)

## OverlayModalOpenOptions interface


<b>Signature:</b>

```typescript
export interface OverlayModalOpenOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| ["data-test-subj"](./kibana-plugin-core-public.overlaymodalopenoptions._data-test-subj_.md) | <code>string</code> | |
| [className](./kibana-plugin-core-public.overlaymodalopenoptions.classname.md) | <code>string</code> | |
| [closeButtonAriaLabel](./kibana-plugin-core-public.overlaymodalopenoptions.closebuttonarialabel.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalStart](./kibana-plugin-core-public.overlaymodalstart.md)

## OverlayModalStart interface

APIs to open and manage modal dialogs.

<b>Signature:</b>

```typescript
export interface OverlayModalStart
```

## Methods

| Method | Description |
| --- | --- |
| [open(mount, options)](./kibana-plugin-core-public.overlaymodalstart.open.md) | Opens a modal panel with the given mount point inside. You can use <code>close()</code> on the returned OverlayRef to close the modal. |
| [openConfirm(message, options)](./kibana-plugin-core-public.overlaymodalstart.openconfirm.md) | Opens a confirmation modal with the given text or mountpoint as a message. Returns a Promise resolving to <code>true</code> if user confirmed or <code>false</code> otherwise. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalStart](./kibana-plugin-core-public.overlaymodalstart.md) &gt; [open](./kibana-plugin-core-public.overlaymodalstart.open.md)

## OverlayModalStart.open() method

Opens a modal panel with the given mount point inside. You can use `close()` on the returned OverlayRef to close the modal.

<b>Signature:</b>

```typescript
open(mount: MountPoint, options?: OverlayModalOpenOptions): OverlayRef;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| mount | <code>MountPoint</code> | |
| options | <code>OverlayModalOpenOptions</code> | |

<b>Returns:</b>

`OverlayRef`

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [OverlayModalStart](./kibana-plugin-core-public.overlaymodalstart.md) &gt; [openConfirm](./kibana-plugin-core-public.overlaymodalstart.openconfirm.md)

## OverlayModalStart.openConfirm() method

Opens a confirmation modal with the given text or mountpoint as a message. Returns a Promise resolving to `true` if user confirmed or `false` otherwise.

<b>Signature:</b>

```typescript
openConfirm(message: MountPoint | string, options?: OverlayModalConfirmOptions): Promise<boolean>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| message | <code>MountPoint &#124; string</code> | |
| options | <code>OverlayModalConfirmOptions</code> | |

<b>Returns:</b>

`Promise<boolean>`

Loading

0 comments on commit a7e5f07

Please sign in to comment.