-
Couldn't load subscription status.
- Fork 17
fix: make ram and cpu bars fill width of container using flex layout #2741
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
Co-authored-by: astandrik <[email protected]>
…SS conflicts Co-authored-by: astandrik <[email protected]>
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 fixes layout issues with RAM and CPU progress bars in data tables by implementing flexible width support. The bars previously used fixed widths that didn't utilize available column space effectively.
- Replaces fixed width constraints with flexible CSS layout using
flex: 1 - Adds optional
width="full"prop support to MemoryViewer and ProgressViewer components - Updates table column CSS to use flex layout for proper space utilization
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/containers/Node/Threads/CpuUsageBar/CpuUsageBar.scss | Replaces fixed 60px width with flexible layout using flex: 1 |
| src/components/nodesColumns/columns.tsx | Adds width="full" prop to MemoryViewer and ProgressViewer in table columns |
| src/components/nodesColumns/NodesColumns.scss | Adds flex: 1 to RAM and CPU column classes for flexible layout |
| src/components/ProgressViewer/ProgressViewer.tsx | Adds optional width prop and applies it to component styling |
| src/components/ProgressViewer/ProgressViewer.scss | Adds width_full modifier class with 100% width styling |
| src/components/MemoryViewer/MemoryViewer.tsx | Adds optional width prop and applies it to component styling |
| src/components/MemoryViewer/MemoryViewer.scss | Adds width_full modifier class with 100% width styling |
|
bugbot run |
|
Claude finished @astandrik's task —— View job Code Review SummaryI've reviewed your PR that fixes RAM and CPU progress bars to fill available container width. Here are my findings: ✅ Positive Aspects
🔴 Critical Issues1. ProgressViewer Error State Bug (src/components/ProgressViewer/ProgressViewer.tsx:108)The error state doesn't apply the return <div className={`${b({size})} ${className} error`}>no data</div>;Should be: return <div className={b({size, width}, className, 'error')}>no data</div>;2. CSS Conflicts in Table Columns (src/components/nodesColumns/columns.tsx:211, 219, 286)Adding
Recommendation: Remove the 3. I18n Violation (src/components/ProgressViewer/ProgressViewer.tsx:108)The hardcoded text "no data" violates the project's i18n requirements. Should use return <div className={b({size, width}, className, 'error')}>{EMPTY_DATA_PLACEHOLDER}</div>;
|
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.
Bug: ProgressViewer Width Prop Inconsistency
Hey, noticed an inconsistency with the width prop in ProgressViewer. When the component shows "no data" (error state), the width prop isn't included in its root div's class, unlike the normal render path. This means if width='full' is used, the "no data" message won't fill its container as expected, which can affect column layouts.
src/components/ProgressViewer/ProgressViewer.tsx#L107-L108
ydb-embedded-ui/src/components/ProgressViewer/ProgressViewer.tsx
Lines 107 to 108 in ef82c22
| return <div className={`${b({size})} ${className} error`}>no data</div>; |
|
@copilot more issues here Claude finished @astandrik's task —— View job Code Review SummaryI've reviewed your PR that fixes RAM and CPU progress bars to fill available container width. Here are my findings: ✅ Positive Aspects
🔴 Critical Issues1. ProgressViewer Error State Bug (src/components/ProgressViewer/ProgressViewer.tsx:108)The error state doesn't apply the return <div className={`${b({size})} ${className} error`}>no data</div>;Should be: return <div className={b({size, width}, className, 'error')}>no data</div>;2. CSS Conflicts in Table Columns (src/components/nodesColumns/columns.tsx:211, 219, 286)Adding
Recommendation: Remove the 3. I18n Violation (src/components/ProgressViewer/ProgressViewer.tsx:108)The hardcoded text "no data" violates the project's i18n requirements. Should use return <div className={b({size, width}, className, 'error')}>{EMPTY_DATA_PLACEHOLDER}</div>;
|
| return <div className={`${b({size})} ${className} error`}>no data</div>; |
…remove CSS conflicts, and use proper i18n Co-authored-by: astandrik <[email protected]>
Fixed the identified critical issues in commit 7310b9f:
The progress bars now properly fill container width using the existing |
|
@copilot I dont think we use width full anywhere |
…omponents Co-authored-by: astandrik <[email protected]>
You're absolutely correct! I removed the unused |
|
@copilot why you changed width values in src/containers/Node/Threads/CpuUsageBar/CpuUsageBar.scss |
I changed |
yes you should |
…l sizing Co-authored-by: astandrik <[email protected]>
This PR fixes an issue where RAM and CPU progress bars in tables were constrained to small fixed widths instead of utilizing the full available column space.
Problem
As shown in the issue screenshot, memory and CPU usage bars in data tables were rendered with fixed widths (60px for CPU, 150px for memory), leaving significant unused space in wider table columns. This resulted in poor data visualization and inconsistent visual appearance.
Solution
The fix implements full-width support for progress bars by changing the CSS layout approach:
width: 60pxtoflex: 1to fill available spaceflex: 1CSS layout in table columns for proper container width fillingTechnical Changes
CpuUsageBar.scssto use flexible layout instead of fixed width.ydb-nodes-columns__column-ramand.ydb-nodes-columns__column-cpuclasses withflex: 1for proper flex layoutwidthprop fromProgressViewerandMemoryViewercomponents that wasn't being used anywhere in the codebaseBenefits
Fixes #2740.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: ✅
Current: 85.37 MB | Main: 85.37 MB
Diff: +1.10 KB (0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information