Skip to content

fix: the rows are now constantly sized so that the rows and related math aren't incorrect when screens are changed#28

Merged
jacobhillock merged 4 commits into
mainfrom
fix/screen-resize-issues
Apr 20, 2026
Merged

fix: the rows are now constantly sized so that the rows and related math aren't incorrect when screens are changed#28
jacobhillock merged 4 commits into
mainfrom
fix/screen-resize-issues

Conversation

@jacobhillock

@jacobhillock jacobhillock commented Apr 20, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Style

    • Renamed "Daily Tasks" view toggle to "Day Logs"
    • Fixed calendar hour slot heights for consistent rendering
  • Refactor

    • Enhanced calendar grid measurement system for improved positioning accuracy of calendar events and overlays

…ath aren't incorrect when screens are changed
@coderabbitai

coderabbitai Bot commented Apr 20, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@jacobhillock has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 17 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 10812901-e4ae-46e1-a6ba-f42e6b82b3c6

📥 Commits

Reviewing files that changed from the base of the PR and between 463302a and 98d76ac.

📒 Files selected for processing (2)
  • src/App.tsx
  • src/components/CalendarView.tsx
📝 Walkthrough

Walkthrough

The 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 App.tsx formatting adjustments and CSS styling additions.

Changes

Cohort / File(s) Summary
App.tsx adjustments
src/App.tsx
Re-indented parseNumber curried function and toggleSummaryEntries calculation; renamed "Daily Tasks" button label to "Day Logs".
Calendar measurement refactoring
src/components/CalendarView.tsx
Replaced gridMetrics.scrollHeight with slotHeight; changed grid metrics measurement to use first .calendar-hour-slot rendered height; introduced ResizeObserver and requestAnimationFrame-scheduled measurement updates; converted positioning from percentage-based to pixel-based layout (top/height in px units); removed inline percent height styles from hour labels and slots.
Calendar element sizing
src/index.css
Added fixed height: 2rem to .calendar-hour-label and .calendar-hour-slot elements.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #9: Introduced GridMetrics.scrollHeight and overlay positioning logic in CalendarView.tsx; this PR replaces that with slot height measurements and pixel-based layout calculations.
  • PR #26: Modified the same App.tsx regions (re-indentation patterns and button label text), suggesting related UI/formatting consolidation efforts.

Poem

🐰 ✨ Hop skip, pixels align,
No more percent, just heights so fine—
Observers watch, the RAF skips by,
Calendar slots stack up to the sky! 📅

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing layout sizing issues by establishing constant row heights to prevent incorrect calculations during screen resizing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/screen-resize-issues

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 66e59f3 and 463302a.

📒 Files selected for processing (3)
  • src/App.tsx
  • src/components/CalendarView.tsx
  • src/index.css

Comment thread src/App.tsx Outdated
Comment thread src/components/CalendarView.tsx
@jacobhillock jacobhillock merged commit 8d7747c into main Apr 20, 2026
3 checks passed
@jacobhillock jacobhillock deleted the fix/screen-resize-issues branch April 20, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant