mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## What kind of change does this PR introduce? UI ## What is the current behavior? GitHub’s empty state and Integrations icon spacing do not match the PrivateLink list. Add connection has no plus. PrivateLink rows use a kebab instead of click-to-view. ## What is the new behavior? GitHub empty state matches the connections list. **Connect GitHub** is tiny and asks you to connect before choosing a repo. Section icons align. **Add connection** has a plus. PrivateLink rows are clickable; delete stays in the sheet. | Before | After | | --- | --- | | <img width="1456" height="1508" alt="CleanShot 2026-08-14 at 12 48 48@2x" src="https://github.com/user-attachments/assets/27485e35-c24f-478e-8328-aad03ebb1dfb" /> | <img width="1468" height="1494" alt="CleanShot 2026-08-14 at 14 22 19@2x" src="https://github.com/user-attachments/assets/056e3b48-4542-4be5-9b21-4b5abd726e8e" /> | ## Additional context Stacked on #49087. No Vercel card work in this PR. See #49030 for the end state, as it may already include fixes you might propose. ## To test - **Project Settings → Integrations.** Check GitHub, Vercel, and PrivateLink icon alignment. - GitHub not connected: description should say **Connect GitHub to link a repository to this project.** Button should be tiny. - If GitHub has no repo (org page), the empty state should ask you to add a connection. - PrivateLink **Add connection** should show a plus. Click a connection row to view it. No kebab. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * AWS PrivateLink connections now display clearer titles, status, replica details, and database visibility. * GitHub organization integrations now provide improved empty states and clearer connection actions. * Added plus icons to connection buttons. * **Improvements** * Updated GitHub guidance based on authorization and repository selection status. * Standardized connection labels and refined integration page layouts. * Improved AWS integration icon presentation and responsive upgrade prompts. * **Bug Fixes** * Simplified default connection button wording across integrations. * Improved AWS account title fallback behavior when a nickname is unavailable. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
38 lines
1.4 KiB
TypeScript
38 lines
1.4 KiB
TypeScript
import { Badge } from 'ui'
|
|
|
|
import { getConnectionStatusUi, getConnectionTitle } from './AWSPrivateLink.utils'
|
|
import { ResourceItem } from '@/components/ui/Resource/ResourceItem'
|
|
import type { AWSAccount } from '@/data/aws-accounts/aws-accounts-query'
|
|
import { formatDatabaseID } from '@/data/read-replicas/replicas.utils'
|
|
|
|
export const AWSPrivateLinkAccountItem = ({
|
|
account,
|
|
onView,
|
|
}: {
|
|
account: AWSAccount
|
|
onView: () => void
|
|
}) => {
|
|
const { account_name, aws_account_id, database_identifier, database_type, status } = account
|
|
const title = getConnectionTitle({ account_name, aws_account_id })
|
|
const statusUi = getConnectionStatusUi(status)
|
|
const replicaId = database_identifier ? formatDatabaseID(database_identifier) : undefined
|
|
const showDatabase = database_type === 'READ_REPLICA' || title === aws_account_id
|
|
const databaseLabel =
|
|
database_type === 'READ_REPLICA'
|
|
? `Read replica${replicaId ? ` (ID: ${replicaId})` : ''}`
|
|
: 'Primary database'
|
|
|
|
return (
|
|
<ResourceItem
|
|
onClick={onView}
|
|
className="border-b! last:border-b-0!"
|
|
meta={<Badge variant={statusUi.badgeVariant}>{statusUi.badge}</Badge>}
|
|
>
|
|
<div className="min-w-0">
|
|
<div className="font-medium text-foreground truncate">{title}</div>
|
|
{showDatabase && <p className="text-xs text-foreground-lighter">{databaseLabel}</p>}
|
|
</div>
|
|
</ResourceItem>
|
|
)
|
|
}
|