-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Fix Logs stream minimap after changes to use @emotion #203620
[Logs] Fix Logs stream minimap after changes to use @emotion #203620
Conversation
/ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this, LGTM
Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs) |
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for converting this ancient code from pre-function-component times.
summaryBuckets, | ||
summaryHighlightBuckets, | ||
width, | ||
target, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a faithful conversion of the original class component we would have to capture the initial target
in a useState
so it doesn't update after the first render. I'm not sure about the reason anymore, but I think it has something to do with deep links to specific points in time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was confused about that and really didn't see any difference with storing target
in a useState
, that's why I didn't do it here. target
isn't changed in this component.
I'll change it because I don't whether this will have other implications I'm not aware of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I felt the same. Sorry that I can't say for certain. Better safe than sorry, since it's a trivial change.
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@weltenwort isn't there a functional test that covers the log stream? |
🤔 I don't think so, since it's essentially an SVG curve. edit: I mean there are tests for the log stream, but not for the minimap specifically. |
@elasticmachine merge upstream |
AFAIKT this bug breaks the whole page |
Good point. I'm certain I wrote tests that edit the column settings and check whether they apply to the Logs UI at some point. We'll have to check what happened to them. |
This should've caught the problem https://github.com/elastic/kibana/blob/main/x-pack/test/functional/apps/infra/logs/log_stream.ts, if I'm not mistaken. |
The test passed: https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/257579/jobs/01939806-fb3c-4899-bcf6-8e62e8cc9932/log Maybe it's something we need to improve or find out why the test passed |
Indeed, this is curious. Could it be that emotion fails silently when running against the production build and only throws the error in development mode? |
Or maybe it actually works correctly in the production build and only fails in development? The error message indicates a problem with a babel processor, which might be configured differently in the two environments. |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
I'm closing this PR in favor of #204115. Logs stream is being removed in v9.0, and the bug would only affect v9.0 |
fixes #203597
Summary
Fix an error on the Logs Stream UI after replacing
euiStyled
withemotion
How to test