feat: Add ICS Feed support by mogery · Pull Request #13337 · calcom/cal.diy · GitHub
Skip to content

feat: Add ICS Feed support - #13337

Merged
emrysal merged 8 commits into
calcom:mainfrom
mogery:mog/ics-feed
Jan 23, 2024
Merged

emrysal merged 8 commits into
calcom:mainfrom
mogery:mog/ics-feed

Conversation

@mogery

@mogery mogery commented Jan 19, 2024

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds an "ICS Feed" app to the app store that allows the linking of ICS Feeds for usage via getAvailability

Fixes #3167
/claim #3167

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

Criteria:

  • "ICS Feed" can be installed from the App Store
  • Setup screen pops up, ICS feed URLs can be added and saved
  • ICS feed calendars appear in the system and are toggleable to be used for conflict checking
  • ICS feeds are actually used for conflict checking

There's an ICS feed of German holidays in #3167 that I used for testing.

@vercel

vercel Bot commented Jan 19, 2024

Copy link
Copy Markdown

@CLAassistant

CLAassistant commented Jan 19, 2024 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@algora-pbc

algora-pbc Bot commented Jan 19, 2024

Copy link
Copy Markdown

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay.

@github-actions

github-actions Bot commented Jan 19, 2024 •

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar Low priority Created by Linear-GitHub Sync osshack Submission for 2023 OSShack ✨ feature New feature or request 💎 Bounty A bounty on Algora.io 🙋🏻‍♂️help wanted Help from the community is appreciated labels Jan 19, 2024
@mogery

mogery commented Jan 19, 2024 •

Copy link
Copy Markdown
Contributor Author

Couldn't revert the yarn.lock change since this updates the workspace structure. Reverted it anyways

@mogery mogery changed the title Add ICS Feed support feat: Add ICS Feed support Jan 19, 2024
@github-actions

github-actions Bot commented Jan 19, 2024 •

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for @calcom/web

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

This PR introduced no changes to the JavaScript bundle! 🙌

@PeerRich

Copy link
Copy Markdown
Member

awesome initiative

this will come handy for many people using ics

Comment on lines +16 to +37
// for Apple's Travel Time feature only (for now)
const getTravelDurationInSeconds = (vevent: ICAL.Component) => {
const travelDuration: ICAL.Duration = vevent.getFirstPropertyValue("x-apple-travel-duration");
if (!travelDuration) return 0;

// we can't rely on this being a valid duration and it's painful to check, so just try and catch if anything throws
try {
const travelSeconds = travelDuration.toSeconds();
// integer validation as we can never be sure with ical.js
if (!Number.isInteger(travelSeconds)) return 0;
return travelSeconds;
} catch (e) {
return 0;
}
};

const applyTravelDuration = (event: ICAL.Event, seconds: number) => {
if (seconds <= 0) return event;
// move event start date back by the specified travel time
event.startDate.second -= seconds;
return event;
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure how much this is actually needed? it certainly doesn't hurt though

@keithwillcode
keithwillcode requested a review from a team January 20, 2024 13:13
@keithwillcode keithwillcode added the community Created by Linear-GitHub Sync label Jan 20, 2024
@keithwillcode keithwillcode added this to the v3.9 milestone Jan 20, 2024

@emrysal emrysal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested, code wise this looks really good too; Happy to approve - Thank you!

@vercel

vercel Bot commented Jan 23, 2024 •

Copy link
Copy Markdown

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 10:24am

@emrysal
emrysal merged commit 0abff9f into calcom:main Jan 23, 2024
@keithwillcode keithwillcode modified the milestones: v3.9, v3.8 Jan 23, 2024
@saschafoerster

Copy link
Copy Markdown
Contributor

So cool! 😎

@mogery
mogery deleted the mog/ics-feed branch January 23, 2024 13:25
zomars added a commit to KATT/cal.com that referenced this pull request Jan 23, 2024
* feat: ics-feed proof of concept pt. 1

* feat: ics-feedcalendar fixes

* fix: ics feed i18n and icon issues

* fix: remove debug log

* chore: revert yarn.lock

* fix: remove debug log

---------

Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
@shafy

shafy commented Feb 12, 2024

Copy link
Copy Markdown

Really cool! Is this already live on the cal.com version yet? I can't seem to find it...

@penyuan

penyuan commented Feb 15, 2024

Copy link
Copy Markdown

@emrysal @mogery Same here, how do I find this feature on cal.com????

@Rubenkl

Rubenkl commented Feb 20, 2024

Copy link
Copy Markdown

Someone added the labels for milestone v3.9, v3.8. So when 3.9 is out for sure this seems included!

@penyuan

penyuan commented Mar 17, 2024

Copy link
Copy Markdown

@Amit91848 Amit91848 mentioned this pull request Mar 18, 2024
1 task done
@TheLubab TheLubab mentioned this pull request Jun 17, 2024
1 of 3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar 🙋 Bounty claim 💎 Bounty A bounty on Algora.io community Created by Linear-GitHub Sync ✨ feature New feature or request 🙋🏻‍♂️help wanted Help from the community is appreciated Low priority Created by Linear-GitHub Sync osshack Submission for 2023 OSShack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CAL-2979] ICS feed support for checking against double bookings

10 participants