Skip to content

fix: incorrect group numbers #2319

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

Merged
merged 2 commits into from
May 26, 2025
Merged

fix: incorrect group numbers #2319

merged 2 commits into from
May 26, 2025

Conversation

astandrik
Copy link
Collaborator

@astandrik astandrik commented May 23, 2025

Stand

NodesControlsWithTableState uses tableState of table

In grouped tables we need global total and found instead of table data

Closes #2317

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
318 317 0 1 0

😟 No changes in tests. 😕

Bundle Size: ✅

Current: 83.62 MB | Main: 83.62 MB
Diff: +0.67 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses an issue with incorrect group numbers by updating the control components used in storage and nodes group views. Key changes include:

  • Replacing controls components with simplified versions across StorageNodes, StorageGroups, and Nodes components.
  • Adding new props (entitiesCountCurrent, entitiesCountTotal, entitiesLoading) to pass count and loading state to the controls.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx Updated control component and added count props (both counts set to "found") for storage nodes
src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx Updated control component and added count props (using "found" and "total") for storage groups
src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx Updated control component and added count props (using "found" and "total") for nodes

…esComponent.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@astandrik astandrik requested a review from Copilot May 23, 2025 15:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR replaces the previous *WithTableState controls in grouped tables with the simpler controls components and ensures global totals are shown instead of per-page table counts.

  • Swapped out Storage*ControlsWithTableState and NodesControlsWithTableState for their plain counterparts
  • Passed entitiesCountCurrent, entitiesCountTotal, and entitiesLoading into each controls component
  • Updated imports and component props in three grouped table components

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx Replaced StorageNodesControlsWithTableState with StorageNodesControls and added count/loading props
src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx Replaced StorageGroupsControlsWithTableState with StorageGroupsControls and added count/loading props
src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx Replaced NodesControlsWithTableState with NodesControls, added count/loading props, and unified boolean prop shorthand
Comments suppressed due to low confidence (5)

src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx:167

  • [nitpick] The name entitiesCountCurrent may be ambiguous; consider renaming it to currentEntitiesCount or foundCount for consistency and clarity.
entitiesCountCurrent={found}

src/containers/Storage/PaginatedStorageNodes/GroupedStorageNodesComponent.tsx:19

  • Ensure the StorageNodesControls props interface (or TypeScript definition) is updated to include entitiesCountCurrent, entitiesCountTotal, and entitiesLoading, otherwise this import change will cause type errors.
import {StorageNodesControls} from './StorageNodesControls';

src/containers/Storage/PaginatedStorageGroups/GroupedStorageGroupsComponent.tsx:19

  • Verify that StorageGroupsControls has its props signature updated to accept entitiesCountCurrent, entitiesCountTotal, and entitiesLoading to prevent prop-type or TypeScript errors.
import {StorageGroupsControls} from './StorageGroupsControls';

src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx:16

  • Make sure the NodesControls definition (PropTypes or TS interface) is updated to include entitiesCountCurrent, entitiesCountTotal, and entitiesLoading, matching the new usage in this component.
import {NodesControls} from '../NodesControls/NodesControls';

src/containers/Nodes/PaginatedNodes/GroupedNodesComponent.tsx:182

  • [nitpick] The same three props (entitiesCountCurrent, entitiesCountTotal, entitiesLoading) are being passed through three different components. Consider extracting a shared HOC or helper to reduce repetition and improve maintainability.
withGroupBySelect

@astandrik astandrik added this pull request to the merge queue May 26, 2025
Merged via the queue into main with commit a2e9cce May 26, 2025
7 checks passed
@astandrik astandrik deleted the astandrik.2317 branch May 26, 2025 07:05
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.

fix: incorrect group numbers
2 participants