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

[Logs Overview] Add a flyout to show category document examples #194867

Merged
merged 100 commits into from
Oct 24, 2024

Conversation

Kerry350
Copy link
Contributor

@Kerry350 Kerry350 commented Oct 3, 2024

Summary

Implements #193450.

Discover changes ⚠️

As part of this we need to render a basic table with the log level and summary columns, which is technically context aware but only in the sense we know we want it to be a logs context up front.

The "correct" solution here (or at least from recent conversations) is to use the saved search embeddable. There is upcoming work planned to move log stream component usages over to the saved search embeddable. However, currently this isn't in a place to just be dropped in without some pretty extensive work. I didn't feel comfortable doing a big push on that work as a side effort to this work, especially with a loose (if possible) 8.16 aim for this.

What I've done (and which isn't ideal I appreciate) is used the start contract of the Discover plugin to export the columns / cells pre-wrapped with the Discover services. It's not ideal in the sense of dependencies, but technically Discover doesn't use logs shared. I considered Discover shared but that's for registering functionality for Discover, rather than the other way around.

Eventually we'll be able to remove this and convert over to the new solution. I'm all ears to a better solution, but there's a big mismatch between the needs here and dropping in something that exists currently. Thankfully the changeset for Discover is small if we're happy to keep this temporarily.

Edit: I've made some notes here: https://github.com/elastic/logs-dev/issues/111#issuecomment-2411096251

Edit: New package added here: c290819

Overview

From a high level:

  • Adds a new state machine for handling "details" to show in the flyout (document examples now, plus details and a timeline later).

  • Hooks this up to a flyout expanded from the categories table.

  • Provides linking to Discover to view documents from the category in the flyout.

I've also left some comments inline.

UI / UX

Screenshot 2024-10-10 at 15 05 21

flyout_open

discover_link

@Kerry350
Copy link
Contributor Author

@weltenwort Couple of comments above, but otherwise I've responded to the feedback 👍

Comment on lines +166 to +167
core?: CoreStart;
share?: SharePluginStart;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe my confusion about binding the dependencies early below is driven by the fact that I can't seem to figure out why we need those dependencies to be added here and all upstream usage sites. I'm surely missing something obvious, am I not?

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 need share and core for the ServiceNameBadgeWithActions component. Previously this was accessed via context directly (as it lived in Discover). I changed this to accept the dependencies as props as everything was moved to the new package and we can no longer rely on that context.

The SummaryCellPopover ultimately uses this for the component map creation from this line now.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, thanks for helping me understand that. ❤️

@Kerry350
Copy link
Contributor Author

@weltenwort I've removed the prebinding of the component dependencies, these are now passed in at the usage site. And I've amended the translation imports to named imports 👍

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

Thanks for being so thorough and introducing the clean separate package. Some last questions below, but aside from those it looks very good to me. 👍

Comment on lines +166 to +167
core?: CoreStart;
share?: SharePluginStart;
Copy link
Member

Choose a reason for hiding this comment

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

Ah, thanks for helping me understand that. ❤️

@elasticmachine
Copy link
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: 336b0a0
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-194867-336b0a0626f6

History

cc @Kerry350

@Kerry350 Kerry350 merged commit 6b63f7f into elastic:main Oct 24, 2024
41 checks passed
@kibanamachine kibanamachine added v9.0.0 backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 24, 2024
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 194867 locally

@davismcphee
Copy link
Contributor

@Kerry350 We intended for this to land in 8.x too, right? I'm tempted to add the backport labels myself now but wanted to confirm with you first 🙂

@Kerry350 Kerry350 added the backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) label Oct 28, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11552199027

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 28, 2024
…tic#194867)

## Summary

Implements elastic#193450.

## Discover changes ⚠️

As part of this we need to render a basic table with the log level and
summary columns, which is technically context aware but only in the
sense we know we want it to be a logs context up front.

The "correct" solution here (or at least from recent conversations) is
to use the saved search embeddable. There is upcoming work planned to
move log stream component usages over to the saved search embeddable.
However, currently this isn't in a place to just be dropped in without
some pretty extensive work. I didn't feel comfortable doing a big push
on that work as a side effort to this work, especially with a loose (if
possible) 8.16 aim for this.

What I've done (and which isn't ideal I appreciate) is used the start
contract of the Discover plugin to export the columns / cells
pre-wrapped with the Discover services. It's not ideal in the sense of
dependencies, but technically Discover doesn't use logs shared. I
considered Discover shared but that's for registering functionality for
Discover, rather than the other way around.

Eventually we'll be able to remove this and convert over to the new
solution. I'm all ears to a better solution, but there's a big mismatch
between the needs here and dropping in something that exists currently.
Thankfully the changeset for Discover is small if we're happy to keep
this temporarily.

Edit: I've made some notes here:
elastic/logs-dev#111 (comment)

Edit: New package added here:
elastic@c290819

## Overview

From a high level:

- Adds a new state machine for handling "details" to show in the flyout
(document examples now, plus details and a timeline later).

- Hooks this up to a flyout expanded from the categories table.

- Provides linking to Discover to view documents from the category in
the flyout.

I've also left some comments inline.

## UI / UX

