fix: Misaligned global controls in Table chart#34799
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes misaligned global controls in the Table chart by restructuring the layout and removing inconsistent sizing properties. The changes improve visual alignment of pagination, search, and time comparison controls.
- Simplified layout structure by removing Bootstrap grid classes and replacing with consistent spacing components
- Removed hardcoded size attributes that caused inconsistent control sizing
- Reorganized the time comparison dropdown positioning within the main control flow
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| TableChart.tsx | Removes size="small" attribute from search input to maintain consistent sizing |
| DataTable.tsx | Restructures global controls layout by removing Bootstrap grid classes and reorganizing component positioning |
| renderTimeComparisonDropdown ? 'col-sm-7' : 'col-sm-8' | ||
| } | ||
| > | ||
| <StyledSpace size="middle"> |
There was a problem hiding this comment.
The conditional rendering structure creates asymmetric layout. When searchInput is falsy, pagination controls won't be rendered at all since they're now nested inside the searchInput condition. Consider restructuring to ensure pagination controls are always available when hasPagination is true, regardless of search input state.
There was a problem hiding this comment.
I've completed my review and didn't find any issues.
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx | ✅ |
| superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
766cb9d to
d513847
Compare
(cherry picked from commit 6908a73)
SUMMARY
Pagination, search and time comparison controls in Table chart were misaligned and had weird spacings.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION