Skip to content

perf: Add CrmServiceMap#19718

Merged
keithwillcode merged 6 commits intomainfrom
add-crm-import
Mar 5, 2025
Merged

perf: Add CrmServiceMap#19718
keithwillcode merged 6 commits intomainfrom
add-crm-import

Conversation

@joeauyeung
Copy link
Copy Markdown
Contributor

What does this PR do?

While the app store is getting a refactor, we're introducing a map that only contains CRM apps so we don't import the whole app store.

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

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.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

@keithwillcode keithwillcode added consumer core area: core, team members only labels Mar 4, 2025
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.

I decided to generate the file in case new CRM apps get added CrmService files. Ex. Attio

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 4, 2025

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

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Mar 5, 2025 0:36am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Mar 5, 2025 0:36am

@joeauyeung joeauyeung marked this pull request as ready for review March 4, 2025 16:10
@graphite-app graphite-app bot requested a review from a team March 4, 2025 16:10
@dosubot dosubot bot added crm-apps area: crm apps, salesforce, hubspot, close.com, sendgrid performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive labels Mar 4, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Mar 4, 2025

Graphite Automations

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2025

E2E results are ready!

This file is autogenerated using the command `yarn app-store:build --watch`.
Don't modify this file manually.
**/
export const CrmServiceMap = {
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.

Can we not find a way to only load the exact 1 we need?

Something similar to what I was testing here? https://github.com/calcom/cal.com/pull/19520/files#diff-8d0187f3e8930f70c4a3baae2905502d659e5bbadcf136e011d792c4ea7487e9

Basically just a map of where to import the app from but don't import it until needed.
This map still imports 6 full CRM apps to load 1.

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.

Note: I know this means we'd need to update the app-store-cli so likely better as a follow up PR

@keithwillcode keithwillcode merged commit 07969f5 into main Mar 5, 2025
42 checks passed
@keithwillcode keithwillcode deleted the add-crm-import branch March 5, 2025 17:58
@keithwillcode keithwillcode mentioned this pull request Mar 5, 2025
3 tasks
itsalam pushed a commit to itsalam/cal.com that referenced this pull request Mar 6, 2025
* Generate crm apps map

* Remove .tsx file

* Use `CrmServiceMap` in `getCrm`

* Remove unused types

* Type fixes

* Type fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consumer core area: core, team members only crm-apps area: crm apps, salesforce, hubspot, close.com, sendgrid performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants