-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add "Load More" button for Metrics table in Runs Overview tab #110
Add "Load More" button for Metrics table in Runs Overview tab #110
Conversation
…lada/fasttrackml-ui-aim into v3.17.5-InfiniteScrollRunsOverview
Implementation looks good! I'm a little confused by the "Load More" button -- maybe place below table? I think it would also be reasonable to just put a note that says "Only showing 500 metrics" and leave it at that. |
I thought about putting it under the table, however in this case users with 1920x1080 screen would be forced to scroll down a bit to see the button. I wanted to set it in the most logical place, next to the other buttons in the Table, however the Here's another solution I found: We can just display the number of loaded metrics and the total number for clarity. This will only show up when the user has over 500 metrics (and will disappear when all metrics are loaded): |
…arch#110) * Add index/count based fetching for useRunMetricsBatch * Add quick fix for alignment config error * Add preliminary infinite scrolling properties * Add Load More button to Card * Fix and clean up useRunMetricsBatch hook * Type annotations and cleanup * Clean up old changes * Fix styling and add dynamic metric count to button * Fix broken test date check
PR for G-Research/fasttrackml#1355.
Note: This was implemented with a "Load More" button instead of infinite scrolling due to how complicated the default
BaseTable
is (the metrics list is implemented using this). It was a lot easier to extend the Card to allow loading more rows on demand.Changelog
useRunMetricsBatch
to allow fetching metrics in groups (default 500) with astartIndex
andcount
Card.tsx
to allow conditionally rendering a "Load More" button if there are more than 500 rowsloadMore
(boolean) andloadMoreHandler
must be suppliedloadMore
is true (therefore button is rendered) only when the number of loaded metric batches is less than the total number of metrics