-
Notifications
You must be signed in to change notification settings - Fork 16
feat(Clusters): rework versions progress bar #2642
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
Conversation
Claude finished @artemmufazalov's task —— View job Code Review for PR #2642: feat(Clusters): rework versions progress barReview Checklist:
Review SummaryOverall, this PR makes good improvements to the versions handling system. The addition of 🚨 Critical Issues1. TypeScript Interface Naming Convention ViolationAccording to the repository guidelines, all API types must be prefixed with 'T'. The new interfaces in
2. Missing i18n Registration CallThe new src/components/VersionsBar/VersionsBar.tsx:22 import i18n from './i18n';
// Missing: registerKeysets() call
// Should be: const i18n = registerKeysets(COMPONENT, {en}); The component imports i18n but doesn't call
|
233c1fe
to
a2d1cd7
Compare
There was a problem hiding this 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 refactors the version progress bar implementation to support major and minor version indices for proper sorting, while creating a new standalone VersionsBar component for the clusters list. The changes prepare the foundation for improved version management across the application.
Key Changes
- Added
majorIndex
andminorIndex
fields to version data structures for better sorting control - Refactored version-related utilities to use a new
VersionsDataMap
structure instead of simple color mappings - Created a new standalone
VersionsBar
component with enhanced UI features including truncation and hover effects
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/utils/versions/types.ts | New types file defining version data structures with index support |
src/utils/versions/sortVersions.ts | New sorting utility that handles version ordering by major/minor indices |
src/utils/versions/clusterVersionColors.ts | New utility for cluster-specific version color processing |
src/utils/versions/parseNodesToVersionsValues.ts | Updated to use new VersionsDataMap structure |
src/utils/versions/getVersionsColors.ts | Refactored to support version indices and new data structure |
src/components/VersionsBar/VersionsBar.tsx | New component with enhanced UI features for displaying version bars |
src/containers/Clusters/columns.tsx | Updated to use new VersionsBar component |
src/containers/Versions/*.tsx | Updated to use new versionsDataMap structure |
Comments suppressed due to low confidence (3)
src/utils/versions/clusterVersionColors.ts:13
- [nitpick] The constant name 'UNDEFINED_COLOR_INDEX' could be more descriptive. Consider renaming to 'NO_COLOR_INDEX_KEY' or 'UNDEFINED_COLOR_KEY' to better indicate it's a string key used when no color index is provided.
const UNDEFINED_COLOR_INDEX = '__no_color__';
src/containers/Versions/groupNodes.test.ts:71
- The test function is flagged for complexity but still runs. Consider breaking this test into smaller, more focused test cases to improve readability and maintainability.
// eslint-disable-next-line complexity
src/containers/Versions/groupNodes.test.ts:108
- The test function is flagged for complexity but still runs. Consider breaking this test into smaller, more focused test cases to improve readability and maintainability.
// eslint-disable-next-line complexity
> | ||
<span | ||
onMouseEnter={() => { | ||
setHoveredVersion(item.version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add a small debounce for setHoveredVersion(item.version)
. For now it blinks when I move the mouse across the screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 200 ms debounce to setHoveredVersion, increased debounce for tooltip so they are the same
}; | ||
|
||
const renderButton = () => { | ||
if (shouldTruncateVersions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may reduce nesting with
if (!shouldTruncateVersions) {
return null
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
4eae270
to
80b6eb5
Compare
80b6eb5
to
09c80c5
Compare
/claude_review |
Closes #2496
Stand: https://nda.ya.ru/t/74h1yKcy7H5Yhu - it has hardcoded backend response just to show how it works
majorIndex
andminorIndex
to versions data to ensure proper sortingVersions
tab yet)VersionsBar
component (oldVersionsBar
insideVersions
tab will be replaced next)Versions
tab will be modified in this issue: #2477CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: 🔺
Current: 85.36 MB | Main: 85.35 MB
Diff: +0.02 MB (0.02%)
ℹ️ CI Information