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

Fix ModelRunList styles and pagination #502

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

floryst
Copy link
Contributor

@floryst floryst commented Sep 11, 2024

  • The pagination wasn't working properly, as limit was being sent rather than page and the server is using PageNumberPagination. This meant that triggering pagination would result in the same model run list being sent for each request.
  • The styles for the model run list caused it to slightly overflow the bottom of the sidebar, resulting in some cut-off. This becomes more evident if elements are added to the top of the sidebar. Flexbox + overflow handling fixes this issue.

These are issues I discovered as I was moving the loadModelRuns function out of the ModelRunList component and into the store. I'll be looking to add cleaner pagination handling when I do so.

The list_model_runs endpoint uses PageNumberPagination, not
LimitOffsetPagination.
@floryst
Copy link
Contributor Author

floryst commented Sep 11, 2024

The failing test (test_list_model_run_rest_list) is failing because we are now returning a page size of 10 instead of the default 100. Do we want GET /model-runs/ to return a page size of 10 or 100 (or another value)? I kept with 10 because that's what the ModelRunList.vue component wanted with const limit = 10.

The easiest solution is to only bulk create 10 items in the test rather than 20.

Copy link
Member

@mvandenburgh mvandenburgh left a comment

Choose a reason for hiding this comment

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

LGTM

@floryst floryst merged commit aeb9e27 into main Sep 12, 2024
8 checks passed
@floryst floryst deleted the fix-modelrunlist-styles-and-pagination branch September 12, 2024 20:19
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