-
Notifications
You must be signed in to change notification settings - Fork 15
feat: rework metric cards to tabs #2580
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?
Conversation
33d70ca
to
e6bb453
Compare
c8570bb
to
ad482b6
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 reworks the metric cards from a traditional card-based interface to a tab-based navigation system for better UX and visual consistency. The changes improve state management, modernize UI components, and enhance the overall user experience with charts and metrics visualization.
- Replaced traditional metric cards with tab-style navigation using TabCard components
- Updated state management to ensure metrics tab always has a valid default value
- Modernized chart components with integrated time frame controls and improved layout
- Removed deprecated components and consolidated utility functions
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/utils/metrics.ts | New utility functions for metric calculations and aggregation |
src/store/reducers/tenant/types.ts | Made metricsTab required instead of optional |
src/store/reducers/tenant/tenant.ts | Added validation for metricsTab with CPU fallback |
src/containers/Tenant/Diagnostics/TenantOverview/TabCard/TabCard.tsx | New tab-style card component with doughnut metrics visualization |
src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.tsx | Complete refactor to use TabCard components with flex layout |
src/containers/Tenant/Diagnostics/TenantOverview/MetricsCards/MetricsCards.scss | Extensive new styling for tab interface with pseudo-elements |
src/components/MetricChart/MetricChart.tsx | Simplified chart component with integrated time frame controls |
src/components/QueriesActivityBar/QueriesActivityBar.tsx | Updated from Disclosure to Card component |
tests/suites/tenant/diagnostics/tabs/info.test.ts | Updated test assertions for new metric structure |
tests/suites/tenant/diagnostics/Diagnostics.ts | Updated page object model for new CSS selectors |
Comments suppressed due to low confidence (1)
src/components/MetricChart/MetricChart.tsx:29
- The variable name and comment reference 'fullWidth' which is no longer a prop in this component. Consider renaming to DEFAULT_CHART_WIDTH or updating the comment to reflect current usage.
const DEFAULT_EFFECTIVE_WIDTH = 600; // Used for maxDataPoints calculation when using fullWidth
const totalUsed = Number(items.reduce((sum, item) => sum + (item.used || 0), 0).toFixed(2)); | ||
const totalLimit = Number(items.reduce((sum, item) => sum + (item.limit || 0), 0).toFixed(2)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
bugbot run |
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!
Was this report helpful? Give feedback by reacting with 👍 or 👎
Closes #2443
Stand
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ⏭️2
⏭️ Skipped Tests (2)
Bundle Size: 🔺
Current: 85.19 MB | Main: 85.18 MB
Diff: +9.81 KB (0.01%)
ℹ️ CI Information