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

feat: Persistent Page Size UI #21627

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: Persistent Page Size UI #21627

wants to merge 8 commits into from

Conversation

bupd
Copy link
Contributor

@bupd bupd commented Feb 13, 2025

Thank you for contributing to Harbor!

Comprehensive Summary of your change

  • This PR introduces global page size for all pages.
  • Simplifies LocalStorage.
  • Includes changes only on frontend.

Issue being fixed

Fixes #21117

LocalStorage of Browser Before Changes

{
    "ListProjectComponent": { "pageSize": 50 },
    "PendingListComponent": { "pageSize": 15 },
    "ScheduleListComponent": { "pageSize": 25 },
    "WorkerListComponentPool": { "pageSize": 25 },
    "GcHistoryComponent": { "pageSize": 25 },
    "SecurityHubComponent": { "pageSize": 25 },
    "ConfigurationScannerComponent": { "pageSize": 25 },
    "ProjectQuotasComponent": { "pageSize": 25 },
    "LabelComponent": { "pageSize": 15 },
    "DistributionInstancesComponent": { "pageSize": 15 },
    "ListReplicationRuleComponent": {
        "pageSize": 30,
        "columnHiddenArray": [ false, false, false, false, false, false, true, true, false ]
    },
    "SystemEndpointComponent": { "pageSize": 25 },
    "SystemRobotAccountsComponent": { "pageSize": 50 },
    "SystemUserComponent": { "pageSize": 50 },
    "SystemRecentLogComponent": { "pageSize": 50 },
    "RepositoryGridviewComponent": { "pageSize": 50 },
    "ArtifactListTabComponent": {
        "pageSize": 50,
        "columnHiddenArray": [ false, false, false, false, false, false, false, true, false, false, false ]
    },
    "ArtifactTagComponent": { "pageSize": 50 },
    "MemberComponent": { "pageSize": 25 },
    "P2pPolicyComponent": { "pageSize": 10 },
    "ProjectRobotAccountComponent": { "pageSize": 50 },
    "WebhookComponent": { "pageSize": 50 },
    "ProjectAuditLogComponent": { "pageSize": 50 },
    "ArtifactVulnerabilitiesComponent": { "pageSize": 50 },
    "ArtifactSbomComponent": { "pageSize": 50 }
}

LocalStorage of Browser After Changes

{
    "pageSize": 50, // single global page size for all pages
    "columnHiddenMap": {
        "ArtifactListTabComponent": [ false, false, false, false, false, false, true, true, false ],
        "ListReplicationRuleComponent": [ false, false, false, false, false, false, true, true, false ]
    }
}

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/enhancement, area/ui"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

bupd added 4 commits February 13, 2025 05:41
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Signed-off-by: bupd <bupdprasanth@gmail.com>
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.13%. Comparing base (c8c11b4) to head (bf49756).
Report is 390 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21627      +/-   ##
==========================================
+ Coverage   45.36%   46.13%   +0.76%     
==========================================
  Files         244      247       +3     
  Lines       13333    13881     +548     
  Branches     2719     2874     +155     
==========================================
+ Hits         6049     6404     +355     
- Misses       6983     7136     +153     
- Partials      301      341      +40     
Flag Coverage Δ
unittests 46.13% <ø> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 491 files with indirect coverage changes

* update all other pages to have same size factors

Signed-off-by: bupd <bupdprasanth@gmail.com>
@bupd bupd changed the title (WIP) feat: Persistent Page Size feat: Persistent Page Size Feb 13, 2025
@bupd bupd marked this pull request as ready for review February 13, 2025 02:38
@bupd bupd requested a review from a team as a code owner February 13, 2025 02:38
@bupd bupd changed the title feat: Persistent Page Size feat: Persistent Page Size UI Feb 13, 2025
@Vad1mo Vad1mo added release-note/enhancement Label to mark PR to be added under release notes as enhancement area/ui labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui release-note/enhancement Label to mark PR to be added under release notes as enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify Pagination with Persistent User-Selected Page Size
5 participants