-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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 UI] Fix initial accuracy of logs minimap click #48826
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
💚 Build Succeeded |
Okay so there's a second problem here: clicking on the minimap is also not sending a new timestamp to the request to fetch new logs, it's still using whatever the current Not sure where this regression occurred but I'll keep digging. |
The issue was stemming from the I made a change to cut down on reports unrelated to scroll events, and that seems to have fixed it. Although it looks to me as if the scrolling requests aren't working. Both before and after my change, I tried scrolling to the edge of the logs and the Anyway @afgomez as for this being a partial fix; the other part of the issue is a UX issue that would be more complicated to implement, and also has some unanswered questions around it. I just left a comment on the issue explaining further. |
Cool. Thanks for taking a look 👍 |
💚 Build Succeeded |
@afgomez Any chance I can get a 👍 on this for review? |
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.
Tested locally and it works 👍
* [Logs UI] Fix initial accuracy of logs minimap click * Fix aberrant request to loadEntriesAfter when using minimap
* [Logs UI] Fix initial accuracy of logs minimap click * Fix aberrant request to loadEntriesAfter when using minimap
Summary
Partial fix for #48614
Fixes the way the log minimap processes clicks. It was previously using a state value to calculate the
top
of the minimap element, but this state value only gets updated when the user drags the minimap. Therefore, it would return an inaccurate value and jump the user to the wrong time if the user clicked on the minimap before they dragged.Now, the click handler will get the current DOM
top
of the minimap element rather than trying to pull it from state.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] Unit or functional tests were updated or added to match the most common scenarios[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers