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

[Discover] Extract DiscoverGridFlyout from DiscoverGrid component #144154

Closed
kertal opened this issue Oct 28, 2022 · 4 comments · Fixed by #147403
Closed

[Discover] Extract DiscoverGridFlyout from DiscoverGrid component #144154

kertal opened this issue Oct 28, 2022 · 4 comments · Fixed by #147403
Assignees
Labels
chore Feature:Discover Discover Application impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@kertal
Copy link
Member

kertal commented Oct 28, 2022

For our future work to create a unified_data_table and beyond that also to provide a unified experience when expanding a document, it is necessary to decouple DiscoverGridFlyout

<DiscoverGridFlyout
dataView={dataView}
hit={expandedDoc}
hits={displayedRows}
// if default columns are used, dont make them part of the URL - the context state handling will take care to restore them
columns={defaultColumns ? [] : displayedColumns}
onFilter={onFilter}
onRemoveColumn={onRemoveColumn}
onAddColumn={onAddColumn}
onClose={() => setExpandedDoc(undefined)}
setExpandedDoc={setExpandedDoc}
/>

from DiscoverGrid:

export const DiscoverGrid = ({
ariaLabelledBy,
columns,
dataView,
isLoading,
expandedDoc,
onAddColumn,
onFilter,
onRemoveColumn,

DiscoverGrid should get a new param like onExpandDoc, which should trigger displaying the expanded document.

When extracting DiscoverGridFlyout it is also necessary to extract stateful functionality like the document selection. This allows users to select documents and in the flyout, they should be able to use pagination to navigate to the previous/next document

Menubar_und_Discover_-_Elastic

@kertal kertal added chore Feature:Discover Discover Application Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Oct 28, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@kertal kertal added loe:medium Medium Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Nov 7, 2022
@michaelolo24
Copy link
Contributor

@mattkime or @kertal, will the plan to be to turn the entire flyout into a consumable package, or turn the components (i.e., table, json, pagination) into consumable components? We have a similar flyout in security currently, so it would be great to be able to utilize this functionality in security instead of maintaining our own which is behind the current Discover one in the table and json functionality. One thing we currently have in addition to those is the concept of the alert detail view that we'd want to maintain. Being able to combine them on our end would be awesome 😄.

With that said, the alert detail view is potentially extensible to any regular event as well, so maybe another option is being able to enhance your component with that information as well. Anyways, just wanted to start a discussion about it!

Screen.Recording.2022-11-29.at.10.54.06.AM.mov

@kertal
Copy link
Member Author

kertal commented Nov 30, 2022

@michaelolo24 yes, this is exactly what we intend to do, it will be the unified doc viewer, also providing parts / components like the JSON tab of it will be possible. Resolving this issue is a requirement for further work in this area. Thx a lot for giving info about a new potential consumer of this work. FYI @lukasolson @ninoslavmiskovic

@michaelolo24
Copy link
Contributor

Fantastic, thanks for the update! Let me know if there's any way I can help @kertal !

mattkime added a commit that referenced this issue Dec 16, 2022
…147403)

## Summary

Extract discover grid flyout from discover grid component. Part of
effort to turn discover into set of components consumable by other
kibana apps.

Closes #144154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Discover Discover Application impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants