-
Notifications
You must be signed in to change notification settings - Fork 15
feat(Versions): redesign #2707
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
base: main
Are you sure you want to change the base?
feat(Versions): redesign #2707
Conversation
2add476
to
698a376
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 implements a redesign of the Versions component, improving the user interface and adding new functionality for better version management visualization. The redesign introduces tabbed navigation, better grouping controls, and enhanced visual components.
Key changes:
- Refactored version data types from
VersionValue
toPreparedVersion
with enhanced data structure - Added node type filtering with tabbed navigation (Storage, Database, Other nodes)
- Replaced tree-based UI with expandable block components for better UX
- Enhanced the VersionsBar component with improved sizing and title display options
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
src/utils/versions/types.ts |
Removed deprecated VersionValue interface |
src/utils/versions/parseNodesToVersionsValues.ts |
Refactored functions to use PreparedVersion type and removed value normalization logic |
src/containers/Versions/utils.ts |
Updated hook names and removed total parameter from parsing functions |
src/containers/Versions/types.ts |
Updated interface to use PreparedVersion and added isDatabase flag |
src/containers/Versions/i18n/en.json |
Added new internationalization keys for redesigned interface |
src/containers/Versions/groupNodes.ts |
Updated to use new type and added isDatabase property |
src/containers/Versions/constants.ts |
Added node type constants and titles |
src/containers/Versions/VersionsBlock/ |
New expandable block component replacing tree view |
src/containers/Versions/Versions.tsx |
Major redesign with URL parameter management and tabbed navigation |
src/containers/Versions/Versions.scss |
Updated styles for new layout |
src/containers/Versions/NodesTreeTitle/ |
Enhanced title component with better icons and layout |
src/containers/Versions/GroupedNodesTree/ |
Refactored to use new block component instead of tree view |
src/containers/Cluster/VersionsBar/ |
Removed old VersionsBar implementation |
src/components/VersionsBar/ |
Enhanced VersionsBar with improved sizing and title options |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
bugbot run |
Skipping Bugbot: Unable to authenticate your request. Please make sure Bugbot is properly installed and configured for this repository. |
Claude finished @artemmufazalov's task —— View job Code Review for feat(Versions): redesignI've completed my review of this PR that redesigns the Versions component. Here's my comprehensive feedback: Review Tasks:
✅ Strengths
🔍 Issues Found1. Hardcoded String in Select LabelFile: The Select component has a hardcoded label that should use i18n: label={i18n('group-by')} // Currently: "Group by:" The i18n key exists ( 2. Missing JSDoc DocumentationAs noted by Copilot, several interfaces lack JSDoc documentation:
3. Type Naming ConventionThe types follow the project convention correctly - API types use 'T' prefix (e.g., 📊 Performance Considerations
🔒 Security & Best Practices
💡 Suggestions
ConclusionThis is a well-implemented redesign that follows the project's coding standards and best practices. The main issue is the i18n key naming convention for the "Group by" label. The missing JSDoc comments are minor but would improve code documentation. The redesign improves UX with better visualization through the enhanced VersionsBar, cleaner organization with tabbed navigation, and maintains good performance characteristics. |
bugbot run |
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.
✅ Bugbot reviewed your changes and found no bugs!
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.
Some minor issues, but generally approve
size={size} | ||
/> | ||
))} | ||
<Flex>{renderButton()}</Flex> |
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.
renderButton renders one element - why do we need Flex here?
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.
count?: number; | ||
isDimmed: boolean; | ||
onMouseEnter: () => void; | ||
onMouseLeave: () => void; |
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.
VoidFunction type
|
||
React.useEffect(() => { | ||
toggleBlock(expanded); | ||
setIsOpened(expanded); |
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.
whats the difference between isOpened and expanded here?
Maybe better to pass setExpanded from props and remove local state and useEffect
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.
expanded
here is external state, it is applied to all blocks, it is changed when I click "Expand all" or "Collapse all"
isOpened
- state of the specific block, I change it by clicking on header, state of other blocks is not changed
Closes #2477
Stand: https://nda.ya.ru/t/IElwFcP57HcVvu
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ✨1 ⏭️2 🗑️11
✨ New Tests (1)
⏭️ Skipped Tests (2)
🗑️ Deleted Tests (11)
Bundle Size: 🔺
Current: 85.36 MB | Main: 85.35 MB
Diff: +0.01 MB (0.01%)
ℹ️ CI Information