Allow resizing the final dataset table column#86
Conversation
|
Warning Review limit reached
Your plan includes 2 reviews of capacity. Refill in 19 minutes and 23 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDatasetTable adds layout refinements for column resizing. A new 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
a1c9f6a to
4b141b9
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
frontend/components/table/DatasetTable.tsx (1)
120-125: ⚡ Quick winConsider removing the redundant onMouseUp handler.
The new effect (lines 120-125) correctly persists widths whenever resizing transitions to inactive, including when mouseup occurs outside the table (the PR's stated goal). The onMouseUp handler (lines 152-154) is now redundant—it attempts the same persistence but only when mouseup occurs inside the container. While the duplicate call is harmless (persistWidths is idempotent), removing the onMouseUp handler would improve clarity and avoid wasteful re-persistence.
🧹 Proposed cleanup
style={{ fontSize: "13px" }} - onMouseUp={() => { - if (resizingColumnId) persistWidths(); - }} >Also applies to: 152-154
🤖 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 `@frontend/components/table/DatasetTable.tsx` around lines 120 - 125, The useEffect watching resizingColumnId (which compares previousResizingColumnIdRef.current to resizingColumnId and calls persistWidths) makes the onMouseUp handler redundant; remove the onMouseUp prop/handler attached to the container that only calls persistWidths on mouseup (lines referencing the onMouseUp handler) so persistence is only performed by the effect using previousResizingColumnIdRef, keeping persistWidths idempotent and avoiding duplicate calls; ensure no other behavior was tied to that onMouseUp before deleting it.
🤖 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 `@frontend/components/table/DatasetTable.tsx`:
- Around line 120-125: The useEffect watching resizingColumnId (which compares
previousResizingColumnIdRef.current to resizingColumnId and calls persistWidths)
makes the onMouseUp handler redundant; remove the onMouseUp prop/handler
attached to the container that only calls persistWidths on mouseup (lines
referencing the onMouseUp handler) so persistence is only performed by the
effect using previousResizingColumnIdRef, keeping persistWidths idempotent and
avoiding duplicate calls; ensure no other behavior was tied to that onMouseUp
before deleting it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c811f1fb-2481-4ec1-bf71-87d052faecfd
📒 Files selected for processing (1)
frontend/components/table/DatasetTable.tsx
Summary
Rebased onto main after #84 merged.
Not stacked on #85.
Fixes #80.
Verification
npm run lint -- --quietinfrontendNEXT_PUBLIC_CONVEX_URL=http://127.0.0.1:3210 NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_dGVzdC5jbGVyay5hY2NvdW50cy5kZXYk npm run buildinfrontendDatasetTablestatic harness: dragged finalAvailabilitycolumn from 180px to 310px, confirmed localStorage persistedAvailability: 310, reloaded and confirmed width restored at 310pxgit diff --checkNotes