Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Weekly view time slots offset and content overflow in different timezones #20570

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PranjaliChouhan
Copy link

…# Fix weekly view time slots offset and content overflow in different timezones

What does this PR do?

Visual Demo (For contributors especially)

Image Demo:

[You can include screenshots showing the before/after of the fix if available]

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code.
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Set your browser/system to a timezone behind UTC (like Pacific TZ -07)
  2. Visit any booker page with a weekly view calendar
  3. Switch to weekly view mode
  4. Verify that:
    • Time slots begin at the correct time (no offset)
    • End hour slots are fully visible (not clipped due to top offset)
    • All time slots are properly aligned with their respective hours

Checklist

  • I have read the contributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Changes Made

  1. Fixed timezone handling in LargeCalendar.tsx:

    • Added proper detection of user's timezone using dayjs.tz.guess()
    • Correctly converted UTC time to the user's local timezone
  2. Updated AvailableTimes.tsx:

    • Removed the manual offset calculation that was causing display issues
    • Used proper timezone conversion through dayjs
  3. Improved useCheckOverlapWithOverlay.tsx:

    • Enhanced how the offset parameter is handled for better timezone support
    • Added a check to only apply offset when needed
  4. Added proper TypeScript configuration for the bookings module with correct path references

@PranjaliChouhan PranjaliChouhan requested a review from a team as a code owner April 6, 2025 10:42
Copy link

vercel bot commented Apr 6, 2025

@PranjaliChouhan is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Apr 6, 2025

CLA assistant check
All committers have signed the CLA.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Apr 6, 2025
@graphite-app graphite-app bot requested a review from a team April 6, 2025 10:42
@github-actions github-actions bot added booking-page area: booking page, public booking page, booker Medium priority Created by Linear-GitHub Sync labels Apr 6, 2025
Copy link
Contributor

github-actions bot commented Apr 6, 2025

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Fix weekly view time slots offset and content overflow in different t…". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@github-actions github-actions bot added ui area: UI, frontend, button, form, input 🐛 bug Something isn't working 🙋🏻‍♂️help wanted Help from the community is appreciated labels Apr 6, 2025
@dosubot dosubot bot added the bookings area: bookings, availability, timezones, double booking label Apr 6, 2025
Copy link

graphite-app bot commented Apr 6, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (04/06/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (04/06/25)

1 label was added to this PR based on Keith Williams's automation.

@PranjaliChouhan PranjaliChouhan changed the title Fix weekly view time slots offset and content overflow in different t… fix: Weekly view time slots offset and content overflow in different timezones Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
booking-page area: booking page, public booking page, booker bookings area: bookings, availability, timezones, double booking 🐛 bug Something isn't working community Created by Linear-GitHub Sync 🙋🏻‍♂️help wanted Help from the community is appreciated Medium priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weekly view time slots offset and content overflow clipped
2 participants