-
Notifications
You must be signed in to change notification settings - Fork 117
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/DimensionTable queries #5942
Conversation
web-common/src/features/dashboards/leaderboard/Leaderboard.svelte
Outdated
Show resolved
Hide resolved
web-common/src/features/dashboards/leaderboard/Leaderboard.svelte
Outdated
Show resolved
Hide resolved
Is this one ready for review again? IMO this is an important one to get in the next release |
web-common/src/features/dashboards/leaderboard/Leaderboard.svelte
Outdated
Show resolved
Hide resolved
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.
Seeing some weird behaviour still,
- Selecting below fold values, refreshing, expanding the dimension and coming back removes the values.
https://www.loom.com/share/41ba9ec4e6b84956859aabcc4d4b5ca1?sid=267e6432-8c69-49eb-bc76-2b94aa3a343d - I feel like there is some reactivity missing somewhere. Values do not update when I select filters for other dimensions. Also when values go above the fold they are duplicated.
https://www.loom.com/share/d1d8311b050145089c3a9592598b339d?sid=089fc062-7494-4f5d-b421-c1bd15c983e8
I've decided to just make this PR the full refactor. These changes have resolved your two notes, but I recommend taking another look now that the scope has changed. |
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.
Looks good! One thing that is different from production is that below the fold values that get filtered out are not shown anymore. Not sure what the UX would be for those.
@@ -1,181 +1,17 @@ | |||
import { mergeMeasureFilters } from "@rilldata/web-common/features/dashboards/filters/measure-filters/measure-filter-utils"; |
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.
Nice seeing this massive removal! This was needed when we had different APIs used. Now with a single AggregationRequest I was thinking of writing up a wrapper around it using builder pattern. Might decrease the code a lot more.
Added a catch for that situation. Those values are now displayed below the fold with no data. |
let selectedBelowTheFold: LeaderboardItemData[] = []; | ||
let showExpandTable = false; | ||
let noAvailableValues = true; | ||
$: console.log(sortedData?.data); |
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.
Leftover console
This PR refactors the way queries are handled within the
Leaderboard
andDimensionTable
components. Namely, the reliance on externally derived readables that are accessible only within the StateManger context has been removed. Instead, they accept state-agnostic props and it is the responsibility of the parent component to pass them down accordingly. The logic for building out the queries/options objects is now collocated with the relevant component. In the future,Leaderboard
andDimensionTable
will be consolidated into a single component (along withLeaderboardDisplay
andDimensionTableDisplay
).As part of this work, the
Leaderboard
now properly displays data for items "below the fold", as seen below.Closes #5753