Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
fix(landing): fix oversized HTML and severe LCP on integration/comparison pages#5634
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
7334965
fix(landing): fix oversized HTML and severe LCP on integration/compar…
waleedlatif1 ec28a58
fix(landing): restore full-fidelity search and template priority
waleedlatif1 27243e9
fix(landing): sort featured templates ahead of owned, not just as a t…
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22 apps/sim/app/(landing)/integrations/(shell)/[slug]/page.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4 apps/sim/app/(landing)/integrations/components/integration-card.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 13 additions & 22 deletions
35 apps/sim/app/(landing)/integrations/components/integration-grid.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -14,7 +14,7 @@ | ||
| import { stripVersionSuffix } from '@sim/utils/string' | ||
| import integrationsJson from '@/lib/integrations/integrations.json' | ||
| import type { Integration } from '@/lib/integrations/types' | ||
| import type { Integration, IntegrationSummary } from '@/lib/integrations/types' | ||
| import { getAllBlockMeta } from '@/blocks/registry' | ||
| /** All integrations surfaced in the catalog, ordered by `scripts/generate-docs.ts`. */ | ||
| @@ -67,13 +67,44 @@ export const POPULAR_WORKFLOWS: readonly PopularWorkflow[] = (() => { | ||
| return pairs | ||
| })() | ||
| /** | ||
| * Projects a full `Integration` down to the fields the `/integrations` | ||
| * catalog grid renders and searches by, replacing the full `operations`/ | ||
| * `triggers` arrays with a precomputed, lowercased `searchFields` index | ||
| * (name, description, every operation's name and description, every | ||
| * trigger's name) - the exact same fields the original per-field search | ||
| * over `Integration[]` matched against. See {@link IntegrationSummary} for | ||
| * why this exists. | ||
| */ | ||
| export function toIntegrationSummary(integration: Integration): IntegrationSummary { | ||
| const searchFields = [ | ||
| integration.name.toLowerCase(), | ||
| integration.description.toLowerCase(), | ||
| ...integration.operations.flatMap((op) => [ | ||
| op.name.toLowerCase(), | ||
| op.description.toLowerCase(), | ||
| ]), | ||
| ...integration.triggers.map((t) => t.name.toLowerCase()), | ||
| ] | ||
| return { | ||
| type: integration.type, | ||
| slug: integration.slug, | ||
| name: integration.name, | ||
| description: integration.description, | ||
| bgColor: integration.bgColor, | ||
| integrationType: integration.integrationType, | ||
| searchFields, | ||
| } | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| export { blockTypeToIconMap } from '@/lib/integrations/icon-mapping' | ||
| export { | ||
| type OAuthServiceMatch, | ||
| resolveOAuthServiceForIntegration, | ||
| resolveOAuthServiceForSlug, | ||
| } from '@/lib/integrations/oauth-service' | ||
| export type { AuthType, FAQItem, Integration } from '@/lib/integrations/types' | ||
| export type { AuthType, FAQItem, Integration, IntegrationSummary } from '@/lib/integrations/types' | ||
| export { getAllBlockMeta, getBlockMeta, getTemplatesForBlock } from '@/blocks/registry' | ||
| export type { BlockMeta, BlockTemplate } from '@/blocks/types' | ||
| export { formatIntegrationType } from '@/blocks/types' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.