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

Re-enable pagination for clusters #1660

Merged
merged 2 commits into from
Mar 3, 2025
Merged

Re-enable pagination for clusters #1660

merged 2 commits into from
Mar 3, 2025

Conversation

mikaelGusse
Copy link
Collaborator

Hello!

We noticed in our own usage of Dolos that the clusters are missing pagination. One of us found out that it is simply commented out in the code. She tried commenting it out and didn't notice that anything broke. I also tried it and it seemed ok. Was there some good reason for this page to not be paginated that we missed?

This PR basically just takes out those lines of code that disable pagination and adds a couple of rows to the page.

Feel free to give feedback if there is some issue with this

Thanks!

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @mikaelGusse, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request addresses the missing pagination for clusters in the Dolos web interface. The author noticed that pagination was commented out and, after testing, found no apparent issues in re-enabling it. The changes involve uncommenting the pagination functionality in web/src/components/clustering/ClustersTable.vue and increasing the default items-per-page from 15 to 25.

Highlights

  • Pagination: Re-enables pagination for the clusters table in the web interface.
  • UI Improvement: Increases the default number of items displayed per page in the clusters table from 15 to 25.
  • Code Cleanup: Removes the temporary hack that was hiding the pagination when it was disabled.

Changelog

  • web/src/components/clustering/ClustersTable.vue
    • Uncomments the pagination functionality.
    • Removes the temporary hack to hide pagination when disabled (lines 33-36).
    • Increases the default items-per-page from 15 to 25 (line 7).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Did you know?

The name Vue (pronounced /vjuː/, like view) was chosen because it's short, memorable, and represents the framework's focus on the view layer of an application.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The PR aims to re-enable pagination for clusters in the Dolos web interface. The changes involve uncommenting the pagination functionality and adjusting the default items per page. The provided context and the simplicity of the changes suggest a straightforward review process.

Merge Readiness

The PR appears to be addressing a reported issue with missing pagination. Given the small scope of the changes and the positive feedback from the submitter's own testing, the PR seems reasonable. I am unable to directly approve the pull request, and users should have others review and approve this code before merging. Since there are no CRITICAL or HIGH severity comments, the pull request seems ready to be merged.

@mikaelGusse mikaelGusse requested a review from maartenvn March 3, 2025 10:35
@rien
Copy link
Member

rien commented Mar 3, 2025

Hi @mikaelGusse we disabled this functionality because we didn't expect a lot of clusters so that pagination is needed. But now I notice that instead of having just a single list, it simply hides clusters if there are more than 15.

So this is definitely a good fix, thank you for bringing it up.

@rien
Copy link
Member

rien commented Mar 3, 2025

Upon closer inspection, there seemed to be something else going wrong here.

The clustering table is not meant to have pagination buttons on the overview page, because it should bring the user to the View by clusters page if they want to see more. Thus the conditional check was added to disable it on demand.

Now either we forgot to check the clusters page afterwards, and didn't set a correct value for the pagination prop. I've added this now so that pagination is enabled by default. I've also clarified the behavior in the corresponding comment.

@mikaelGusse I've set the items-per-page back to 15 because 25 items are too much for a 1080p screen (so it shows a scrollbar). What do you think?

@mikaelGusse
Copy link
Collaborator Author

Ok that makes sense, thanks for delving further into this. Yes this newest version is very much OK in my opinion.

@rien rien merged commit 10ba337 into main Mar 3, 2025
26 checks passed
@rien rien deleted the uncomment-pagination-clusters branch March 3, 2025 13:42
@rien rien changed the title Uncomment pagination for clusters Re-enable pagination for clusters Mar 3, 2025
@rien rien added the bug Something isn't working label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants