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

refactor(booking-single-view): Refactor RecurringBookings and add hoo… #15400

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

Conversation

AranzalesO
Copy link

Refactor Overview

The primary goal was to reduce the complexity of the RecurringBookings component as identified by Codescene. The refactors included breaking down the component into smaller, more manageable pieces, and moving specific logic into utility functions and subcomponents.

Changes Made

  1. Utility Functions: Created utility functions for sorting bookings and formatting date/time.
  • sortRecurringBookings
  • formatDateTime
  1. Subcomponents: Introduced a subcomponent RecurringEvent to handle individual event rendering.

  2. Component Refactor: Updated the RecurringBookings component to utilize the new utility functions and subcomponent, improving readability and maintainability.

Codescene Analysis

Codescene identified the RecurringBookings component as a complex method due to numerous conditional statements and nested logic. The refactor addresses these issues by modularizing the code.

image_2024-06-10_225313061

…k to reduce code complexity according to Code Analysis
Copy link

vercel bot commented Jun 11, 2024

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

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jun 11, 2024
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@graphite-app graphite-app bot requested review from a team June 11, 2024 03:53
Copy link
Contributor

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@dosubot dosubot bot added the bookings area: bookings, availability, timezones, double booking label Jun 11, 2024
Copy link

graphite-app bot commented Jun 11, 2024

Graphite Automations

"Add community label" took an action on this PR • (06/11/24)

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

"Add foundation team as reviewer" took an action on this PR • (06/11/24)

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

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

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

@keithwillcode keithwillcode added this to the v4.4 milestone Jun 11, 2024
@PeerRich PeerRich added the Low priority Created by Linear-GitHub Sync label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bookings area: bookings, availability, timezones, double booking community Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants