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: Copy invite link on safari #12873

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

hariombalhara
Copy link
Member

@hariombalhara hariombalhara commented Dec 19, 2023

What does this PR do?

Fixes #12801
Gets Copy Invite Link working on Safari

Demo

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • Go to members page
  • Click on Add
  • Click on Copy Invite Link

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

Copy link

vercel bot commented Dec 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 11:23am
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 11:23am
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2023 11:23am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 11:23am
cal-demo ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 11:23am
qa ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 11:23am
ui ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2023 11:23am

@hariombalhara
Copy link
Member Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

Copy link
Contributor

github-actions bot commented Dec 19, 2023

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

@zomars zomars added the core area: core, team members only label Dec 19, 2023
@hariombalhara hariombalhara force-pushed the 12-19-fix_Copy_invite_link_on_safari branch 2 times, most recently from 6c28364 to ded10c2 Compare December 19, 2023 11:03
@hariombalhara hariombalhara marked this pull request as ready for review December 19, 2023 11:05
@hariombalhara hariombalhara requested a review from a team December 19, 2023 11:06
@hariombalhara hariombalhara force-pushed the 12-19-fix_Copy_invite_link_on_safari branch from ded10c2 to 61d15ee Compare December 19, 2023 11:07
const inviteLinkClipbardItem = new ClipboardItem({
"text/plain": new Promise(async (resolve) => {
// Instead of doing async work and then writing to clipboard, do async work in clipboard API itself
const { inviteLink } = await createInviteMutation.mutateAsync({
Copy link
Member Author

Choose a reason for hiding this comment

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

Spent quite some time figuring out two promises to work together with closures going on. In the end discovered that there is mutateAsync to make it simpler 😅

Copy link
Contributor

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

One Page Changed Size

The following page changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/settings/teams/new 181.62 KB 344.69 KB 98.48% (🟢 -1.99%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

Very cool! Nice getting this sorted

@emrysal emrysal merged commit e3905f6 into main Dec 19, 2023
24 checks passed
@emrysal emrysal deleted the 12-19-fix_Copy_invite_link_on_safari branch December 19, 2023 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-2810] Copy Invite link not working on safari
3 participants