update chart selection logic and conditionally render display name fi…#346
update chart selection logic and conditionally render display name fi…#346NaveenCode wants to merge 4 commits into
Conversation
…eld for number chart
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
WalkthroughChart selection now preselects the initiating chart and provides row-level controls. The metric accordion hides display names for number charts with test coverage. Dashboard lock indicators are removed while lock-token handling remains. ChangesChart Selection Behavior
Display-Name Field Visibility
Dashboard Lock Indicators
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
app/charts/page.tsx (1)
801-802: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueLeverage the
TableRowselected state for better visual feedback.Consider passing
data-stateto<TableRow>so that it automatically applies the built-in selection background color (data-[state=selected]:bg-muted) defined in yourcomponents/ui/table.tsx.🎨 Proposed refactor
- <TableRow key={chart.id} className="hover:bg-gray-50"> + <TableRow + key={chart.id} + className="hover:bg-gray-50" + data-state={isChartSelected ? 'selected' : undefined} + >🤖 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 `@app/charts/page.tsx` around lines 801 - 802, Update the TableRow rendered in the chart row mapping to pass its selected state through the data-state attribute, using the row’s existing selection value so the table’s built-in data-[state=selected]:bg-muted styling applies.
🤖 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.
Inline comments:
In `@app/charts/page.tsx`:
- Around line 806-813: Add an aria-label to the Checkbox rendered in the
isSelectionMode branch, using the current chart identity so screen readers
announce which chart the control selects. Preserve the existing checked state,
test identifier, and toggleChartSelection behavior.
---
Nitpick comments:
In `@app/charts/page.tsx`:
- Around line 801-802: Update the TableRow rendered in the chart row mapping to
pass its selected state through the data-state attribute, using the row’s
existing selection value so the table’s built-in data-[state=selected]:bg-muted
styling applies.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7b15d7f7-cd0c-4ea9-9220-07329e111553
📒 Files selected for processing (3)
app/charts/page.tsxcomponents/charts/MetricAccordionItem.tsxcomponents/charts/__tests__/MetricAccordionItem.test.tsx
update chart selection logic and conditionally render display name field for number chart
Summary by CodeRabbit
New Features
numberchart types (shown for other types).Bug Fixes
Tests
Refactor