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

Refactor: Leaderboard Grid #4685

Merged
merged 3 commits into from
Apr 23, 2024
Merged

Refactor: Leaderboard Grid #4685

merged 3 commits into from
Apr 23, 2024

Conversation

briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Apr 22, 2024

This PR removes the use of the VirtualizedGrid component and instead relies on the IntersectionObserver API to lazy load Leaderboard queries.

This was done to reduce code complexity and align the implementation with the lazy loading approach that will be taken with the time series charts.

Additionally, the loading state of the leaderboards has been changed the following:

Screenshot 2024-04-22 at 5 17 58 PM

This is not a requirement of the PR and is open to feedback, but it does solve two related issues:

  1. The scrollbar no longer erratically resizes as data "beneath the fold" is fetched
  2. For most leaderboards, the vertical height of the loading state now more closely matches the loaded state

This is somewhat of a stopgap UI improvement and loading states for the Leaderboards will be further refined once they're converted to HTML tables.

@briangregoryholmes briangregoryholmes self-assigned this Apr 22, 2024
@briangregoryholmes briangregoryholmes marked this pull request as ready for review April 22, 2024 23:04
Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

I like it. The taller loading state also improves loading performance, especially for big Druid-backed dashboards. Currently when a dashboard is opened, we unnecessarily fire toplist queries for bottom-of-the-screen leaderboards that are ultimately pushed off-screen & unmounted when top-of-the-screen leaderboards' data arrives.

@briangregoryholmes briangregoryholmes merged commit d856cef into main Apr 23, 2024
4 checks passed
@briangregoryholmes briangregoryholmes deleted the bgh/leaderboard-grid branch April 23, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants