[DASHBOARDS] Rotate ticks on bar and line charts#16528
Merged
bosiraphael merged 27 commits intomainfrom Dec 16, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Contributor
There was a problem hiding this comment.
2 issues found across 95 files
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getTickRotationConfig.ts">
<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getTickRotationConfig.ts:38">
P2: Missing `Math.max(MIN_CALCULATED_LENGTH, ...)` protection in the rotated case. The non-rotated case ensures `calculatedLength` is at least 1, but the rotated case returns the raw calculated value which could be 0 or negative in edge cases.</violation>
</file>
<file name="packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel.ts">
<violation number="1" location="packages/twenty-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel.ts:9">
P1: Missing guard for small `maxLength` values. When `maxLength < ELLIPSIS_LENGTH`, the slice calculation `maxLength - ELLIPSIS_LENGTH` produces a negative number, causing `slice()` to behave unexpectedly (slicing from the end). This can result in output longer than `maxLength`. Consider restoring a guard like the original `maxLength < 4` check, or `maxLength <= ELLIPSIS_LENGTH`.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getTickRotationConfig.ts
Show resolved
Hide resolved
...y-front/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/truncateTickLabel.ts
Show resolved
Hide resolved
Contributor
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:13296 This environment will automatically shut down when the PR is closed or after 5 hours. |
...nt/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartAxisConfigs.ts
Show resolved
Hide resolved
...ont/src/modules/page-layout/widgets/graph/graphWidgetBarChart/utils/getBarChartTickConfig.ts
Show resolved
Hide resolved
ehconitin
reviewed
Dec 16, 2025
packages/twenty-front/src/modules/page-layout/widgets/graph/constants/CommonChartConstants.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/page-layout/widgets/graph/constants/CommonChartConstants.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/page-layout/widgets/graph/constants/CommonChartConstants.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getTickRotationConfig.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/page-layout/widgets/graph/utils/noRotationAngle.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/page-layout/widgets/graph/utils/getTickRotationConfig.ts
Show resolved
Hide resolved
...s/twenty-front/src/modules/page-layout/widgets/graph/utils/computeChartCategoryTickValues.ts
Outdated
Show resolved
Hide resolved
|
Hey @bosiraphael! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
3 steps depending on the widget width. From bigger to tighter space:
Also created common files for all constants for bar and pie charts. Since a lot of them are shared, they can be inherited from a common file.
Video QA
CleanShot.2025-12-12.at.15.47.55.mp4