Skip to content

Commit 658ccc8

Browse files
authored
improvement(docs): simplify integration page headers (#9275)
1 parent 5d029a3 commit 658ccc8

295 files changed

Lines changed: 919 additions & 1807 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/docs/EDITORIAL_GUIDE.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ A link replaces repeated detail only after the owner contains it. Keep a concise
6161
- Use Markdown lists and tables for simple procedures and reference data. Use tabs for distinct configurations and Steps for substantial sequential procedures.
6262
- Integration table cells use ordinary word wrapping so short field names and types stay readable. Keep long tokens within the existing table scroll container; do not let them widen the page.
6363
- On large integration references, keep action and trigger descriptions visible and fold their field tables into `ReferenceDetails`. Preserve headings inside each disclosure so direct links and browser search can reveal them. Setup requirements and consequential warnings stay outside the folded tables.
64+
- Integration logos belong beside the page title, using the generated `integration` frontmatter. Keep the regular docs header actions and do not repeat the logo in the article body.
6465
- Match inline code to Sim Chat: normal-weight monospace text, tight padding, and the existing borderless filled surface tokens. Scope the treatment to prose code; preserve fenced examples, API route bars, schema controls, and selector labels.
6566
- Use shared `ChipSelect` controls for API response and request-example pickers, with accessible names that include the current value, checked radio semantics for single choices, and menus aligned to their triggers. Keep docs pickers nonmodal so they do not hide lazily hydrating siblings. Keep response headings free of inherited extra margins. Scope dependency filter styling to `data-object-search-input`, including schema popovers portaled to the body; focus stays inside the field, and touch fields retain the shared target and text sizes.
6667
- Import authored tabs from `@/components/ui/tabs`. Mixed panels retain a content inset; only a single code fence fills the frame. Keep long tab lists horizontally scrollable and long prose references wrapped. For bookmarked panels, use explicit native `TabsList`/`TabsTrigger` controls with `aria-controls` matching each panel ID; changing a panel ID alone leaves the generated control pointing at a nonexistent element.

‎apps/docs/app/[[...slug]]/page.tsx‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import { APIExampleSelector } from '@/components/ui/api-example-selector'
2424
import { APIRequestTabs } from '@/components/ui/api-request-tabs'
2525
import { CodeBlock } from '@/components/ui/code-block'
2626
import { Heading } from '@/components/ui/heading'
27+
import { IntegrationIcon } from '@/components/ui/integration-icon'
2728
import { ResponseSection } from '@/components/ui/response-section'
28-
import { getIntegrationLandingPage, INTEGRATION_LANDING_LABEL } from '@/lib/integration-landing'
2929
import { getApiSpecContent, getAuthenticatedCodeSamples, openapi } from '@/lib/openapi'
3030
import { simShikiOptions } from '@/lib/shiki-theme'
3131
import { type PageData, source } from '@/lib/source'
@@ -209,7 +209,6 @@ export default async function Page(props: { params: Promise<{ slug?: string[] }>
209209
}
210210
const isOpenAPI = '_openapi' in data && data._openapi != null
211211
const isApiReference = slug?.some((s) => s === 'api-reference') ?? false
212-
const integrationLandingPage = getIntegrationLandingPage(slug)
213212
const isCli = slug?.[0] === 'cli'
214213
const isMcp = slug?.[0] === 'mcp'
215214

@@ -354,7 +353,11 @@ export default async function Page(props: { params: Promise<{ slug?: string[] }>
354353
component: footer,
355354
}}
356355
>
357-
<PageHeader title={data.title} className='max-sm:[&>h1]:basis-0 max-sm:[&_a]:size-10'>
356+
<PageHeader
357+
title={data.title}
358+
icon={data.integration && <IntegrationIcon {...data.integration} />}
359+
className='max-sm:[&>h1]:basis-0 max-sm:[&_a]:size-10'
360+
>
358361
<div className='hidden sm:flex'>
359362
<LLMCopyButton content={markdownContent} />
360363
</div>
@@ -366,12 +369,6 @@ export default async function Page(props: { params: Promise<{ slug?: string[] }>
366369
slug?.[0] === 'integrations' && '[&_td]:[overflow-wrap:normal]'
367370
)}
368371
>
369-
{integrationLandingPage && (
370-
<p>
371-
{INTEGRATION_LANDING_LABEL}{' '}
372-
<a href={integrationLandingPage.url}>{integrationLandingPage.title}</a>
373-
</p>
374-
)}
375372
<MDX
376373
components={{
377374
...defaultMdxComponents,

‎apps/docs/components/docs-layout/page-header.tsx‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,22 @@ import { DocsTitle } from 'fumadocs-ui/page'
44

55
interface PageHeaderProps {
66
title: string
7+
icon?: ReactNode
78
children: ReactNode
89
className?: string
910
}
1011

11-
export function PageHeader({ title, children, className }: PageHeaderProps) {
12+
export function PageHeader({ title, icon, children, className }: PageHeaderProps) {
1213
return (
1314
<div className={cn('flex flex-wrap items-start gap-x-4 gap-y-2', className)}>
14-
<DocsTitle className='mb-2 min-w-0 flex-[1_1_16rem] [overflow-wrap:anywhere]'>
15-
{title}
15+
<DocsTitle
16+
className={cn(
17+
'mb-2 min-w-0 flex-[1_1_16rem] [overflow-wrap:anywhere]',
18+
icon && 'flex items-center gap-3'
19+
)}
20+
>
21+
{icon}
22+
{icon ? <span className='min-w-0'>{title}</span> : title}
1623
</DocsTitle>
1724
<div className='ms-auto flex shrink-0 items-center gap-2 pt-1'>{children}</div>
1825
</div>

‎apps/docs/components/ui/block-info-card.tsx‎

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
'use client'
2+
3+
import type * as React from 'react'
4+
import { cn } from '@sim/emcn'
5+
import { isLightTileColor } from '@sim/workflow-renderer/tile-icon-color'
6+
import { blockTypeToIconMap } from '@/components/ui/icon-mapping'
7+
8+
interface IntegrationIconProps {
9+
type: string
10+
color: string
11+
}
12+
13+
export function IntegrationIcon({ type, color }: IntegrationIconProps): React.ReactNode {
14+
const ResolvedIcon = blockTypeToIconMap[type] || null
15+
const iconColorClass = isLightTileColor(color) ? 'text-black' : 'text-white'
16+
17+
return (
18+
<span
19+
aria-hidden='true'
20+
className='flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-lg'
21+
style={{ background: color }}
22+
>
23+
{ResolvedIcon ? (
24+
<ResolvedIcon className={cn('size-4', iconColorClass)} />
25+
) : (
26+
<span className={cn('font-mono text-sm opacity-70', iconColorClass)}>
27+
{type.substring(0, 2)}
28+
</span>
29+
)}
30+
</span>
31+
)
32+
}

‎apps/docs/content/docs/integrations/a2a.mdx‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
---
22
title: A2A
33
description: Interact with external A2A-compatible agents
4+
integration:
5+
type: "a2a"
6+
color: "#4151B5"
47
---
58

6-
import { BlockInfoCard } from "@/components/ui/block-info-card"
7-
8-
<BlockInfoCard
9-
type="a2a"
10-
color="#4151B5"
11-
/>
12-
139
{/* MANUAL-CONTENT-START:intro */}
1410
Use the A2A (Agent-to-Agent) protocol to send messages, structured data, and files to external agents, inspect their Agent Cards, and track or cancel tasks. Provide the agent's endpoint URL and, when required, an API key. Sim sends that key in `X-API-Key` for task requests; agents that require a different authentication scheme need a compatible endpoint. Agent Card discovery runs before authentication, so the card must be reachable without that key.
1511
{/* MANUAL-CONTENT-END */}

‎apps/docs/content/docs/integrations/affinity.mdx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
---
22
title: Affinity
33
description: Read and write companies, people, lists, notes, and relationships in Affinity
4+
integration:
5+
type: "affinity"
6+
color: "#1B1C1E"
47
---
58

6-
import { BlockInfoCard } from "@/components/ui/block-info-card"
79
import { ReferenceDetails } from "@/components/ui/reference-details"
810

9-
<BlockInfoCard
10-
type="affinity"
11-
color="#1B1C1E"
12-
/>
1311

1412
{/* MANUAL-CONTENT-START:intro */}
1513
[Affinity](https://www.affinity.co/) is a CRM for companies, people, opportunities, and relationship data. Its v2 integration reads companies, people, opportunities, lists, interactions, and transcripts; creates lists and reminders; manages notes; and updates field values and dropdown options.
@@ -26,7 +24,6 @@ Generate an API key from the **Manage Apps** page in your Affinity settings; it
2624
Some Affinity endpoints are still marked BETA — company, person, and list-entry search, the per-entity field-value reads, the inferred-connection operations, and the user operations. Affinity may change those without notice or versioning.
2725
{/* MANUAL-CONTENT-END */}
2826

29-
3027
## Use the block [#usage-instructions]
3128

3229
Read companies, people, opportunities, lists, and saved views; search companies, people, and list entries. Page through the rows of a list or saved view. Read field values and update them individually or in batches of up to 100 on one company, person, or list entry. Read, create, update, delete, and reply to notes; list or create reminders; retrieve logged calls, emails, chat messages, meetings, and transcripts. Search notes and files by keyword, find companies from a plain-language description with Semantic Search, discover possible introduction paths through shared work and investment history, and follow the field-value change feed for incremental synchronization. Access depends on the API key holder’s permissions.

‎apps/docs/content/docs/integrations/agentmail.mdx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
---
22
title: AgentMail
33
description: Manage email inboxes, threads, and messages with AgentMail
4+
integration:
5+
type: "agentmail"
6+
color: "#000000"
47
---
58

6-
import { BlockInfoCard } from "@/components/ui/block-info-card"
79
import { ReferenceDetails } from "@/components/ui/reference-details"
810

9-
<BlockInfoCard
10-
type="agentmail"
11-
color="#000000"
12-
/>
1311

1412
{/* MANUAL-CONTENT-START:intro */}
1513
[AgentMail](https://agentmail.to/) connects Sim workflows to email inboxes using an API key. Create inboxes, send and read messages, reply to or forward conversations, manage drafts, and apply labels to threads and messages. For review-before-send workflows, create a draft, update it with the reviewed content, then send it.
1614
{/* MANUAL-CONTENT-END */}
1715

18-
1916
## Use the block [#usage-instructions]
2017

2118
Create and manage email inboxes, send and receive messages, reply to threads, manage drafts, and organize threads with labels. Requires an API key.

‎apps/docs/content/docs/integrations/agentphone.mdx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
---
22
title: AgentPhone
33
description: Provision numbers, send SMS and iMessage, and place voice calls with AgentPhone
4+
integration:
5+
type: "agentphone"
6+
color: "linear-gradient(135deg, #1a1a1a 0%, #0a2a14 100%)"
47
---
58

6-
import { BlockInfoCard } from "@/components/ui/block-info-card"
79
import { ReferenceDetails } from "@/components/ui/reference-details"
810

9-
<BlockInfoCard
10-
type="agentphone"
11-
color="linear-gradient(135deg, #1a1a1a 0%, #0a2a14 100%)"
12-
/>
1311

1412
{/* MANUAL-CONTENT-START:intro */}
1513
Use [AgentPhone](https://agentphone.to/) to provision phone numbers, place outbound voice calls, send SMS or iMessage, and manage contacts and conversations from a workflow. Connect with an AgentPhone API key.
1614

1715
Retrieve call transcripts and conversation history for downstream processing, and check usage before starting more calls or messages.
1816
{/* MANUAL-CONTENT-END */}
1917

20-
2118
## Use the block [#usage-instructions]
2219

2320
Provision SMS- and voice-enabled numbers, send messages and tapback reactions, place outbound calls, manage conversations and contacts, and inspect usage with an AgentPhone API key.

‎apps/docs/content/docs/integrations/agiloft.mdx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
---
22
title: Agiloft
33
description: Manage records in Agiloft CLM
4+
integration:
5+
type: "agiloft"
6+
color: "#001028"
47
---
58

6-
import { BlockInfoCard } from "@/components/ui/block-info-card"
79
import { ReferenceDetails } from "@/components/ui/reference-details"
810

9-
<BlockInfoCard
10-
type="agiloft"
11-
color="#001028"
12-
/>
1311

1412
{/* MANUAL-CONTENT-START:intro */}
1513
[Agiloft](https://www.agiloft.com/) stores records in knowledge-base tables. Use this integration to find, create, update, and delete records, work with attachments, manage record locks, and run action buttons. Select the target knowledge base and table for each operation; the action reference below lists its required fields.
1614
{/* MANUAL-CONTENT-END */}
1715

18-
1916
## Use the block [#usage-instructions]
2017

2118
Integrate with Agiloft contract lifecycle management to create, read, update, delete, and search records. Supports file attachments, SQL-based selection, saved searches, record locking, and running action buttons across any table in your knowledge base.

0 commit comments

Comments
 (0)