Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThis PR adjusts CSS class names controlling spacing, padding, and absolute positioning within the DataTableFilterCheckbox component, affecting the option row wrapper, label, expand/collapse control, "only" button, and nested option connector indicators. ChangesFilter Checkbox Styling
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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.
🧹 Nitpick comments (2)
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx (2)
123-137: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFixed
top-2offset for expand/collapse button is fragile to content-height changes.The button is hardcoded at
top-2to align with the label's newpy-2. If the customComponentrenders taller/multi-line content, or padding is retuned again, this offset will need manual re-adjustment. Vertical centering via transform would be robust regardless of label height.♻️ Proposed fix
className={cn( 'flex h-4 w-4 shrink-0 items-center justify-center rounded-sm text-foreground-lighter', 'hover:bg-selection hover:text-foreground', - 'absolute top-2 right-10' + 'absolute top-1/2 -translate-y-1/2 right-10' )}🤖 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 `@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx` around lines 123 - 137, The expand/collapse control in DataTableFilterCheckbox is positioned with a fixed top offset, which makes it fragile when the option content height changes. Update the button positioning in the checkbox option rendering so the icon is vertically centered relative to the row content instead of relying on a hardcoded offset, keeping the logic in DataTableFilterCheckbox and the hasNested / isExpanded button block intact.
172-183: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUnreachable condition in nested connector geometry.
option.options?.length === 1inside theelsebranch (line 180) can never be true: a single-item array always hasnestedIndex === 0, which already resolves via the outer ternary'snestedIndex === 0branch (line 176-177). Thiselsepath only executes whennestedIndex !== 0, meaning length is always > 1. The condition is effectively dead code and can be simplified toh-1/2unconditionally.♻️ Proposed simplification
className={cn( 'absolute left-[0.95rem] w-3 rounded-bl-sm border-b border-l border-border', nestedIndex === 0 ? 'top-[-8px] h-[calc(60%+8px)]' - : cn( - 'top-0', - option.options?.length === 1 ? 'h-[60%]' : 'h-1/2' - ) + : 'top-0 h-1/2' )}🤖 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 `@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx` around lines 172 - 183, The nested connector sizing logic in DataTableFilterCheckbox is redundant because the option.options?.length === 1 check inside the non-first nested branch can never be true. Simplify the geometry logic in the isLastNested span by removing that dead condition and using the half-height class unconditionally in the nestedIndex !== 0 path, keeping the outer nestedIndex === 0 branch intact.
🤖 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
`@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx`:
- Around line 123-137: The expand/collapse control in DataTableFilterCheckbox is
positioned with a fixed top offset, which makes it fragile when the option
content height changes. Update the button positioning in the checkbox option
rendering so the icon is vertically centered relative to the row content instead
of relying on a hardcoded offset, keeping the logic in DataTableFilterCheckbox
and the hasNested / isExpanded button block intact.
- Around line 172-183: The nested connector sizing logic in
DataTableFilterCheckbox is redundant because the option.options?.length === 1
check inside the non-first nested branch can never be true. Simplify the
geometry logic in the isLastNested span by removing that dead condition and
using the half-height class unconditionally in the nestedIndex !== 0 path,
keeping the outer nestedIndex === 0 branch intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ac5760fb-42b5-48d7-9fa9-4fccf596e088
📒 Files selected for processing (1)
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx
🎭 Playwright Test ResultsDetails
Flaky testsFeatures › sql-editor.spec.ts › SQL Editor › should check if SQL editor is working as expected Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
|
Tested on staging |
Braintrust eval report
|
Context
Increases the click area of unified logs filter
Before
After
Summary by CodeRabbit