fix(ui): center labels inside stacked bars#243
Conversation
Signed-off-by: Aysajan Eziz <[email protected]>
📝 WalkthroughWalkthroughChangesStacked bar labels
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant useBarChartOptions
participant createLabelConfig
participant BarSeriesOptions
useBarChartOptions->>createLabelConfig: pass showLabels, styling, orientation, useStack
createLabelConfig->>BarSeriesOptions: return label position
BarSeriesOptions->>BarSeriesOptions: render stacked labels inside or non-stacked labels at top/right
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a276e79537
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ui/src/composables/charts/shared/chartConfig.ts (1)
843-851: 📐 Maintainability & Code Quality | 🔵 TrivialRun
task build:uiafter UI changes.As per path instructions, after a fresh clone or any
ui/change, remember to runtask build:uibefore Go tests or CLI builds to ensure your changes are correctly integrated.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ui/src/composables/charts/shared/chartConfig.ts` around lines 843 - 851, After updating the chart configuration around the label-position logic, run task build:ui before running Go tests or CLI builds, as required for any ui/ change.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@ui/src/composables/charts/shared/chartConfig.ts`:
- Around line 843-851: After updating the chart configuration around the
label-position logic, run task build:ui before running Go tests or CLI builds,
as required for any ui/ change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7d6df8e9-0cff-4344-aab7-d2829d4f8637
📒 Files selected for processing (3)
ui/src/composables/charts/shared/chartConfig.tsui/src/composables/charts/useBarChartOptions.test.tsui/src/composables/charts/useBarChartOptions.ts
Signed-off-by: Aysajan Eziz <[email protected]>
fahimfaisaal
left a comment
There was a problem hiding this comment.
Thanks for the PR, LGTM so far
Summary
topandrightpositions for non-stacked vertical and horizontal barsChecks
mkdir -p /tmp/vite-temp && /workspace/node_modules/.bin/vitest run --root ui --no-color src/composables/charts/useBarChartOptions.test.ts— public PR head failed the amended contrast regression; corrected commit passed in the clean network-off verifierpnpm test— 32 files and 487 UI tests passedpnpm typecheck,pnpm format:check, andEMBED_UI=True pnpm build— passedFixes #209
AI assistance was used. This change was reviewed by Northset, and I accept responsibility for this submission.
Verification
Northset proof-of-pass receipt M-1027
This record covers Northset’s own contribution; it is not maintainer verification.
Maintainers can request a separate, private run for a PR already in their queue at [email protected].
For repositories already onboarded with Northset, adding
northset-verifyto a PR requests a run on that PR.Summary by CodeRabbit
New Features
Bug Fixes