Add rowHeightPx parameter to CalendarPager and pass it through to
CalendarMonthPage. Remove onRowHeightMeasured callback which is no
longer needed since CalendarMonthPage now receives row height
externally. Update CalendarMonthView to pass rowHeightPx to CalendarPager.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace internal rowHeightPx measurement with external rowHeightPx
parameter passed from CalendarMonthView. This eliminates the mismatch
between outer gridHeightPx (based on shrinking container) and inner
totalHeightDp (based on independently measured row height), which was
causing visual jitter during collapse animation.
Remove onRowHeightMeasured callback, TAG constant, and debug printlns
from CalendarMonthPage as part of this refactor.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add lockedRowHeightPx state that is only updated when fully expanded
(p < 0.01f). During collapse, rowHeightPx uses the locked value instead
of recalculating from the shrinking container height, which was causing
rowH to drop from 137→0 and gridH to become 0 at p=1.0.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Calculate actual weeks needed per month and interpolate row count during
page swipe so BottomCard follows the grid height smoothly. Remove debug
println statements.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Distinguish the selected-today state from regular selection by using
primaryContainer/onPrimaryContainer instead of primary/onPrimary,
providing a softer visual treatment for the combined state.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When swiping to a different month or week, select today if it falls
within the target period instead of always picking the 1st or Monday.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adding .drop(1) prevents the settledPage flow from firing on initial
composition, which would override the "today" date selection.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Select the Monday of the week when WeekPager changes, and the 1st of
the month when CalendarPager changes, so the selected date always
matches the visible page.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Switch CalendarMonthPage from Column to Box with calculated y positions per row,
enabling precise height computation that aligns with CalendarMonthView's
BottomCard positioning. Simplify cardTopPx calculation by deriving grid height
from the same formula instead of tracking expandedCalendarHeightPx separately.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Non-selected rows now compress their height proportionally with
collapse progress, replacing the previous overlay-based approach.
Remove KDoc that described the old overlay behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Selected row now moves up via offset + zIndex to cover other rows, which
stay in place. Collapse offset calculation excludes MonthHeader and
WeekdayHeader heights so only the grid portion is collapsed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When rowHeightPx is 0 (first frame), use aspectRatio-based natural
height instead of collapsing to 0.dp, preventing a visible flash.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add KDoc to all public Composable functions with parameter descriptions
- Add inline comments for non-obvious algorithms (42-cell grid, pager mapping)
- Add @Suppress reason comments for monthNumber deprecation
- Document collapseProgress range and physical meaning
- Add named constant comments for START_PAGE
- Add Preview name to App()
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Use expandedCalendarHeightPx to preserve full height during collapse animation,
and compute cardTopPx based on collapse state instead of offset arithmetic.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
ViewModel now exposes onDrag/onDragEnd so BottomCard drives the
collapse animation via detectVerticalDragGestures instead of a
discrete collapse() call. Drag maps to 0–1 progress over 200dp;
on release the animatable snaps to the nearest end with spring.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add isCollapsed/collapseProgress state to CalendarViewModel for toggling
between month and week views. CalendarMonthPage animates non-selected
weeks out with offset and alpha. Introduce WeekPager for single-week
HorizontalPager and BottomCard with drag-to-collapse gesture.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>