fix(schedule): correct tall view height for reservations ending befor…#1146
Draft
JohnVillalovos wants to merge 1 commit intodevelopfrom
Draft
fix(schedule): correct tall view height for reservations ending befor…#1146JohnVillalovos wants to merge 1 commit intodevelopfrom
JohnVillalovos wants to merge 1 commit intodevelopfrom
Conversation
…e hidden blocked period In the ScheduleTall (flipped) view, reservation height is calculated as `endTd.top - startTd.top`, where `endTd` is the row whose `data-min` matches the reservation's end timestamp. This row is normally the blocked period that immediately follows the reservation. When `hide.blocked.periods = true`, blocked period rows are absent from the DOM. The fallback `findClosestEnd()` returns the last reservable slot whose start time ≤ reservation end — one row too early. For a multi-slot reservation this produces a height that stops at the *top* of the last reservable slot rather than its bottom, leaving that slot visually empty. The single-slot case was already handled by the existing `height === 0` guard. Extend the fix to multi-slot reservations by adding `endTd.outerHeight()` to height whenever `findClosestEnd` was used (`calculatedAdjustment > 0`) and height is already non-zero. Closes: #920
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes ScheduleTall (flipped) reservation rendering when blocked period rows are hidden by ensuring multi-slot reservations visually extend through the final reservable slot.
Changes:
- Adjust ScheduleTall reservation height calculation when the end cell is inferred via
findClosestEnd(). - Extend the existing single-slot
height === 0handling to also cover multi-slot height truncation when blocked periods are absent.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+197
to
+201
| if (calculatedAdjustment > 0 && height > 0) { | ||
| // findClosestEnd was used: endTd is the last slot STARTING before resEnd, | ||
| // but height must extend through to the bottom of that slot row | ||
| height += endTd.outerHeight(); | ||
| } |
Comment on lines
+197
to
+201
| if (calculatedAdjustment > 0 && height > 0) { | ||
| // findClosestEnd was used: endTd is the last slot STARTING before resEnd, | ||
| // but height must extend through to the bottom of that slot row | ||
| height += endTd.outerHeight(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…e hidden blocked period
In the ScheduleTall (flipped) view, reservation height is calculated as
endTd.top - startTd.top, whereendTdis the row whosedata-minmatches the reservation's end timestamp. This row is normally the blocked period that immediately follows the reservation.When
hide.blocked.periods = true, blocked period rows are absent from the DOM. The fallbackfindClosestEnd()returns the last reservable slot whose start time ≤ reservation end — one row too early. For a multi-slot reservation this produces a height that stops at the top of the last reservable slot rather than its bottom, leaving that slot visually empty.The single-slot case was already handled by the existing
height === 0guard. Extend the fix to multi-slot reservations by addingendTd.outerHeight()to height wheneverfindClosestEndwas used (calculatedAdjustment > 0) and height is already non-zero.Closes: #920