Skip to content

fix(web): resolve visible column border when weekends are hidden#142

Merged
JeanMeijer merged 2 commits intoanalogdotnow:mainfrom
ankurgajurel:fix/last-column-border-132
Jun 23, 2025
Merged

fix(web): resolve visible column border when weekends are hidden#142
JeanMeijer merged 2 commits intoanalogdotnow:mainfrom
ankurgajurel:fix/last-column-border-132

Conversation

@ankurgajurel
Copy link
Copy Markdown
Contributor

@ankurgajurel ankurgajurel commented Jun 21, 2025

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

image

Add screenshots or recordings here to help reviewers understand your changes.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • UI/UX update
  • Docs update
  • Refactor / Cleanup

Related Areas

  • Authentication
  • Calendar UI
  • Data/API
  • Docs

Testing

  • Manual testing performed
  • Cross-browser testing (if UI changes)
  • Mobile responsiveness verified (if UI changes)

Checklist

  • I’ve read the CONTRIBUTING guide
  • My code works and is understandable and follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in complex areas
  • I have updated the documentation
  • Any dependent changes are merged and published

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

  • Style
    • Improved the visual appearance of the week view in the event calendar by ensuring the right border is removed from the last visible day, resulting in a cleaner look for day columns and all-day event sections.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 21, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The update modifies the week view components of the event calendar to use the visibleDays array from context for determining day indices and styling. It replaces CSS last-child selectors with explicit logic to remove the right border on the last visible day, affecting both day columns and all-day event sections.

Changes

Files Change Summary
apps/web/src/components/event-calendar/views/week-view.tsx Updated to use visibleDays from context for day index calculations and conditional border styling; minor whitespace adjustment.

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link
Copy Markdown

vercel bot commented Jun 21, 2025

@ankurgajurel is attempting to deploy a commit to the Analog Interface Team on Vercel.

A member of the Team first needs to authorize it.

@ankurgajurel
Copy link
Copy Markdown
Contributor Author

fixes: #132

@JeanMeijer
Copy link
Copy Markdown
Collaborator

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 23, 2025

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between fedb4fc and 40a460e.

📒 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 visibleDays from 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-0 CSS class. The approach of finding the day's index in visibleDays and checking if it matches the last index is sound.


248-249: Perfect application of the conditional border styling.

The replacement of last:border-r-0 with the conditional isLastVisibleDay && "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 isLastVisibleDay logic is correctly applied in WeekViewDayColumns, maintaining consistency with the fix in WeekViewAllDaySection.


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

@ankurgajurel
Copy link
Copy Markdown
Contributor Author

fixed the formatting action failing @JeanMeijer

@JeanMeijer JeanMeijer changed the title fix: last column shows border on the right when weekends are hidden; fix(web): resolve visible column border when weekends are hidden Jun 23, 2025
@JeanMeijer JeanMeijer merged commit 16aa722 into analogdotnow:main Jun 23, 2025
3 of 4 checks passed
@a-rebets a-rebets added bug Something isn't working UI labels Jun 25, 2025
AasheeshLikePanner pushed a commit to AasheeshLikePanner/Analog that referenced this pull request Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants