From d74d183d304699afcecd524a817d929eccf712dc Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sun, 22 Mar 2026 13:44:51 -0700 Subject: [PATCH 1/2] Add TypeScript AppHost support to PostgreSQL integration docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add TypeScript examples throughout postgres-host.mdx using synced C#/TS tabs - Restructure postgres-get-started.mdx with separate C#/TypeScript quickstart paths - Add new SyncedPivotSelector component to sync pivot selector with Starlight tabs - Add new 'Connect to PostgreSQL' page with language-neutral connection reference (JavaScript, Python, Go, .NET examples) - Move connection properties and env var reference from host page to connect page - Mark client integration as .NET-specific in sidebar and page content - Add aspire add postgres to both C# and TypeScript installation sections - Show aspire.config.json update in TypeScript installation examples - Rename 'Using with non-.NET applications' to neutral language - Fix sidebar not auto-expanding current page group after SidebarPersister restore - Fix typo: confgure β†’ configure in postgres-host description Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../config/sidebar/integrations.topics.ts | 6 +- .../src/components/SyncedPivotSelector.astro | 107 +++++ .../src/components/starlight/Sidebar.astro | 13 + .../databases/postgres/postgres-client.mdx | 33 +- .../databases/postgres/postgres-connect.mdx | 228 +++++++++ .../postgres/postgres-get-started.mdx | 326 ++++++++----- .../databases/postgres/postgres-host.mdx | 447 ++++++++++++------ 7 files changed, 871 insertions(+), 289 deletions(-) create mode 100644 src/frontend/src/components/SyncedPivotSelector.astro create mode 100644 src/frontend/src/content/docs/integrations/databases/postgres/postgres-connect.mdx diff --git a/src/frontend/config/sidebar/integrations.topics.ts b/src/frontend/config/sidebar/integrations.topics.ts index b48da3169..231a8d50e 100644 --- a/src/frontend/config/sidebar/integrations.topics.ts +++ b/src/frontend/config/sidebar/integrations.topics.ts @@ -1200,7 +1200,11 @@ export const integrationTopics: StarlightSidebarTopicsUserConfig = { slug: 'integrations/databases/postgres/postgres-host', }, { - label: 'Client integration (Your app)', + label: 'Connect to PostgreSQL', + slug: 'integrations/databases/postgres/postgres-connect', + }, + { + label: 'Client integration (.NET)', slug: 'integrations/databases/postgres/postgres-client', }, { diff --git a/src/frontend/src/components/SyncedPivotSelector.astro b/src/frontend/src/components/SyncedPivotSelector.astro new file mode 100644 index 000000000..2bd0a086f --- /dev/null +++ b/src/frontend/src/components/SyncedPivotSelector.astro @@ -0,0 +1,107 @@ +--- +import PivotSelector from '@components/PivotSelector.astro'; + +interface Option { + id: string; + title: string; + disabled?: boolean; +} + +interface Props { + key: string; + syncKey: string; + options: Option[]; + title?: string; + marginTop?: number | null; +} + +const { key, syncKey, options, title, marginTop } = Astro.props; +const optionLabels = Object.fromEntries(options.map(({ id, title }) => [id, title])); +--- + + + + diff --git a/src/frontend/src/components/starlight/Sidebar.astro b/src/frontend/src/components/starlight/Sidebar.astro index ed734941c..0c84b22ac 100644 --- a/src/frontend/src/components/starlight/Sidebar.astro +++ b/src/frontend/src/components/starlight/Sidebar.astro @@ -86,6 +86,19 @@ const referenceOverviewHref = `${base}${localePrefix}/reference/overview/`; + {isApiRefPage && (