-
Notifications
You must be signed in to change notification settings - Fork 12k
feat: add docs for calendar view atom #24049
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,61 @@ | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| title: "Calendar view" | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| The calendar view atom is basically a weekly calendar view wherein users can see entire week at a glance, clearly showing both available and unavailable time slots. This view is designed to provide a comprehensive and easy-to-read schedule, helping users quickly identify open slots for booking or planning. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Individual event type | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Below code snippet can be used to render the calendar view atom for an individual event | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```js | ||||||||||||||||||||||||||
| import { CalendarView } from "@calcom/atoms"; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| export default function Booker( props : BookerProps ) { | ||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||
| <div> | ||||||||||||||||||||||||||
| <CalendarView username={props.calUsername} eventSlug={props.eventSlug} /> | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Team event type | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Below code snippet can be used to render the calendar view atom for a team event | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```js | ||||||||||||||||||||||||||
| import { CalendarView } from "@calcom/atoms"; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| export default function Booker( props : BookerProps ) { | ||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||
| <div> | ||||||||||||||||||||||||||
| <CalendarView isTeamEvent={true} teamId={props.teamId} eventSlug={props.eventSlug} /> | ||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| For a demonstration of the calendar view atom, please refer to the video below. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <p></p> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <iframe | ||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Amazing that we have videos! |
||||||||||||||||||||||||||
| height="315" | ||||||||||||||||||||||||||
| style={{ width: "100%", maxWidth: "560px" }} | ||||||||||||||||||||||||||
| src="https://www.loom.com/embed/40ebab9efaa149019ea487e35ff8f656?sid=c6a748c3-0564-4400-ac7c-a17a404c9af6" | ||||||||||||||||||||||||||
| frameborder="0" | ||||||||||||||||||||||||||
| allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" | ||||||||||||||||||||||||||
| allowfullscreen="true" | ||||||||||||||||||||||||||
| ></iframe> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| <p></p> | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Below is a list of props that can be passed to the create event type atom | ||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix copy: references the wrong atom. Change “create event type atom” to “calendar view atom”. -Below is a list of props that can be passed to the create event type atom
+Below is a list of props that can be passed to the calendar view atom📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| | Name | Required | Description | | ||||||||||||||||||||||||||
| |:----------------------------|:----------|:-------------------------------------------------------------------------------------------------------| | ||||||||||||||||||||||||||
| | username | Yes | Username of the person whose schedule is to be displayed | | ||||||||||||||||||||||||||
| | eventSlug | Yes | Unique slug created for a particular event | | | ||||||||||||||||||||||||||
| | isTeamEvent | No | Boolean indicating if it is a team event, to be passed only for team events | | ||||||||||||||||||||||||||
| | teamId | No | The id of the team for which the event is created, to be passed only for team events | | ||||||||||||||||||||||||||
|
Comment on lines
+56
to
+61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify required props based on usage (individual vs team). Table marks username as required but team example omits it; clarify conditional requirements. | Name | Required | Description |
|:----------------------------|:----------|:-------------------------------------------------------------------------------------------------------|
-| username | Yes | Username of the person whose schedule is to be displayed |
+| username | Yes (individual events) | Username of the person whose schedule is to be displayed |
| eventSlug | Yes | Unique slug created for a particular event | |
| isTeamEvent | No | Boolean indicating if it is a team event, to be passed only for team events |
-| teamId | No | The id of the team for which the event is created, to be passed only for team events |
+| teamId | Yes (team events) | The id of the team for which the event is created; required when `isTeamEvent` is true |📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope this PR - maybe for CalendarView v2 we can determine
isTeamEventautomatically? Aka ifteamIdis passed then we internally setisTeamEventto true.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is possible yes, i'll have a look at this one. thanks for the suggestion lauris!