fix: the rows are now constantly sized so that the rows and related math aren't incorrect when screens are changed#28
Conversation
…ath aren't incorrect when screens are changed
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 17 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, 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 the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. 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 (2)
📝 WalkthroughWalkthroughThe PR refactors the calendar view's measurement and layout system from percentage-based to pixel-based positioning, replacing scroll height calculations with slot height measurements and introducing ResizeObserver-scheduled updates. Additional changes include minor Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/App.tsx`:
- Around line 101-106: The failure is due to formatting/indentation in the
parseNumber function (and similar hunks around lines 1150-1154); run the project
formatter and apply its changes (execute "vp fmt ." locally) to normalize
indentation and whitespace so the parseNumber arrow function and the other
modified blocks match the repo formatting; after formatting, re-run "vp fmt
--check ." to confirm the file (and the parseNumber function) now passes CI.
In `@src/components/CalendarView.tsx`:
- Around line 391-418: The currentTime positioning uses visibleDuration as the
denominator while calendarContentHeight is based on visibleSlotCount, which
misaligns when calendarEndTime isn't a multiple of intervalMinutes; update the
math to use the rendered slot duration (visibleSlotCount * intervalMinutes)
instead of visibleDuration (or compute calendarContentRenderedDuration) when
calculating currentTimeTopPx / ratios so that currentTimeTopPxRaw =
((currentMinutes - visibleStart) / (visibleSlotCount * intervalMinutes)) *
calendarContentHeight (and apply the same change for other affected calculations
around currentTimeLabelWithinTop/currentTimeLabelTop/currentTimeLineTop), ensure
edge modes ("before"/"after") remain unchanged, and run "vp fmt ." after making
the edits to fix formatting.
🪄 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: 11803517-fc00-43af-93ac-ee1fc7dbe66e
📒 Files selected for processing (3)
src/App.tsxsrc/components/CalendarView.tsxsrc/index.css
Summary by CodeRabbit
Style
Refactor