fix(web): align week header and grid columns#1692
Merged
Conversation
Adds a 1728x1426 regression case that asserts day headers, all-day columns, and timed columns share the same x/right/width within 1px. Documents the column contract and would catch a future regression (e.g. reintroducing the CSS Grid + Flex distribution mismatch). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Why
The week header, all-day band, and timed grid could drift or appear visually broken when the calendar was narrow, especially with the sidebar open. The layout mixed different distribution methods and also reserved scrollbar space inside the timed grid, so the visible grid could look wider than the actual day columns.
After the columns were unified, compact desktop widths still needed a better overflow story. The browser's native bottom scrollbar was functional but visually loud and did not match the dark Compass UI. This PR keeps horizontal scrolling available, hides the native bar, and adds a restrained in-app rail to signal that more days are available off-screen.
A separate drag regression came from mixing old sidebar-width X-coordinate correction with the newer measured grid coordinates. Pointer X values were shifted before date calculation, so a drag on one day could create the draft on another. The date-mapping path now uses the actual browser pointer coordinate against measured grid bounds.
Reviewer Notes
Columnsnow uses CSS Grid with seven equal day tracks instead of flex distribution.DayLabels,StyledAllDayColumns, andStyledGridColsall build on the shared column primitive.WeekGridScrollAreaowns the horizontal overflow affordance: it hides the native horizontal scrollbar, observes scrollability, and renders the small bottom rail/thumb only when the week track overflows.#mainGridkeeps--scrollbar-width: 0pxand the scrollbar utility so the actual rendered vertical scrollbar width is zero instead of falling back to Chrome's native white scrollbar.Validation
http://localhost:9080/weeklocally and confirmed the native bottom scrollbar is hidden and the subtle rail appears at compact width.0px, scroll rail visible, and horizontal scrolling works; wide width hides the rail because no horizontal overflow is present.0pxafter restoring the scrollbar utility on#mainGrid.bunx playwright test e2e/navigation/week-view-layout.spec.ts e2e/timed/create-event-mouse.spec.ts --project=chromium-desktopbun run type-checkbunx biome check e2e/navigation/week-view-layout.spec.ts packages/web/src/common/constants/web.constants.ts packages/web/src/views/Calendar/Calendar.tsx packages/web/src/views/Calendar/styled.tsx packages/web/src/views/Calendar/components/Grid/WeekGridScrollArea.tsx packages/web/src/views/Calendar/components/Grid/Columns/TimesColumn/styled.tsgit diff --checkLint Note
bun run lintis not currently clean in this checkout. It now exits non-zero on an unrelated backend duplicate test-hook error atpackages/backend/src/auth/services/google/google.auth.service.test.ts:37, along with the existing warning backlog. That backend file is not changed by this PR.