fix: truncate long Y-axis labels with ellipsis and tooltip in dimension rankings chart - #3950
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR refines the dimension rankings chart display by reducing left margin from 4 to 0 and replacing the YAxis tick renderer with a custom implementation that truncates category labels to 14 characters with ellipsis, includes full labels via SVG title tooltips, and reduces the YAxis width from 110 to 92. ChangesChart Display Improvements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Confidence Score: 5/5Safe to merge — the change is a self-contained UI layout fix with no impact on data fetching, routing, or shared components. The change is narrow: a custom SVG tick renderer replaces a static prop on a single chart axis, plus two numeric constant tweaks. The data path is unchanged, no data-testid attributes are touched, and the existing ChartErrorBoundary already provides a fallback if the renderer throws. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix: Chart legend label width in dashboa..." | Re-trigger Greptile |
4318c76 to
2eb2615
Compare
Merge activity
|
…on rankings chart (#3950) ## Summary Y-axis labels in the dimension rankings bar chart were taking up too much horizontal space and could overflow without truncation. This PR truncates long dimension names in the chart's Y-axis labels and adds a tooltip `<title>` element so users can still see the full name on hover. ## Changes - Y-axis labels longer than 14 characters are now truncated with an ellipsis (`…`), with the full value exposed via an SVG `<title>` for accessibility and hover visibility - Y-axis width reduced from `110` to `92` to match the shorter label space - Left margin reduced from `4` to `0` to reclaim horizontal space ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the workspace dashboard and open the Dimension Rankings tab. Find a dimension with a long name (more than 14 characters) and verify: 1. The label is truncated with an ellipsis in the chart 2. Hovering over the label shows the full name via the browser's native tooltip ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` ## Screenshots/Recordings Add before/after screenshots showing the truncated Y-axis labels vs. the previous full-length labels. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** - Improved dimension ranking chart layout with optimized spacing - Long category labels now display with ellipsis truncation for better readability, with full text visible on hover <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…on rankings chart (#3950) ## Summary Y-axis labels in the dimension rankings bar chart were taking up too much horizontal space and could overflow without truncation. This PR truncates long dimension names in the chart's Y-axis labels and adds a tooltip `<title>` element so users can still see the full name on hover. ## Changes - Y-axis labels longer than 14 characters are now truncated with an ellipsis (`…`), with the full value exposed via an SVG `<title>` for accessibility and hover visibility - Y-axis width reduced from `110` to `92` to match the shorter label space - Left margin reduced from `4` to `0` to reclaim horizontal space ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the workspace dashboard and open the Dimension Rankings tab. Find a dimension with a long name (more than 14 characters) and verify: 1. The label is truncated with an ellipsis in the chart 2. Hovering over the label shows the full name via the browser's native tooltip ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` ## Screenshots/Recordings Add before/after screenshots showing the truncated Y-axis labels vs. the previous full-length labels. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** - Improved dimension ranking chart layout with optimized spacing - Long category labels now display with ellipsis truncation for better readability, with full text visible on hover <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…on rankings chart (#3950) ## Summary Y-axis labels in the dimension rankings bar chart were taking up too much horizontal space and could overflow without truncation. This PR truncates long dimension names in the chart's Y-axis labels and adds a tooltip `<title>` element so users can still see the full name on hover. ## Changes - Y-axis labels longer than 14 characters are now truncated with an ellipsis (`…`), with the full value exposed via an SVG `<title>` for accessibility and hover visibility - Y-axis width reduced from `110` to `92` to match the shorter label space - Left margin reduced from `4` to `0` to reclaim horizontal space ## Type of change - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test Navigate to the workspace dashboard and open the Dimension Rankings tab. Find a dimension with a long name (more than 14 characters) and verify: 1. The label is truncated with an ellipsis in the chart 2. Hovering over the label shows the full name via the browser's native tooltip ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` ## Screenshots/Recordings Add before/after screenshots showing the truncated Y-axis labels vs. the previous full-length labels. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** - Improved dimension ranking chart layout with optimized spacing - Long category labels now display with ellipsis truncation for better readability, with full text visible on hover <!-- end of auto-generated comment: release notes by coderabbit.ai -->

Summary
Y-axis labels in the dimension rankings bar chart were taking up too much horizontal space and could overflow without truncation. This PR truncates long dimension names in the chart's Y-axis labels and adds a tooltip
<title>element so users can still see the full name on hover.Changes
…), with the full value exposed via an SVG<title>for accessibility and hover visibility110to92to match the shorter label space4to0to reclaim horizontal spaceType of change
Affected areas
How to test
Navigate to the workspace dashboard and open the Dimension Rankings tab. Find a dimension with a long name (more than 14 characters) and verify:
Screenshots/Recordings
Add before/after screenshots showing the truncated Y-axis labels vs. the previous full-length labels.
Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelinesSummary by CodeRabbit