fix(web): resolve visible column border when weekends are hidden#142
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe update modifies the week view components of the event calendar to use the Changes
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@ankurgajurel is attempting to deploy a commit to the Analog Interface Team on Vercel. A member of the Team first needs to authorize it. |
|
fixes: #132 |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/web/src/components/event-calendar/views/week-view.tsx (1)
232-232: Remove unnecessary whitespace.This extra blank line appears to be part of the formatting issues flagged by the pipeline.
-
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/src/components/event-calendar/views/week-view.tsx(7 hunks)
🧰 Additional context used
🪛 GitHub Actions: Check formatting
apps/web/src/components/event-calendar/views/week-view.tsx
[warning] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues.
🔇 Additional comments (6)
apps/web/src/components/event-calendar/views/week-view.tsx (6)
185-185: LGTM! Correct addition of visibleDays to context.The addition of
visibleDaysfrom context is necessary for the border fix implementation.
218-222: Excellent implementation of the border fix logic.The logic correctly determines the last visible day which addresses the core issue where hidden weekend days were incorrectly receiving the
last:border-r-0CSS class. The approach of finding the day's index invisibleDaysand checking if it matches the last index is sound.
248-249: Perfect application of the conditional border styling.The replacement of
last:border-r-0with the conditionalisLastVisibleDay && "border-r-0"correctly fixes the issue described in the PR objectives. Now the border removal is applied based on actual visibility rather than DOM position.
392-393: Consistent implementation across components.The same
isLastVisibleDaylogic is correctly applied inWeekViewDayColumns, maintaining consistency with the fix inWeekViewAllDaySection.
404-405: Border styling fix correctly applied to day columns.The conditional border removal is properly implemented here as well, ensuring the fix works for both all-day sections and regular day columns.
200-201: Address formatting issues.The pipeline indicates formatting problems. These whitespace changes may be contributing to the Prettier formatting failure.
Please run the following to fix formatting issues:
#!/bin/bash # Fix formatting issues identified by the pipeline prettier --write apps/web/src/components/event-calendar/views/week-view.tsx
|
fixed the formatting action failing @JeanMeijer |
Description
fixes ui issue where the last visible column in week view incorrectly showed a right border when weekends were hidden.
the last:border-r-0 CSS class was being applied to the last DOM element (hidden weekend) instead of the last visible day.
Screenshots / Recordings
Add screenshots or recordings here to help reviewers understand your changes.
Type of Change
Related Areas
Testing
Checklist
Notes
(Optional) Add anything else you'd like to share.
By submitting, I confirm I understand and stand behind this code. If AI was used, I’ve reviewed and verified everything myself.
Summary by CodeRabbit