![Screenshot 2024-10-10 at 15 05
21](https://github.com/user-attachments/assets/49b525b1-f730-4e90-9a84-05175edb8c40)

![flyout_open](https://github.com/user-attachments/assets/0995b952-566b-4e09-80cf-20ad94343980)

![discover_link](https://github.com/user-attachments/assets/249ef269-0105-48af-9c81-ebae1cfb1680)

---------

Co-authored-by: Felix Stürmer <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Felix Stürmer <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
(cherry picked from commit 6b63f7f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 28, 2024
…#194867) (#197966)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Logs Overview] Add a flyout to show category document examples
(#194867)](#194867)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kerry
Gallagher","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-24T14:49:27Z","message":"[Logs
Overview] Add a flyout to show category document examples
(#194867)\n\n## Summary\r\n\r\nImplements
https://github.com/elastic/kibana/issues/193450.\r\n\r\n## Discover
changes ⚠️ \r\n\r\nAs part of this we need to render a basic table with
the log level and\r\nsummary columns, which is technically context aware
but only in the\r\nsense we know we want it to be a logs context up
front.\r\n\r\nThe \"correct\" solution here (or at least from recent
conversations) is\r\nto use the saved search embeddable. There is
upcoming work planned to\r\nmove log stream component usages over to the
saved search embeddable.\r\nHowever, currently this isn't in a place to
just be dropped in without\r\nsome pretty extensive work. I didn't feel
comfortable doing a big push\r\non that work as a side effort to this
work, especially with a loose (if\r\npossible) 8.16 aim for
this.\r\n\r\nWhat I've done (and which isn't ideal I appreciate) is used
the start\r\ncontract of the Discover plugin to export the columns /
cells\r\npre-wrapped with the Discover services. It's not ideal in the
sense of\r\ndependencies, but technically Discover doesn't use logs
shared. I\r\nconsidered Discover shared but that's for registering
functionality for\r\nDiscover, rather than the other way
around.\r\n\r\nEventually we'll be able to remove this and convert over
to the new\r\nsolution. I'm all ears to a better solution, but there's a
big mismatch\r\nbetween the needs here and dropping in something that
exists currently.\r\nThankfully the changeset for Discover is small if
we're happy to keep\r\nthis temporarily.\r\n\r\nEdit: I've made some
notes
here:\r\nhttps://github.com/elastic/logs-dev/issues/111#issuecomment-2411096251\r\n\r\nEdit:
New package added
here:\r\nhttps://github.com/elastic/kibana/commit/c290819c1c1e1cb5a67d437cca7783c0e2302c8f\r\n\r\n##
Overview\r\n\r\nFrom a high level:\r\n\r\n- Adds a new state machine for
handling \"details\" to show in the flyout\r\n(document examples now,
plus details and a timeline later).\r\n\r\n- Hooks this up to a flyout
expanded from the categories table.\r\n\r\n- Provides linking to
Discover to view documents from the category in\r\nthe
flyout.\r\n\r\nI've also left some comments inline.\r\n\r\n## UI / UX
\r\n\r\n![Screenshot 2024-10-10 at 15
05\r\n21](https://github.com/user-attachments/assets/49b525b1-f730-4e90-9a84-05175edb8c40)\r\n\r\n\r\n![flyout_open](https://github.com/user-attachments/assets/0995b952-566b-4e09-80cf-20ad94343980)\r\n\r\n\r\n![discover_link](https://github.com/user-attachments/assets/249ef269-0105-48af-9c81-ebae1cfb1680)\r\n\r\n---------\r\n\r\nCo-authored-by:
Felix Stürmer <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Felix
Stürmer <[email protected]>\r\nCo-authored-by: Julia
Rechkunova
<[email protected]>","sha":"6b63f7f6314e9c05525df32629be7ba769c6ab4c","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport
missing","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","backport:version"],"title":"[Logs
Overview] Add a flyout to show category document examples
","number":194867,"url":"https://github.com/elastic/kibana/pull/194867","mergeCommit":{"message":"[Logs
Overview] Add a flyout to show category document examples
(#194867)\n\n## Summary\r\n\r\nImplements
https://github.com/elastic/kibana/issues/193450.\r\n\r\n## Discover
changes ⚠️ \r\n\r\nAs part of this we need to render a basic table with
the log level and\r\nsummary columns, which is technically context aware
but only in the\r\nsense we know we want it to be a logs context up
front.\r\n\r\nThe \"correct\" solution here (or at least from recent
conversations) is\r\nto use the saved search embeddable. There is
upcoming work planned to\r\nmove log stream component usages over to the
saved search embeddable.\r\nHowever, currently this isn't in a place to
just be dropped in without\r\nsome pretty extensive work. I didn't feel
comfortable doing a big push\r\non that work as a side effort to this
work, especially with a loose (if\r\npossible) 8.16 aim for
this.\r\n\r\nWhat I've done (and which isn't ideal I appreciate) is used
the start\r\ncontract of the Discover plugin to export the columns /
cells\r\npre-wrapped with the Discover services. It's not ideal in the
sense of\r\ndependencies, but technically Discover doesn't use logs
shared. I\r\nconsidered Discover shared but that's for registering
functionality for\r\nDiscover, rather than the other way
around.\r\n\r\nEventually we'll be able to remove this and convert over
to the new\r\nsolution. I'm all ears to a better solution, but there's a
big mismatch\r\nbetween the needs here and dropping in something that
exists currently.\r\nThankfully the changeset for Discover is small if
we're happy to keep\r\nthis temporarily.\r\n\r\nEdit: I've made some
notes
here:\r\nhttps://github.com/elastic/logs-dev/issues/111#issuecomment-2411096251\r\n\r\nEdit:
New package added
here:\r\nhttps://github.com/elastic/kibana/commit/c290819c1c1e1cb5a67d437cca7783c0e2302c8f\r\n\r\n##
Overview\r\n\r\nFrom a high level:\r\n\r\n- Adds a new state machine for
handling \"details\" to show in the flyout\r\n(document examples now,
plus details and a timeline later).\r\n\r\n- Hooks this up to a flyout
expanded from the categories table.\r\n\r\n- Provides linking to
Discover to view documents from the category in\r\nthe
flyout.\r\n\r\nI've also left some comments inline.\r\n\r\n## UI / UX
\r\n\r\n![Screenshot 2024-10-10 at 15
05\r\n21](https://github.com/user-attachments/assets/49b525b1-f730-4e90-9a84-05175edb8c40)\r\n\r\n\r\n![flyout_open](https://github.com/user-attachments/assets/0995b952-566b-4e09-80cf-20ad94343980)\r\n\r\n\r\n![discover_link](https://github.com/user-attachments/assets/249ef269-0105-48af-9c81-ebae1cfb1680)\r\n\r\n---------\r\n\r\nCo-authored-by:
Felix Stürmer <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Felix
Stürmer <[email protected]>\r\nCo-authored-by: Julia
Rechkunova
<[email protected]>","sha":"6b63f7f6314e9c05525df32629be7ba769c6ab4c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194867","number":194867,"mergeCommit":{"message":"[Logs
Overview] Add a flyout to show category document examples
(#194867)\n\n## Summary\r\n\r\nImplements
https://github.com/elastic/kibana/issues/193450.\r\n\r\n## Discover
changes ⚠️ \r\n\r\nAs part of this we need to render a basic table with
the log level and\r\nsummary columns, which is technically context aware
but only in the\r\nsense we know we want it to be a logs context up
front.\r\n\r\nThe \"correct\" solution here (or at least from recent
conversations) is\r\nto use the saved search embeddable. There is
upcoming work planned to\r\nmove log stream component usages over to the
saved search embeddable.\r\nHowever, currently this isn't in a place to
just be dropped in without\r\nsome pretty extensive work. I didn't feel
comfortable doing a big push\r\non that work as a side effort to this
work, especially with a loose (if\r\npossible) 8.16 aim for
this.\r\n\r\nWhat I've done (and which isn't ideal I appreciate) is used
the start\r\ncontract of the Discover plugin to export the columns /
cells\r\npre-wrapped with the Discover services. It's not ideal in the
sense of\r\ndependencies, but technically Discover doesn't use logs
shared. I\r\nconsidered Discover shared but that's for registering
functionality for\r\nDiscover, rather than the other way
around.\r\n\r\nEventually we'll be able to remove this and convert over
to the new\r\nsolution. I'm all ears to a better solution, but there's a
big mismatch\r\nbetween the needs here and dropping in something that
exists currently.\r\nThankfully the changeset for Discover is small if
we're happy to keep\r\nthis temporarily.\r\n\r\nEdit: I've made some
notes
here:\r\nhttps://github.com/elastic/logs-dev/issues/111#issuecomment-2411096251\r\n\r\nEdit:
New package added
here:\r\nhttps://github.com/elastic/kibana/commit/c290819c1c1e1cb5a67d437cca7783c0e2302c8f\r\n\r\n##
Overview\r\n\r\nFrom a high level:\r\n\r\n- Adds a new state machine for
handling \"details\" to show in the flyout\r\n(document examples now,
plus details and a timeline later).\r\n\r\n- Hooks this up to a flyout
expanded from the categories table.\r\n\r\n- Provides linking to
Discover to view documents from the category in\r\nthe
flyout.\r\n\r\nI've also left some comments inline.\r\n\r\n## UI / UX
\r\n\r\n![Screenshot 2024-10-10 at 15
05\r\n21](https://github.com/user-attachments/assets/49b525b1-f730-4e90-9a84-05175edb8c40)\r\n\r\n\r\n![flyout_open](https://github.com/user-attachments/assets/0995b952-566b-4e09-80cf-20ad94343980)\r\n\r\n\r\n![discover_link](https://github.com/user-attachments/assets/249ef269-0105-48af-9c81-ebae1cfb1680)\r\n\r\n---------\r\n\r\nCo-authored-by:
Felix Stürmer <[email protected]>\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>\r\nCo-authored-by: Felix
Stürmer <[email protected]>\r\nCo-authored-by: Julia
Rechkunova
<[email protected]>","sha":"6b63f7f6314e9c05525df32629be7ba769c6ab4c"}}]}]
BACKPORT-->

Co-authored-by: Kerry Gallagher <[email protected]>
@kibanamachine kibanamachine added v8.17.0 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-logs Observability Logs User Experience Team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants