You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "tushardhawas (via GitHub)" <gi...@apache.org> on 2026/04/06 12:30:07 UTC
[PR] fix(gantt): prevent y-axis labels from being cut off [superset]
tushardhawas opened a new pull request, #39137:
URL: https://github.com/apache/superset/pull/39137
### SUMMARY
Fixes an issue where long y-axis labels in the Gantt chart were clipped and not fully visible.
The fix dynamically calculates the left grid padding based on the widest category label width, ensuring labels are not cut off regardless of length.
### TESTING INSTRUCTIONS
1. Open a Gantt chart with long category labels.
2. Verify that y-axis labels are fully visible and not clipped.
3. Confirm no layout regressions occur on other charts.
### ADDITIONAL INFORMATION
- No database migration required.
- Fixes existing UI behavior.
- Closes issue #<insert-issue-number-if-any> (if applicable).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-5623103586
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 9a54194d42547bf51ea4fd9545af0d25065b9e84 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6aa2ee312127bb00090901c6 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-39137--superset-docs-preview.netlify.app](https://deploy-preview-39137--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#q1YqKMrPLShRslJS0lFKKkrMS84AstMyK3TTE_NKSnRzEpNSc3STS0vy09KAKlJSC3LyKz1TgGrMEhONUlONDY0MjcyTkgwMDCyB0DDZTKkWAA) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-39137--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-4202635878
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/39137?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `89.28571%` with `3 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 64.52%. Comparing base ([`d796543`](https://app.codecov.io/gh/apache/superset/commit/d796543f5a0c5f6306f3140d48647640b7a28a14?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c55a3e4`](https://app.codecov.io/gh/apache/superset/commit/c55a3e4335119074eaa0e590d0b01702d97579cf?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 23 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/39137?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...s/plugin-chart-echarts/src/Gantt/transformProps.ts](https://app.codecov.io/gh/apache/superset/pull/39137?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-echarts%2Fsrc%2FGantt%2FtransformProps.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvR2FudHQvdHJhbnNmb3JtUHJvcHMudHM=) | 89.28% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/39137?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #39137 +/- ##
=======================================
Coverage 64.52% 64.52%
=======================================
Files 2536 2536
Lines 131208 131222 +14
Branches 30457 30463 +6
=======================================
+ Hits 84661 84673 +12
- Misses 45084 45086 +2
Partials 1463 1463
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/39137/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/39137/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.07% <89.28%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/39137?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-4192575504
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-5647678426
Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #39137:
URL: https://github.com/apache/superset/pull/39137#discussion_r3039462115
##########
superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts:
##########
@@ -205,23 +205,49 @@ export default function transformProps(chartProps: EchartsGanttChartProps) {
seriesCount += map.size;
});
- const borderLines: { yAxis: number }[] = [];
- const categoryLines: { yAxis: number; name?: string }[] = [];
- let sum = 0;
- let prevSum = 0;
- Array.from(seriesInCategoriesMap.entries()).forEach(([key, map]) => {
- sum += map.size;
- categoryLines.push({
- yAxis: seriesCount - (sum + prevSum) / 2,
- name: key ? String(key) : undefined,
- });
- borderLines.push({ yAxis: seriesCount - sum });
- prevSum = sum;
+const borderLines: { yAxis: number }[] = [];
+const categoryLines: { yAxis: number; name?: string }[] = [];
+let sum = 0;
+let prevSum = 0;
+let maxCategoryLabelWidth = 0;
+
+let measureContext: CanvasRenderingContext2D | null = null;
+if (typeof document !== 'undefined') {
+ const canvas = document.createElement('canvas');
+ measureContext = canvas.getContext('2d');
+ if (measureContext) {
+ measureContext.font = `${theme.fontSizeSM}px ${theme.fontFamily}`;
+ }
+}
+
+Array.from(seriesInCategoriesMap.entries()).forEach(([key, map]) => {
+ sum += map.size;
+
+ const name = key ? String(key) : undefined;
+
+ categoryLines.push({
+ yAxis: seriesCount - (sum + prevSum) / 2,
+ name,
});
- const xAxisFormatter = getXAxisFormatter(xAxisTimeFormat);
- const tooltipTimeFormatter = getTooltipTimeFormatter(tooltipTimeFormat);
- const tooltipValuesFormatter = getNumberFormatter(tooltipValuesFormat);
+ if (name) {
+ const labelWidth = measureContext
+ ? measureContext.measureText(name).width
+ : name.length * theme.fontSizeSM * 0.62;
+
+ maxCategoryLabelWidth = Math.max(maxCategoryLabelWidth, labelWidth);
+ }
+
+ borderLines.push({ yAxis: seriesCount - sum });
+
+ prevSum = sum;
+});
+
+const safeLabelWidth = Math.min(maxCategoryLabelWidth, 200);
Review Comment:
**Suggestion:** The fixed `200px` clamp still cuts off labels longer than that width, which means long category names can remain clipped. Use the measured width directly instead of an arbitrary hard cap. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Very long Gantt category labels still render partially clipped.
- ⚠️ Users cannot read full labels in extreme cases.
- ⚠️ Chart layout contradicts PR goal of no clipping.
```
</details>
```suggestion
const safeLabelWidth = maxCategoryLabelWidth;
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. The Gantt chart plugin `EchartsGanttChartPlugin` in
`superset-frontend/plugins/plugin-chart-echarts/src/Gantt/index.ts:3-31` uses
`transformProps` to build ECharts options whenever a Gantt chart (`viz_type:
'gantt_chart'` from `src/Gantt/types.ts:35-42`) is rendered in the Superset UI via
`MainPreset` at `superset-frontend/src/visualizations/presets/MainPreset.ts:123-126`.
2. Provide query data for a Gantt chart where the Y-axis category values
(`datum[yAxisLabel]` assigned to `category` at `transformProps.ts:171-172`) include at
least one very long string label whose measured width in `theme.fontSizeSM` exceeds 200px
(e.g., a verbose task description), so that `seriesInCategoriesMap` contains that long
key.
3. When `transformProps` runs, it iterates `seriesInCategoriesMap` at
`transformProps.ts:223-244`, computing `name` from the category key and measuring label
width via `measureContext.measureText(name).width` in lines 233-236, accumulating the
maximum in `maxCategoryLabelWidth`; for the overlong label, `maxCategoryLabelWidth`
becomes greater than 200.
4. At `transformProps.ts:246`, `const safeLabelWidth = Math.min(maxCategoryLabelWidth,
200);` clamps this width, and later the grid configuration at `transformProps.ts:53-57`
sets `grid.left` to `(padding.left || 0) + safeLabelWidth + 10`, so only 200px of
horizontal padding is reserved even when the measured label width is larger, leaving the
excess text to extend beyond the left grid boundary and replicating label clipping for
extremely long category labels.
```
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts
**Line:** 246:246
**Comment:**
*Logic Error: The fixed `200px` clamp still cuts off labels longer than that width, which means long category names can remain clipped. Use the measured width directly instead of an arbitrary hard cap.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39137&comment_hash=42f9d0c72ee133a3be96aa7562685a82a6ad43d47d29fddb94521d7a8d6b2b44&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39137&comment_hash=42f9d0c72ee133a3be96aa7562685a82a6ad43d47d29fddb94521d7a8d6b2b44&reaction=dislike'>👎</a>
##########
superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts:
##########
@@ -205,23 +205,49 @@ export default function transformProps(chartProps: EchartsGanttChartProps) {
seriesCount += map.size;
});
- const borderLines: { yAxis: number }[] = [];
- const categoryLines: { yAxis: number; name?: string }[] = [];
- let sum = 0;
- let prevSum = 0;
- Array.from(seriesInCategoriesMap.entries()).forEach(([key, map]) => {
- sum += map.size;
- categoryLines.push({
- yAxis: seriesCount - (sum + prevSum) / 2,
- name: key ? String(key) : undefined,
- });
- borderLines.push({ yAxis: seriesCount - sum });
- prevSum = sum;
+const borderLines: { yAxis: number }[] = [];
+const categoryLines: { yAxis: number; name?: string }[] = [];
+let sum = 0;
+let prevSum = 0;
+let maxCategoryLabelWidth = 0;
+
+let measureContext: CanvasRenderingContext2D | null = null;
+if (typeof document !== 'undefined') {
+ const canvas = document.createElement('canvas');
+ measureContext = canvas.getContext('2d');
+ if (measureContext) {
+ measureContext.font = `${theme.fontSizeSM}px ${theme.fontFamily}`;
+ }
+}
+
+Array.from(seriesInCategoriesMap.entries()).forEach(([key, map]) => {
+ sum += map.size;
+
+ const name = key ? String(key) : undefined;
Review Comment:
**Suggestion:** Falsy category values are treated as missing labels. Using a truthy check drops valid labels like `0` or `false`, so those y-axis entries render without text and their widths are not included in padding calculation. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Gantt categories with value 0/false lose labels.
- ⚠️ Left padding miscomputed when only falsy categories.
- ⚠️ Y-axis readability reduced for such Gantt charts.
```
</details>
```suggestion
const name = key === null || key === undefined ? undefined : String(key);
```
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. In the Superset frontend, the Gantt chart plugin `EchartsGanttChartPlugin` is
registered in `superset-frontend/src/visualizations/presets/MainPreset.ts:123-126`, where
it is configured with key `VizType.Gantt = 'gantt_chart'` from
`packages/superset-ui-core/src/chart/types/VizType.ts:34`.
2. This plugin uses `transformProps` from
`superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts` via
`superset-frontend/plugins/plugin-chart-echarts/src/Gantt/index.ts:3-31`, so every time a
Gantt chart is rendered in the UI, `transformProps(chartProps: EchartsGanttChartProps)` at
line 111 is called with query data.
3. Configure a Gantt chart whose Y-axis dimension column contains falsy but valid category
values (for example, `0` and `1`), so that in `transformProps.ts:171-190` the `category`
computed as `datum[yAxisLabel]` becomes `0` for some rows and these values populate
`seriesInCategoriesMap`.
4. When `seriesInCategoriesMap` is processed at `transformProps.ts:223-244`, the loop
executes `const name = key ? String(key) : undefined;` at line 226; for a category value
`key = 0` or `false`, `name` becomes `undefined`, resulting in `categoryLines` entries
with `name: undefined` and in the width measurement block at lines 233-239 these labels
are skipped, so the corresponding y-axis labels are missing from the final `markLine.data`
(lines 347-364) and their widths are not included in `maxCategoryLabelWidth`.
```
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.ts
**Line:** 226:226
**Comment:**
*Logic Error: Falsy category values are treated as missing labels. Using a truthy check drops valid labels like `0` or `false`, so those y-axis entries render without text and their widths are not included in padding calculation.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39137&comment_hash=f3a2481e7679e707355559884b5437b1363201e9d862198d5dbe6d17eafd3956&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39137&comment_hash=f3a2481e7679e707355559884b5437b1363201e9d862198d5dbe6d17eafd3956&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-4192251887
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "tushardhawas (via GitHub)" <gi...@apache.org>.
tushardhawas commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-5623401656
Thanks @rusackas @justinpark @michael-s-molina ! Cleaned this up and updated the branch:
- Fixed the indentation — the borderLines/categoryLines block was dedented to column 0; it's now back at the correct 2-space indent.
- Reverted the accidental legend-block reformat so the diff only shows the intended change.
- Dropped the redundant safeLabelWidth; grid.left now uses maxCategoryLabelWidth directly.
- Added a comment explaining the 0.62 fallback constant (approximate label width used when canvas measurement isn't available, e.g. SSR).
- Merged latest master in — branch is now up to date with no conflicts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-5628739596
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #39137:
URL: https://github.com/apache/superset/pull/39137
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-4773365895
@tushardhawas the approach is right, but the formatting got mangled. The `borderLines`/`categoryLines` block is dedented to column 0 and would never pass prettier. Run `pre-commit` to fix it, and double-check `safeLabelWidth` actually feeds the grid padding. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-4436937887
AI assisted review points below... I think most of this is minor polish, but I'd agree with at least addressing the safeLabelWidth naming redundancy and consider adding a comment explaining the 0.62 constant added.
1) Canvas created but never cleaned up. A new <canvas> element is created every time transformProps is called, but it's never appended to the DOM and there's no explicit cleanup. In modern browsers this is generally fine since it'll be GC'd, but it's slightly wasteful — a module-level singleton canvas could be reused.
2) Font matching may not be exact. The font is set to ${theme.fontSizeSM}px ${theme.fontFamily}, but ECharts internally may render labels slightly differently (e.g., accounting for DPR, letter spacing, or font weight). The measured width should be close enough in practice, but labels with tight padding could still get slightly clipped on some systems.
3) safeLabelWidth is just maxCategoryLabelWidth renamed. The variable safeLabelWidth is assigned directly from maxCategoryLabelWidth with no further transformation, which adds no value and slightly obscures the intent. This could be a leftover from a refactor.
4) No padding budget / cap. If a label is extremely long (e.g., 500px), the left grid will just grow unboundedly. A reasonable max width or truncation strategy might be worth considering — though that might be a separate issue.
Partial test coverage. Codecov flags 3 uncovered lines. Given the typeof document !== 'undefined' branch, it would be good to ensure the SSR/fallback path is tested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-5623418426
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | da5fd1c0d70472ac73a135cf906330b3df51e59e |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6aa2f4ab5f701300087bf151 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-39137--superset-docs-preview.netlify.app](https://deploy-preview-39137--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#q1YqKMrPLShRslJS0lFKKkrMS84AstMyK3TTE_NKSnRzEpNSc3STS0vy09KAKlJSC3LyKz1TgGrMEhON0kwSk0zTzA0MjQ0MDCzMk9IMTQ2VagE) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-39137--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(gantt): prevent y-axis labels from being cut off [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #39137:
URL: https://github.com/apache/superset/pull/39137#issuecomment-5593815777
`safeLabelWidth` does feed the grid, it sets `grid.left` so the y-axis labels don't get clipped, which is the whole point here. Formatting's the separate blocker though, that block's dedented to column zero and never got run through prettier. I'll get a cleanup pass pushed so this is easier to merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org