Skip to content

feat: add availabilityLoaded embed event #21350

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

kart1ka
Copy link
Contributor

@kart1ka kart1ka commented May 16, 2025

What does this PR do?

Visual Demo (For contributors especially)

https://www.loom.com/share/43f2287a67404fc6a1ec6b9a63a9a0ef?sid=8e20798d-6832-41ca-9d87-e1171e1649f4

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

Summary by mrge

Added a new "availabilityLoaded" embed event that fires when event availability data is loaded, providing event ID, slug, and title. This allows consumers to react when availability is ready in embedded components.

@kart1ka kart1ka requested review from a team as code owners May 16, 2025 04:36
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label May 16, 2025
@graphite-app graphite-app bot requested a review from a team May 16, 2025 04:36
Copy link

vercel bot commented May 16, 2025

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

A member of the Team first needs to authorize it.

@github-actions github-actions bot added embed area: embed, widget, react embed ✨ feature New feature or request labels May 16, 2025
Copy link

graphite-app bot commented May 16, 2025

Graphite Automations

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

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

"Add community label" took an action on this PR • (05/16/25)

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

@kart1ka kart1ka changed the title feat: add availabiityLoaded embed event feat: add availabilityLoaded embed event May 16, 2025
@keithwillcode keithwillcode added the community-interns The team responsible for reviewing, testing and shipping low/medium community PRs label Jun 9, 2025
Copy link
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Jun 24, 2025
@kart1ka kart1ka marked this pull request as draft July 16, 2025 15:22
@anikdhabal anikdhabal added the Low priority Created by Linear-GitHub Sync label Jul 16, 2025
@github-actions github-actions bot removed the Stale label Jul 17, 2025
@hariombalhara
Copy link
Member

@kart1ka Why is it draft. Is something pending? Looks to be going into the right direction to me.

@kart1ka
Copy link
Contributor Author

kart1ka commented Jul 18, 2025

@hariombalhara some merge conflicts are remaining. Everything else is done. I will resolve them and make it ready to review.

Copy link
Contributor

coderabbitai bot commented Jul 18, 2025

Walkthrough

Adds a new embed event "availabilityLoaded" with payload { eventId, eventSlug, eventTitle }. The EventDataMap type was extended to include this event. useSchedule (and its argument types) now accepts an optional eventTitle and emits "availabilityLoaded" via sdkActionManager after successful schedule queries (API v2 and legacy). The eventTitle parameter is threaded through useScheduleForEvent, EmailEmbed, and BookerWebWrapper. The playground and React inline code register one-time listeners that log the payload and unregister themselves.

Assessment against linked issues

Objective Addressed Explanation
Define new embed event availabilityLoaded with payload: eventId, eventSlug, eventTitle [#21045, CAL-5700]
Fire availabilityLoaded when availability (slots) has loaded in embed, following bookingSuccessfulV2 pattern [#21045, CAL-5700]
Ensure event is exposed through SDK and listenable via Cal/api on/off [#21045, CAL-5700]

Assessment against linked issues: Out-of-scope changes

No out-of-scope functional code changes were identified.

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f439bf7 and 330e012.

📒 Files selected for processing (1)
  • packages/features/schedules/lib/use-schedule/useSchedule.ts (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/features/schedules/lib/use-schedule/useSchedule.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@kart1ka kart1ka marked this pull request as ready for review July 18, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync community-interns The team responsible for reviewing, testing and shipping low/medium community PRs embed area: embed, widget, react embed ✨ feature New feature or request Low priority Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new embed event availabilityLoaded when all the availability for a booking page has loaded in embed
5 participants