Skip to content

Allow other apps to list their custom visualizations in the Visualize app#43386

Merged
chrisdavies merged 14 commits intoelastic:masterfrom
chrisdavies:visualize/app-extensions
Aug 26, 2019
Merged

Allow other apps to list their custom visualizations in the Visualize app#43386
chrisdavies merged 14 commits intoelastic:masterfrom
chrisdavies:visualize/app-extensions

Conversation

@chrisdavies
Copy link
Contributor

This PR introduces a mechanism that allows other Kibana apps (such as Lens) to register visualizations with the Visualize app. These visualizations have their own saved objects and their own separate editing experiences, but still managed in the Visualize app's visualization list.

that are managed in the Visualize app list.
@elasticmachine
Copy link
Contributor

💔 Build Failed

}

.visListingTable__actionIcon {
filter: grayscale(100%);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should already be applied if the column is identified as an ActionsColumn (er, has action content). I tried winding my way through the files to figure out why this isn't just working, but couldn't track down the root of the issue. Perhaps I'm missing something, but it seems like something is off here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because we're using a custom column here, not the standard action, since we want to enable / disable on a per item basis. The selector used by EUI is really specific and involves a 3 class-name chain which doesn't exist in our table here. :/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented on that in the other PR (we have to get into master, this is getting confusing) - as there are only two consumers of the table list view, we can do this in a clean way, solve it in table list view and don't need this custom column

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll still need a column like this, however, so we'll still end up with our own CSS, I think for the reason I outlined.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@spalger
Copy link
Contributor

spalger commented Aug 16, 2019

Please merge master to fix percy failure

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@@ -0,0 +1,12 @@

.kbnTableListView__actionIcon {
filter: grayscale(100%);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://caniuse.com/#search=grayscale

Did you test this to make sure it worked?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a minor thing, so it doesn't need to work perfectly across browsers. I'm just trying to get the table to match the look / feel of the default EUI table which itself uses this filter.

The filter works in FF, Chrome, and Safari, though. Haven't tested in IE or Edge.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally EuiInMemoryTable would support to have different actions on different rows. I suggest we add a TODO here and open an issue in EUI to add this functionality - then we can clean it up here. What do you think @snide @chrisdavies ?

@elasticmachine
Copy link
Contributor

💔 Build Failed

}),

render: (_field, record) => (
<EuiButtonIcon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the comments above addressed. The CI failure is legit, kbn.table_list_view.listing.table.editActionName is not used anymore. Should be fixed if we implement the action like it is implemented in EUI - kbn.table_list_view.listing.table.editActionName is the aria-label of the button, kbn.table_list_view.listing.table.editActionDescription is the tooltip content.

@chrisdavies
Copy link
Contributor Author

We discussed this morning, and think that we can get away with an all-or-nothing action list (e.g. if you have edit permission on visualize, you get it on Lens), so I'm going to revert the more controversial bit of this PR.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, didn't test again

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants