Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore(studio): improve inline code styling (#40724)

Danny Whited653617cdd59
diff --git a/apps/design-system/config/docs.ts b/apps/design-system/config/docs.ts
index c517b8a066c..834cb30c460 100644
--- a/apps/design-system/config/docs.ts
+++ b/apps/design-system/config/docs.ts
@@ -25,6 +25,11 @@ export const docsConfig: DocsConfig = {
href: '/docs/color-usage',
items: [],
},
+ {
+ title: 'Typography',
+ href: '/docs/typography',
+ items: [],
+ },
{
title: 'Theming',
href: '/docs/theming',
@@ -36,9 +41,9 @@ export const docsConfig: DocsConfig = {
items: [],
},
{
- items: [],
- href: '/docs/ui-patterns/accessibility',
title: 'Accessibility',
+ href: '/docs/accessibility',
+ items: [],
},
],
},
diff --git a/apps/design-system/content/docs/ui-patterns/accessibility.mdx b/apps/design-system/content/docs/accessibility.mdx
similarity index 100%
rename from apps/design-system/content/docs/ui-patterns/accessibility.mdx
rename to apps/design-system/content/docs/accessibility.mdx
diff --git a/apps/design-system/content/docs/typography.mdx b/apps/design-system/content/docs/typography.mdx
new file mode 100644
index 00000000000..d6c36ca61c3
--- /dev/null
+++ b/apps/design-system/content/docs/typography.mdx
@@ -0,0 +1,15 @@
+---
+title: Typography
+description: An overview of all available typography CSS variables.
+---
+
+Some reusable patterns work better as CSS variables, or “shorthands”, than as components. Typography is one of these cases, since its usage and context vary widely.
+
+The shorthands below are composed of core [Tailwind utility classes](../docs/tailwind-classes). You can view the full list of shorthands in [`typography.scss`](https://github.com/supabase/supabase/blob/master/apps/studio/styles/typography.scss).
+
+## Shorthands
+
+| Value | Usage |
+| ------------------ | ---------------------------------------------------------------------------- |
+| `text-code-inline` | Apply to a `code` element for inline code or similar custom inline content |
+| `text-brand-link` | Supabase green text that meets contrast requirements in light and dark modes |
diff --git a/apps/studio/components/grid/components/grid/GridError.tsx b/apps/studio/components/grid/components/grid/GridError.tsx
index 9999466ef57..824efe789e6 100644
--- a/apps/studio/components/grid/components/grid/GridError.tsx
+++ b/apps/studio/components/grid/components/grid/GridError.tsx
@@ -84,7 +84,7 @@ const InvalidSyntaxError = ({ error }: { error?: any }) => {
Verify that your filter values are correct before applying the filters again.
</p>
<p className="text-sm text-foreground-lighter prose max-w-full !mb-4">
- Error: <code className="text-xs">{error.message}</code>
+ Error: <code className="text-code-inline">{error.message}</code>
</p>
<Button type="default" onClick={() => onApplyFilters([])}>
@@ -117,7 +117,7 @@ const InvalidOrderingOperatorError = ({ error }: { error: any }) => {
again.
</p>
<p className="text-sm text-foreground-lighter prose max-w-full !mb-4">
- Error: <code className="text-xs">{error.message}</code>
+ Error: <code className="text-code-inline">{error.message}</code>
</p>
<Button type="default" onClick={() => onApplySorts([])}>
diff --git a/apps/studio/components/interfaces/Advisors/EnableRuleModal.tsx b/apps/studio/components/interfaces/Advisors/EnableRuleModal.tsx
index 10f55aabad5..571735b0e3a 100644
--- a/apps/studio/components/interfaces/Advisors/EnableRuleModal.tsx
+++ b/apps/studio/components/interfaces/Advisors/EnableRuleModal.tsx
@@ -48,7 +48,7 @@ export const EnableRuleModal = ({ lint, rule }: EnableRuleModalProps) => {
</DialogTrigger>
<DialogContent size="small">
<DialogHeader>
- <DialogTitle>Confirm to enable rule</DialogTitle>
+ <DialogTitle>Enable rule</DialogTitle>
</DialogHeader>
<DialogSectionSeparator />
<DialogSection>
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx
index 748ec6cec44..036990b4a67 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/CLSPreview.tsx
@@ -27,7 +27,7 @@ export const CLSPreview = () => {
<WarningIcon />
<AlertTitle_Shadcn_>
Changes to column privileges will not be reflected in migrations when running{' '}
- <code className="text-xs">supabase db diff</code>.
+ <code className="text-code-inline">supabase db diff</code>.
</AlertTitle_Shadcn_>
<AlertDescription_Shadcn_>
Column privileges are not supported in the current version of the Supabase CLI.
diff --git a/apps/studio/components/interfaces/Auth/AuditLogsForm.tsx b/apps/studio/components/interfaces/Auth/AuditLogsForm.tsx
index 1b3a726bb0b..41eb312f2c0 100644
--- a/apps/studio/components/interfaces/Auth/AuditLogsForm.tsx
+++ b/apps/studio/components/interfaces/Auth/AuditLogsForm.tsx
@@ -128,9 +128,7 @@ export const AuditLogsForm = () => {
rel="noopener noreferrer"
href={`/project/${projectRef}/editor/${auditLogTable?.id}`}
>
- <code className="text-xs bg-surface-200 px-1 py-0.5 rounded">
- {AUDIT_LOG_ENTRIES_TABLE}
- </code>
+ <code className="text-code-inline">{AUDIT_LOG_ENTRIES_TABLE}</code>
</InlineLink>{' '}
table.
<br />
diff --git a/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm.tsx b/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm.tsx
index 109aee65947..4712b5f8914 100644
--- a/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm.tsx
+++ b/apps/studio/components/interfaces/Auth/BasicAuthSettingsForm.tsx
@@ -247,14 +247,15 @@ export const BasicAuthSettingsForm = () => {
<WarningIcon />
<div>
<AlertTitle_Shadcn_>
- Anonymous users will use the <code className="text-xs">authenticated</code>{' '}
- role when signing in
+ Anonymous users will use the{' '}
+ <code className="text-code-inline">authenticated</code> role when signing in
</AlertTitle_Shadcn_>
<AlertDescription_Shadcn_ className="flex flex-col gap-y-3">
<p>
As a result, anonymous users will be subjected to RLS policies that apply
- to the <code className="text-xs">public</code> and{' '}
- <code className="text-xs">authenticated</code> roles. We strongly advise{' '}
+ to the <code className="text-code-inline">public</code> and{' '}
+ <code className="text-code-inline">authenticated</code> roles. We strongly
+ advise{' '}
<Link
href={`/project/${projectRef}/auth/policies`}
className="text-foreground underline"
diff --git a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx
index dc48f93087b..36606b5113b 100644
--- a/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx
+++ b/apps/studio/components/interfaces/Auth/Policies/PolicyEditorPanel/PolicyDetailsV2.tsx
@@ -136,7 +136,7 @@ export const PolicyDetailsV2 = ({
<FormLabel_Shadcn_ className="flex items-center gap-x-4">
<p className="text-foreground-light text-sm">Table</p>
<p className="text-foreground-light text-sm">
- <code className="text-xs">on</code> clause
+ <code className="text-code-inline">on</code> clause
</p>
</FormLabel_Shadcn_>
{authContext === 'database' && (
@@ -225,7 +225,7 @@ export const PolicyDetailsV2 = ({
<FormLabel_Shadcn_ className="flex items-center gap-x-4">
<p className="text-foreground-light text-sm">Policy Behavior</p>
<p className="text-foreground-light text-sm">
- <code className="text-xs">as</code> clause
+ <code className="text-code-inline">as</code> clause
</p>
</FormLabel_Shadcn_>
<FormControl_Shadcn_>
@@ -267,7 +267,7 @@ export const PolicyDetailsV2 = ({
<FormLabel_Shadcn_ className="flex items-center gap-x-4">
<p className="text-foreground-light text-sm">Policy Command</p>
<p className="text-foreground-light text-sm">
- <code className="text-xs">for</code> clause
+ <code className="text-code-inline">for</code> clause
</p>
</FormLabel_Shadcn_>
<FormControl_Shadcn_>
@@ -308,7 +308,7 @@ export const PolicyDetailsV2 = ({
<FormLabel_Shadcn_ className="flex items-center gap-x-4">
<p className="text-foreground-light text-sm">Target Roles</p>
<p className="text-foreground-light text-sm">
- <code className="text-xs">to</code> clause
+ <code className="text-code-inline">to</code> clause
</p>
</FormLabel_Shadcn_>
<FormControl_Shadcn_>
diff --git a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx
index 18374b74843..87a1cfce488 100644
--- a/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx
+++ b/apps/studio/components/interfaces/BranchManagement/CreateBranchModal.tsx
@@ -564,7 +564,7 @@ export const CreateBranchModal = () => {
<p className="text-sm text-foreground-light">
{withData ? (
<>
- <code className="text-xs font-mono">{branchComputeSize.label}</code> compute
+ <code className="text-code-inline">{branchComputeSize.label}</code> compute
size is automatically selected to match your production branch. You may
downgrade after creation or pause the branch when not in use to save cost.
</>
diff --git a/apps/studio/components/interfaces/Database/ETL/UpdateVersionModal.tsx b/apps/studio/components/interfaces/Database/ETL/UpdateVersionModal.tsx
index 78439c97b4b..8881506bd43 100644
--- a/apps/studio/components/interfaces/Database/ETL/UpdateVersionModal.tsx
+++ b/apps/studio/components/interfaces/Database/ETL/UpdateVersionModal.tsx
@@ -125,11 +125,11 @@ export const UpdateVersionModal = ({
<div className="flex flex-col gap-y-2 mt-2 pb-2">
<div className="text-sm text-foreground prose max-w-full">
<p className="text-foreground-light mb-1">Current version:</p>{' '}
- <code className="text-xs">{currentVersionName ?? 'Unknown'}</code>
+ <code className="text-code-inline">{currentVersionName ?? 'Unknown'}</code>
</div>
<div className="text-sm text-foreground prose max-w-full">
<p className="text-foreground-light mb-1">New version:</p>{' '}
- <code className="text-xs">{newVersionName ?? 'Unknown'}</code>
+ <code className="text-code-inline">{newVersionName ?? 'Unknown'}</code>
</div>
</div>
</CollapsibleContent_Shadcn_>
diff --git a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx
index 2298b219e85..d8662ed7686 100644
--- a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx
+++ b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx
@@ -124,8 +124,8 @@ const EnableExtensionModal = ({ visible, extension, onCancel }: EnableExtensionM
size="small"
header={
<div className="flex items-baseline gap-2">
- <h5 className="text-foreground">Confirm to enable</h5>
- <code className="text-xs">{extension.name}</code>
+ <h5 className="text-foreground">Enable</h5>
+ <code className="text-code-inline">{extension.name}</code>
</div>
}
>
diff --git a/apps/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx b/apps/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
index 5ef24ae87f6..4b691f27578 100644
--- a/apps/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
+++ b/apps/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
@@ -96,7 +96,7 @@ export const HookList = ({
</Table.td>
<Table.td className="hidden xl:table-cell">
<p className="truncate" title={url}>
- <code className="font-mono text-xs">{method}</code>: {url}
+ <code className="text-code-inline">{method}</code>: {url}
</p>
</Table.td>
<Table.td className="text-right">
diff --git a/apps/studio/components/interfaces/Database/ProtectedSchemaWarning.tsx b/apps/studio/components/interfaces/Database/ProtectedSchemaWarning.tsx
index e5735bfbc51..c00c13ad14f 100644
--- a/apps/studio/components/interfaces/Database/ProtectedSchemaWarning.tsx
+++ b/apps/studio/components/interfaces/Database/ProtectedSchemaWarning.tsx
@@ -84,8 +84,8 @@ export const ProtectedSchemaWarning = ({
</p>
) : reason === 'fdw' && fdwType === 's3_vectors' ? (
<p>
- The <code className="text-xs">{schema}</code> schema is used by Supabase to connect to
- vector buckets and is read-only through the dashboard.
+ The <code className="text-code-inline">{schema}</code> schema is used by Supabase to
+ connect to vector buckets and is read-only through the dashboard.
</p>
) : (
<>
diff --git a/apps/studio/components/interfaces/Database/Tables/ColumnList.tsx b/apps/studio/components/interfaces/Database/Tables/ColumnList.tsx
index 27b48c39b1d..5bd11cf444f 100644
--- a/apps/studio/components/interfaces/Database/Tables/ColumnList.tsx
+++ b/apps/studio/components/interfaces/Database/Tables/ColumnList.tsx
@@ -152,10 +152,10 @@ export const ColumnList = ({
)}
</Table.td>
<Table.td>
- <code className="text-xs">{x.data_type}</code>
+ <code className="text-code-inline">{x.data_type}</code>
</Table.td>
<Table.td className="font-mono text-xs">
- <code className="text-xs">{x.format}</code>
+ <code className="text-code-inline">{x.format}</code>
</Table.td>
<Table.td className="font-mono text-xs">
{x.is_nullable ? (
diff --git a/apps/studio/components/interfaces/Database/Tables/TableList.tsx b/apps/studio/components/interfaces/Database/Tables/TableList.tsx
index 1a6ef0b3e63..4faae844bb4 100644
--- a/apps/studio/components/interfaces/Database/Tables/TableList.tsx
+++ b/apps/studio/components/interfaces/Database/Tables/TableList.tsx
@@ -427,7 +427,11 @@ export const TableList = ({
{x.rows !== undefined ? x.rows.toLocaleString() : '-'}
</TableCell>
<TableCell className="hidden text-right xl:table-cell">
- {x.size !== undefined ? <code className="text-xs">{x.size}</code> : '-'}
+ {x.size !== undefined ? (
+ <code className="text-code-inline">{x.size}</code>
+ ) : (
+ '-'
+ )}
</TableCell>
<TableCell className="hidden xl:table-cell text-center">
{(realtimePublication?.tables ?? []).find(
diff --git a/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsx b/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsx
index 49ca5fafef1..547289182f9 100644
--- a/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsx
+++ b/apps/studio/components/interfaces/Home/NewProjectPanel/APIKeys.tsx
@@ -152,8 +152,8 @@ export const APIKeys = () => {
<div className="space-y-2">
<p className="text-sm">API Key</p>
<div className="flex items-center space-x-1 -ml-1">
- <code className="text-xs">{anonKey?.name}</code>
- <code className="text-xs">public</code>
+ <code className="text-code-inline">{anonKey?.name}</code>
+ <code className="text-code-inline">public</code>
</div>
</div>
}
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/CreateCronJobSheet/CreateCronJobSheet.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/CreateCronJobSheet/CreateCronJobSheet.tsx
index c34a0ab0b9b..53e4232800d 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/CreateCronJobSheet/CreateCronJobSheet.tsx
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/CreateCronJobSheet/CreateCronJobSheet.tsx
@@ -366,8 +366,8 @@ export const CreateCronJobSheet = ({
// @ts-ignore
title={
<span>
- Enable <code className="text-xs w-min">pg_net</code> for HTTP requests or
- Edge Functions
+ Enable <code className="text-code-inline w-min">pg_net</code> for HTTP
+ requests or Edge Functions
</span>
}
description={
diff --git a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobPage.tsx b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobPage.tsx
index a27a755be20..c225df0f4cd 100644
--- a/apps/studio/components/interfaces/Integrations/CronJobs/CronJobPage.tsx
+++ b/apps/studio/components/interfaces/Integrations/CronJobs/CronJobPage.tsx
@@ -103,7 +103,7 @@ export const CronJobPage = () => {
with command{' '}
<Tooltip>
<TooltipTrigger asChild>
- <code className="text-xs font-mono bg-surface-200 px-1 py-0.5 rounded max-w-[200px] inline-block truncate align-bottom cursor-pointer">
+ <code className="text-code-inline max-w-[200px] inline-block truncate align-bottom cursor-pointer">
{job.command}
</code>
</TooltipTrigger>
diff --git a/apps/studio/components/interfaces/Integrations/Queues/QueueTab.tsx b/apps/studio/components/interfaces/Integrations/Queues/QueueTab.tsx
index d37a0a6edb2..9f18345295f 100644
--- a/apps/studio/components/interfaces/Integrations/Queues/QueueTab.tsx
+++ b/apps/studio/components/interfaces/Integrations/Queues/QueueTab.tsx
@@ -1,8 +1,8 @@
import { Lock, Paintbrush, PlusCircle, Trash2 } from 'lucide-react'
import Link from 'next/link'
+import { parseAsBoolean, useQueryState } from 'nuqs'
import { useMemo, useState } from 'react'
import { toast } from 'sonner'
-import { parseAsBoolean, useQueryState } from 'nuqs'
import { useParams } from 'common'
import { DeleteQueue } from 'components/interfaces/Integrations/Queues/SingleQueue/DeleteQueue'
@@ -269,7 +269,7 @@ You may opt to manage your queues via any Supabase client libraries or PostgREST
<ConfirmationModal
visible={rlsConfirmModalOpen}
- title="Confirm to enable Row Level Security"
+ title="Enable Row Level Security"
confirmLabel="Enable RLS"
confirmLabelLoading="Enabling RLS"
loading={isUpdatingTable}
diff --git a/apps/studio/components/interfaces/Integrations/Queues/QueuesSettings.tsx b/apps/studio/components/interfaces/Integrations/Queues/QueuesSettings.tsx
index 84aa3e82fb0..a7c3643025e 100644
--- a/apps/studio/components/interfaces/Integrations/Queues/QueuesSettings.tsx
+++ b/apps/studio/components/interfaces/Integrations/Queues/QueuesSettings.tsx
@@ -24,6 +24,7 @@ import { useTableUpdateMutation } from 'data/tables/table-update-mutation'
import { useTablesQuery } from 'data/tables/tables-query'
import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
+import { IS_PLATFORM } from 'lib/constants'
import {
Button,
Form_Shadcn_,
@@ -36,7 +37,6 @@ import {
import { Admonition } from 'ui-patterns'
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
-import { IS_PLATFORM } from 'lib/constants'
// [Joshen] Not convinced with the UI and layout but getting the functionality out first
@@ -214,22 +214,24 @@ export const QueuesSettings = () => {
<>
<p className="max-w-2xl">
When enabled, you will be able to use the following functions from the{' '}
- <code className="text-xs">{QUEUES_SCHEMA}</code> schema to manage your
- queues via any Supabase client library or PostgREST endpoints:
+ <code className="text-code-inline">{QUEUES_SCHEMA}</code> schema to
+ manage your queues via any Supabase client library or PostgREST
+ endpoints:
</p>
<p className="mt-2">
- <code className="text-xs">send</code>,{' '}
- <code className="text-xs">send_batch</code>,{' '}
- <code className="text-xs">read</code>,{' '}
- <code className="text-xs">pop</code>,
- <code className="text-xs">archive</code>, and{' '}
- <code className="text-xs">delete</code>
+ <code className="text-code-inline">send</code>,{' '}
+ <code className="text-code-inline">send_batch</code>,{' '}
+ <code className="text-code-inline">read</code>,{' '}
+ <code className="text-code-inline">pop</code>,
+ <code className="text-code-inline">archive</code>, and{' '}
+ <code className="text-code-inline">delete</code>
</p>
{!IS_PLATFORM ? (
<div className="mt-6 max-w-2xl">
When running Supabase locally with the CLI or self-hosting using
Docker Compose, you also need to update your configuration to expose
- the <code className="text-xs">{QUEUES_SCHEMA}</code> schema.
+ the <code className="text-code-inline">{QUEUES_SCHEMA}</code>{' '}
+ schema.
<br />
<TextLink
target="_blank"
@@ -269,7 +271,7 @@ export const QueuesSettings = () => {
{tablesWithoutRLS.map((x) => {
return (
<li key={x.name}>
- <code className="text-xs">{x.name.slice(2)}</code>
+ <code className="text-code-inline">{x.name.slice(2)}</code>
</li>
)
})}
@@ -291,27 +293,28 @@ export const QueuesSettings = () => {
<Admonition type="warning" className="mt-2">
<p>
Queues will be exposed and managed through the{' '}
- <code className="text-xs">{QUEUES_SCHEMA}</code> schema
+ <code className="text-code-inline">{QUEUES_SCHEMA}</code> schema
</p>
<p className="text-foreground-light">
Database functions will be created in the{' '}
- <code className="text-xs">{QUEUES_SCHEMA}</code> schema upon enabling.
- Call these functions via any Supabase client library or PostgREST
- endpoint to manage your queues. Permissions on individual queues can
- also be further managed through privileges and row level security (RLS).
+ <code className="text-code-inline">{QUEUES_SCHEMA}</code> schema upon
+ enabling. Call these functions via any Supabase client library or
+ PostgREST endpoint to manage your queues. Permissions on individual
+ queues can also be further managed through privileges and row level
+ security (RLS).
</p>
</Admonition>
)}
{formState.dirtyFields.enable && field.value === false && (
<Admonition type="warning" className="mt-2">
<p>
- The <code className="text-xs">{QUEUES_SCHEMA}</code> schema will be
- removed once disabled
+ The <code className="text-code-inline">{QUEUES_SCHEMA}</code> schema
+ will be removed once disabled
</p>
<p className="text-foreground-light">
Ensure that the database functions from the{' '}
- <code className="text-xs">{QUEUES_SCHEMA}</code> schema are not in use
- within your client applications before disabling.
+ <code className="text-code-inline">{QUEUES_SCHEMA}</code> schema are not
+ in use within your client applications before disabling.
</p>
</Admonition>
)}
@@ -347,7 +350,7 @@ export const QueuesSettings = () => {
<ConfirmationModal
visible={rlsConfirmModalOpen}
- title="Confirm to enable Row Level Security"
+ title="Enable Row Level Security"
confirmLabel="Enable RLS"
confirmLabelLoading="Enabling RLS"
loading={isUpdatingRls}
@@ -361,7 +364,7 @@ export const QueuesSettings = () => {
{tablesWithoutRLS.map((x) => {
return (
<li key={x.id}>
- <code className="text-xs">{x.name.slice(2)}</code>
+ <code className="text-code-inline">{x.name.slice(2)}</code>
</li>
)
})}
diff --git a/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsx b/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsx
index 14154c46689..0fa5c51edd0 100644
--- a/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsx
+++ b/apps/studio/components/interfaces/Integrations/Queues/SingleQueue/QueueSettings.tsx
@@ -243,7 +243,7 @@ export const QueueSettings = ({}: QueueSettingsProps) => {
{isExposed && (
<>
These will also determine access to each function available from the{' '}
- <code className="text-xs">pgmq_public</code> schema.
+ <code className="text-code-inline">pgmq_public</code> schema.
</>
)}
</SheetDescription>
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx
index 49798d20ef1..c3938d16115 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/CreateIcebergWrapperSheet.tsx
@@ -206,7 +206,7 @@ export const CreateIcebergWrapperSheet = ({
(values?.wrapper_name ?? '').length > 0 ? (
<>
Your wrapper's server name will be{' '}
- <code className="text-xs">{values.wrapper_name}_server</code>
+ <code className="text-code-inline">{values.wrapper_name}_server</code>
</>
) : (
''
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
index ec8b596be3d..ef74d887712 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/CreateWrapperSheet.tsx
@@ -220,7 +220,7 @@ export const CreateWrapperSheet = ({
(values?.wrapper_name ?? '').length > 0 ? (
<>
Your wrapper's server name will be{' '}
- <code className="text-xs">{values.wrapper_name}_server</code>
+ <code className="text-code-inline">{values.wrapper_name}_server</code>
</>
) : (
''
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/EditWrapperSheet.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/EditWrapperSheet.tsx
index d89f3729b50..60bc7bc8819 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/EditWrapperSheet.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/EditWrapperSheet.tsx
@@ -215,12 +215,12 @@ export const EditWrapperSheet = ({
values.wrapper_name !== initialValues.wrapper_name ? (
<>
Your wrapper's server name will be updated to{' '}
- <code className="text-xs">{values.wrapper_name}_server</code>
+ <code className="text-code-inline">{values.wrapper_name}_server</code>
</>
) : (
<>
Your wrapper's server name is{' '}
- <code className="text-xs">{values.wrapper_name}_server</code>
+ <code className="text-code-inline">{values.wrapper_name}_server</code>
</>
)
}
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/OverviewTab.tsx b/apps/studio/components/interfaces/Integrations/Wrappers/OverviewTab.tsx
index 5601ca56c8d..ecc85736351 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/OverviewTab.tsx
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/OverviewTab.tsx
@@ -92,8 +92,8 @@ export const WrapperOverviewTab = () => {
{wrapperMeta.minimumExtensionVersion}. You have version{' '}
{wrappersExtension?.installed_version} installed. Please{' '}
{databaseNeedsUpgrading && 'upgrade your database then '}update the extension by
- disabling and enabling the <code className="text-xs">wrappers</code> extension to
- create this wrapper.
+ disabling and enabling the <code className="text-code-inline">wrappers</code>{' '}
+ extension to create this wrapper.
</p>
<p className="text-warning">
Warning: Before reinstalling the wrapper extension, you must first remove all
diff --git a/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx b/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx
index 69fd74fed25..9a7b08f669a 100644
--- a/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx
+++ b/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx
@@ -116,7 +116,8 @@ export const SecurityOptions = ({
// @ts-ignore
description={
<>
- Query all tables in the <code className="text-xs">public</code> schema
+ Query all tables in the{' '}
+ <code className="text-code-inline">public</code> schema
</>
}
className="[&>div>div>p]:text-left [&>div>div>p]:text-xs"
@@ -132,7 +133,7 @@ export const SecurityOptions = ({
description={
<>
Query allowlisted tables in a dedicated{' '}
- <code className="text-xs">api</code> schema
+ <code className="text-code-inline">api</code> schema
</>
}
className="[&>div>div>p]:text-left [&>div>div>p]:text-xs"
diff --git a/apps/studio/components/interfaces/Realtime/RealtimeSettings.tsx b/apps/studio/components/interfaces/Realtime/RealtimeSettings.tsx
index 5f650013484..d67c11d4599 100644
--- a/apps/studio/components/interfaces/Realtime/RealtimeSettings.tsx
+++ b/apps/studio/components/interfaces/Realtime/RealtimeSettings.tsx
@@ -260,8 +260,10 @@ export const RealtimeSettings = () => {
<p className="prose max-w-full text-sm">
Private mode is {isSettingToPrivate ? 'being ' : ''}
enabled, but no RLS policies exists on the{' '}
- <code className="text-xs">realtime.messages</code> table.
- No messages will be received by users.
+ <code className="text-code-inline">
+ realtime.messages
+ </code>{' '}
+ table. No messages will be received by users.
</p>
<Button asChild type="default" className="mt-2">
diff --git a/apps/studio/components/interfaces/SQLEditor/RunQueryWarningModal.tsx b/apps/studio/components/interfaces/SQLEditor/RunQueryWarningModal.tsx
index 4a37804be1c..e902c67a991 100644
--- a/apps/studio/components/interfaces/SQLEditor/RunQueryWarningModal.tsx
+++ b/apps/studio/components/interfaces/SQLEditor/RunQueryWarningModal.tsx
@@ -51,8 +51,8 @@ export const RunQueryWarningModal = ({
<li className="grid pt-2 pb-3 px-4 gap-1">
<span className="font-bold">Query uses update without a where clause</span>
<span className="text-foreground-lighter">
- Without a <code className="text-xs">where</code> clause, this could update all rows
- in the table.
+ Without a <code className="text-code-inline">where</code> clause, this could update
+ all rows in the table.
</span>
</li>
)}
diff --git a/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx b/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx
index 3724aa3c5d3..9d4af853bf9 100644
--- a/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx
+++ b/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx
@@ -105,8 +105,8 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<DialogHeader>
<DialogTitle>Switch the default API schema</DialogTitle>
<DialogDescription>
- Expose a custom schema instead of the{' '}
- <code className="text-xs text-foreground">public</code> schema
+ Expose a custom schema instead of the <code className="text-code-inline">public</code>{' '}
+ schema
</DialogDescription>
</DialogHeader>
@@ -114,10 +114,10 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<DialogSection className="text-sm text-foreground-light">
<p>
- By default, the <code className="text-xs text-foreground">public</code> schema is used
- to generate API routes. In some cases, it's better to use a custom schema. This is
+ By default, the <code className="text-code-inline">public</code> schema is used to
+ generate API routes. In some cases, it's better to use a custom schema. This is
important if you use tools that generate tables in the{' '}
- <code className="text-xs text-foreground">public</code> schema to{' '}
+ <code className="text-code-inline">public</code> schema to{' '}
<span className="text-brand">prevent accidental exposure of data</span>.
</p>
<DocsButton
@@ -132,8 +132,7 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<Collapsible_Shadcn_>
<CollapsibleTrigger_Shadcn_ className="py-4 px-5 w-full flex items-center justify-between text-sm">
<p>
- 1. Create a custom <code className="text-xs text-foreground">api</code> schema and
- expose it
+ 1. Create a custom <code className="text-code-inline">api</code> schema and expose it
</p>
{hasAPISchema && isAPISchemaExposed ? (
<Check size={16} className="text-brand" />
@@ -147,10 +146,10 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<CollapsibleContent_Shadcn_ className="text-sm text-foreground-light flex flex-col gap-y-4">
<p className="mx-5">
Click the button below to create a new schema named{' '}
- <code className="text-xs text-foreground">api</code> and grant the{' '}
- <code className="text-xs text-foreground">anon</code> and{' '}
- <code className="text-xs text-foreground">authenticated</code> roles usage privileges
- on this schema. This schema will thereafter also be exposed to the Data API.
+ <code className="text-code-inline">api</code> and grant the{' '}
+ <code className="text-code-inline">anon</code> and{' '}
+ <code className="text-code-inline">authenticated</code> roles usage privileges on this
+ schema. This schema will thereafter also be exposed to the Data API.
</p>
<div className="px-5">
@@ -160,8 +159,8 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<div className="flex flex-col gap-y-2">
<p>
The following query will be run to create the{' '}
- <code className="text-xs text-foreground">api</code> schema , as well as to
- grant the necessary privileges to the respective roles
+ <code className="text-code-inline">api</code> schema , as well as to grant the
+ necessary privileges to the respective roles
</p>
<CodeBlock
language="sql"
@@ -195,11 +194,11 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<div className="flex flex-col gap-y-4 px-5 pb-4">
<p>
- Under these new settings, the <code className="text-xs text-foreground">anon</code>{' '}
- and <code className="text-xs text-foreground">authenticated</code> roles can execute
- functions defined in the <code className="text-xs text-foreground">api</code>{' '}
- schema, but they have no automatic permissions on any tables. On a table-by-table
- basis, you can grant them permissions by running the following command:
+ Under these new settings, the <code className="text-code-inline">anon</code> and{' '}
+ <code className="text-code-inline">authenticated</code> roles can execute functions
+ defined in the <code className="text-code-inline">api</code> schema, but they have
+ no automatic permissions on any tables. On a table-by-table basis, you can grant
+ them permissions by running the following command:
</p>
<CodeBlock
language="sql"
@@ -216,8 +215,8 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<Collapsible_Shadcn_>
<CollapsibleTrigger_Shadcn_ className="py-4 px-5 w-full flex items-center justify-between text-sm">
<p>
- 2. Remove the <code className="text-xs text-foreground">public</code> schema from the
- exposed schemas
+ 2. Remove the <code className="text-code-inline">public</code> schema from the exposed
+ schemas
</p>
{!isPublicSchemaExposed ? (
<Check size={16} className="text-brand" />
@@ -234,18 +233,18 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => {
<WarningIcon />
<AlertTitle_Shadcn_ className="text-foreground">
Ensure that your app is no longer using the{' '}
- <code className="text-xs text-foreground">public</code> schema
+ <code className="text-code-inline">public</code> schema
</AlertTitle_Shadcn_>
<AlertDescription_Shadcn_>
- The <code className="text-xs text-foreground">public</code> schema will not be
- accessible via the API once its not exposed. You should be using the{' '}
- <code className="text-xs text-foreground">api</code> schema instead.
+ The <code className="text-code-inline">public</code> schema will not be accessible
+ via the API once its not exposed. You should be using the{' '}
+ <code className="text-code-inline">api</code> schema instead.
</AlertDescription_Shadcn_>
</Alert_Shadcn_>
<p>
Click the button below to remove the{' '}
- <code className="text-xs text-foreground">public</code> schema from both Exposed
- schemas and Extra search path in your API configuration.
+ <code className="text-code-inline">public</code> schema from both Exposed schemas
+ and Extra search path in your API configuration.
</p>
<ButtonTooltip
type="primary"
diff --git a/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx b/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
index d37b7cafc27..a76ce0f469c 100644
--- a/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
+++ b/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx
@@ -248,7 +248,7 @@ export const PostgrestConfig = () => {
</p>
<p>
You will see errors from the Postgrest endpoint
- <code className="text-xs">/rest/v1/</code>.
+ <code className="text-code-inline">/rest/v1/</code>.
</p>
</AlertDescription_Shadcn_>
</Alert_Shadcn_>
@@ -316,14 +316,15 @@ export const PostgrestConfig = () => {
<>
<p className="prose text-sm">
You will not be able to query tables and views in the{' '}
- <code className="text-xs">public</code> schema via supabase-js
- or HTTP clients.
+ <code className="text-code-inline">public</code> schema via
+ supabase-js or HTTP clients.
</p>
{isGraphqlExtensionEnabled && (
<>
<p className="prose text-sm mt-2">
- Tables in the <code className="text-xs">public</code>{' '}
- schema are still exposed over our GraphQL endpoints.
+ Tables in the{' '}
+ <code className="text-code-inline">public</code> schema
+ are still exposed over our GraphQL endpoints.
</p>
<Button asChild type="default" className="mt-2">
<Link href={`/project/${projectRef}/database/extensions`}>
diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
index e4e2b5c90f5..a122e44d065 100644
--- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
+++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
@@ -217,12 +217,13 @@ const AddRestrictionModal = ({
{isValidCIDR ? (
<Modal.Content className="space-y-1">
<p className="text-sm">
- The address range <code className="text-xs">{normalizedAddress}</code> will be
- restricted
+ The address range <code className="text-code-inline">{normalizedAddress}</code>{' '}
+ will be restricted
</p>
<p className="text-sm text-foreground-light">
- Selected address space: <code className="text-xs">{addressRange.start}</code> to{' '}
- <code className="text-xs">{addressRange.end}</code>{' '}
+ Selected address space:{' '}
+ <code className="text-code-inline">{addressRange.start}</code> to{' '}
+ <code className="text-code-inline">{addressRange.end}</code>{' '}
</p>
<p className="text-sm text-foreground-light">
Number of addresses: {availableAddresses}
diff --git a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx
index d923b6e73e1..1cd9dd1671f 100644
--- a/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx
+++ b/apps/studio/components/interfaces/Settings/Database/NetworkRestrictions/RemoveRestrictionModal.tsx
@@ -68,8 +68,8 @@ const RemoveRestrictionModal = ({
>
<Modal.Content className="space-y-4">
<p className="text-sm text-foreground-light">
- The IPv4 address <code className="text-xs">{selectedRestriction}</code> will be removed
- from your list of network restrictions
+ The IPv4 address <code className="text-code-inline">{selectedRestriction}</code> will be
+ removed from your list of network restrictions
{isRemovingOnlyRestriction
? '.'
: ", and no longer have access to your project's database."}
diff --git a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainActivate.tsx b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainActivate.tsx
index 1065aeed401..d9b15525766 100644
--- a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainActivate.tsx
+++ b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainActivate.tsx
@@ -78,7 +78,8 @@ const CustomDomainActivate = ({ projectRef, customDomain }: CustomDomainActivate
<AlertDescription_Shadcn_>
<p className="col-span-12 text-sm lg:col-span-7 leading-6">
Your custom domain CNAME record for{' '}
- <code className="text-xs">{customDomain.hostname}</code> should resolve to{' '}
+ <code className="text-code-inline">{customDomain.hostname}</code> should resolve
+ to{' '}
{endpoint ? (
<code className="text-xs">{endpoint}</code>
) : (
diff --git a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainVerify.tsx b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainVerify.tsx
index 6560f2df3f9..44d1cea30a5 100644
--- a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainVerify.tsx
+++ b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainVerify.tsx
@@ -140,8 +140,8 @@ const CustomDomainVerify = () => {
</AlertTitle_Shadcn_>
<AlertDescription_Shadcn_>
Please add a CAA record allowing "digicert.com" to issue certificates for{' '}
- <code className="text-xs">{customDomain?.hostname}</code>. For example:{' '}
- <code className="text-xs">0 issue "digicert.com"</code>
+ <code className="text-code-inline">{customDomain?.hostname}</code>. For example:{' '}
+ <code className="text-code-inline">0 issue "digicert.com"</code>
</AlertDescription_Shadcn_>
</Alert_Shadcn_>
)}
diff --git a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx
index 69983e1ae4f..f04b1e9d179 100644
--- a/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx
+++ b/apps/studio/components/interfaces/Settings/General/CustomDomainConfig/CustomDomainsConfigureHostname.tsx
@@ -101,13 +101,13 @@ const CustomDomainsConfigureHostname = () => {
<p className="col-span-12 text-sm lg:col-span-7 leading-6">
Set up a CNAME record for{' '}
{values.domain ? (
- <code className="text-xs">{values.domain}</code>
+ <code className="text-code-inline">{values.domain}</code>
) : (
'your custom domain'
)}{' '}
resolving to{' '}
{endpoint ? (
- <code className="text-xs">{endpoint}</code>
+ <code className="text-code-inline">{endpoint}</code>
) : (
"your project's API URL"
)}{' '}
diff --git a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/TableRowComponent.tsx b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/TableRowComponent.tsx
index 7bda0f9e4b2..f422de03a43 100644
--- a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/TableRowComponent.tsx
+++ b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/AnalyticsBucketDetails/NamespaceWithTables/TableRowComponent.tsx
@@ -508,7 +508,7 @@ export const TableRowComponent = ({ table, schema, namespace }: TableRowComponen
variant="warning"
visible={showStartReplicationModal}
loading={isUpdatingReplication}
- title="Confirm to enable replication for table"
+ title="Enable replication for table"
confirmLabel="Enable replication"
onCancel={() => setShowStartReplicationModal(false)}
onConfirm={() => onConfirmStartReplication()}
diff --git a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/CreateAnalyticsBucketModal.tsx b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/CreateAnalyticsBucketModal.tsx
index fb64c16b2f2..8f497f50d61 100644
--- a/apps/studio/components/interfaces/Storage/AnalyticsBuckets/CreateAnalyticsBucketModal.tsx
+++ b/apps/studio/components/interfaces/Storage/AnalyticsBuckets/CreateAnalyticsBucketModal.tsx
@@ -2,11 +2,10 @@ import { zodResolver } from '@hookform/resolvers/zod'
import { PermissionAction } from '@supabase/shared-types/out/constants'
import { Plus } from 'lucide-react'
import { useRouter } from 'next/router'
-import { useState } from 'react'
+import { parseAsBoolean, useQueryState } from 'nuqs'
import { SubmitHandler, useForm } from 'react-hook-form'
import { toast } from 'sonner'
import z from 'zod'
-import { parseAsBoolean, useQueryState } from 'nuqs'
import { useParams } from 'common'
import { ButtonTooltip } from 'components/ui/ButtonTooltip'
@@ -262,8 +261,8 @@ export const CreateAnalyticsBucketModal = ({
title="Wrappers extension must be updated for Iceberg Wrapper support"
>
<p className="prose max-w-full text-sm !leading-normal">
- Update the <code className="text-xs">wrappers</code> extension by upgrading your
- project from your{' '}
+ Update the <code className="text-code-inline">wrappers</code> extension by
+ upgrading your project from your{' '}
<InlineLink href={`/project/${ref}/settings/infrastructure`}>
project settings
</InlineLink>{' '}
diff --git a/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx b/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
index 11fac7f273a..d4aea095088 100644
--- a/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
@@ -563,7 +563,7 @@ export const GridHeaderActions = ({ table, isRefetching }: GridHeaderActionsProp
<ConfirmModal
danger={table.rls_enabled}
visible={rlsConfirmModalOpen}
- title="Confirm to enable Row Level Security"
+ title="Enable Row Level Security"
description="Are you sure you want to enable Row Level Security for this table?"
buttonLabel="Enable RLS"
buttonLoadingLabel="Updating"
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
index dc918a77b07..297dd0d443c 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnType.tsx
@@ -277,15 +277,14 @@ const ColumnType = ({
<CriticalIcon />
<AlertTitle_Shadcn_>
{' '}
- It is recommended to use <code className="text-xs">
- {recommendation.alternative}
- </code>{' '}
- instead
+ It is recommended to use{' '}
+ <code className="text-code-inline">{recommendation.alternative}</code> instead
</AlertTitle_Shadcn_>
<AlertDescription_Shadcn_>
<p>
Postgres recommends against using the data type{' '}
- <code className="text-xs">{value}</code> unless you have a very specific use case.
+ <code className="text-code-inline">{value}</code> unless you have a very specific use
+ case.
</p>
<div className="flex items-center space-x-2 mt-3">
<Button asChild type="default" icon={<ExternalLink />}>
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
index be7eee6e8d1..c7bb451b9df 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.tsx
@@ -15,8 +15,8 @@ import { DocsButton } from 'components/ui/DocsButton'
import InformationBox from 'components/ui/InformationBox'
import { FOREIGN_KEY_CASCADE_ACTION } from 'data/database/database-query-constants'
import { useSchemasQuery } from 'data/database/schemas-query'
-import { useTablesQuery } from 'data/tables/tables-query'
import { useTablesQuery as useTableRetrieveQuery } from 'data/tables/table-retrieve-query'
+import { useTablesQuery } from 'data/tables/tables-query'
import { useQuerySchemaState } from 'hooks/misc/useSchemaQueryState'
import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject'
import { DOCS_URL } from 'lib/constants'
@@ -306,7 +306,7 @@ export const ForeignKeySelector = ({
<div className="flex flex-col gap-y-3">
<label className="text-foreground-light text-sm">
Select columns from{' '}
- <code className="text-xs">
+ <code className="text-code-inline">
{fk.schema}.{fk.table}
</code>{' '}
to reference to
@@ -421,9 +421,9 @@ export const ForeignKeySelector = ({
if (x === undefined) return null
return (
<li key={`type-error-${idx}`}>
- <code className="text-xs">{fk.columns[idx]?.source}</code> (
- {x.sourceType}) and{' '}
- <code className="text-xs">{fk.columns[idx]?.target}</code>(
+ <code className="text-code-inline">{fk.columns[idx]?.source}</code>{' '}
+ ({x.sourceType}) and{' '}
+ <code className="text-code-inline">{fk.columns[idx]?.target}</code>(
{x.targetType})
</li>
)
@@ -444,7 +444,9 @@ export const ForeignKeySelector = ({
return (
<li key={`type-error-${idx}`}>
<div className="flex items-center gap-x-1">
- <code className="text-xs">{fk.columns[idx]?.source}</code>{' '}
+ <code className="text-code-inline">
+ {fk.columns[idx]?.source}
+ </code>{' '}
<ArrowRight size={14} /> {x.targetType}
</div>
</li>
@@ -472,18 +474,18 @@ export const ForeignKeySelector = ({
</p>
<ul className="mt-2 list-disc pl-4 space-y-1">
<li>
- <code className="text-xs">Cascade</code>: if the referencing table
- represents something that is a component of what is represented by the
- referenced table and cannot exist independently
+ <code className="text-code-inline">Cascade</code>: if the referencing
+ table represents something that is a component of what is represented by
+ the referenced table and cannot exist independently
</li>
<li>
- <code className="text-xs">Restrict</code> or{' '}
- <code className="text-xs">No action</code>: if the two tables represent
- independent objects
+ <code className="text-code-inline">Restrict</code> or{' '}
+ <code className="text-code-inline">No action</code>: if the two tables
+ represent independent objects
</li>
<li>
- <code className="text-xs">Set NULL</code> or{' '}
- <code className="text-xs">Set default</code>: if a foreign-key
+ <code className="text-code-inline">Set NULL</code> or{' '}
+ <code className="text-code-inline">Set default</code>: if a foreign-key
relationship represents optional information
</li>
</ul>
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
index 09c68664520..fcb10df4f84 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
@@ -33,7 +33,7 @@ export const generateCascadeActionDescription = (
return (
<>
<span className="text-foreground-light">{actionName}</span>: {actionVerb} a record from{' '}
- <code className="text-xs text-foreground-light">{reference}</code> will{' '}
+ <code className="text-code-inline">{reference}</code> will{' '}
<span className="text-amber-900 opacity-75">raise an error</span> if there are records
existing in this table that reference it
</>
@@ -42,7 +42,7 @@ export const generateCascadeActionDescription = (
return (
<>
<span className="text-foreground-light">{actionName}</span>: {actionVerb} a record from{' '}
- <code className="text-xs text-foreground-light">{reference}</code> will{' '}
+ <code className="text-code-inline">{reference}</code> will{' '}
<span className="text-amber-900 opacity-75">also {action}</span> any records that
reference it in this table
</>
@@ -60,8 +60,7 @@ export const generateCascadeActionDescription = (
the transaction
</TooltipContent>
</Tooltip>
- : {actionVerb} a record from{' '}
- <code className="text-xs text-foreground-light">{reference}</code> will{' '}
+ : {actionVerb} a record from <code className="text-code-inline">{reference}</code> will{' '}
<span className="text-amber-900 opacity-75">prevent {actionVerb.toLowerCase()}</span>{' '}
existing referencing rows from this table.
</>
@@ -70,8 +69,8 @@ export const generateCascadeActionDescription = (
return (
<>
<span className="text-foreground-light">{actionName}</span>: {actionVerb} a record from{' '}
- <code className="text-xs text-foreground-light">{reference}</code> will set the value of
- any existing records in this table referencing it to their{' '}
+ <code className="text-code-inline">{reference}</code> will set the value of any existing
+ records in this table referencing it to their{' '}
<span className="text-amber-900 opacity-75">default value</span>
</>
)
@@ -79,8 +78,8 @@ export const generateCascadeActionDescription = (
return (
<>
<span className="text-foreground-light">{actionName}</span>: {actionVerb} a record from{' '}
- <code className="text-xs text-foreground-light">{reference}</code> will set the value of
- any existing records in this table referencing it{' '}
+ <code className="text-code-inline">{reference}</code> will set the value of any existing
+ records in this table referencing it{' '}
<span className="text-amber-900 opacity-75">to NULL</span>
</>
)
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/ForeignRowSelector.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/ForeignRowSelector.tsx
index 9b2c8d2f419..b5ea64cd868 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/ForeignRowSelector.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/ForeignRowSelector.tsx
@@ -165,7 +165,7 @@ const ForeignRowSelector = ({
header={
<div>
Select a record to reference from{' '}
- <code className="font-mono text-sm">
+ <code className="text-code-inline !text-sm">
{schemaName}.{tableName}
</code>
</div>
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImportPreview.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImportPreview.tsx
index bcd5239d338..182cfffa420 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImportPreview.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImportPreview.tsx
@@ -2,14 +2,14 @@ import { AlertCircle, ArrowRight, ChevronDown, ChevronRight } from 'lucide-react
import { useEffect, useState } from 'react'
import {
+ Alert_Shadcn_,
+ AlertDescription_Shadcn_,
+ AlertTitle_Shadcn_,
Badge,
Button,
cn,
Collapsible,
SidePanel,
- Alert_Shadcn_,
- AlertTitle_Shadcn_,
- AlertDescription_Shadcn_,
WarningIcon,
} from 'ui'
import type { SpreadsheetData } from './SpreadsheetImport.types'
@@ -195,7 +195,7 @@ export const SpreadsheetImportPreview = ({
<ul className="ml-2 list-disc">
{errorData.__parsed_extra.map((value: string, i: number) => (
<li key={i}>
- <code className="text-xs">{value}</code>
+ <code className="text-code-inline">{value}</code>
</li>
))}
</ul>
diff --git a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx
index c0c54d4d1cc..24bcc5dbbed 100644
--- a/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx
+++ b/apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ForeignKeysManagement/ForeignKeyRow.tsx
@@ -96,7 +96,7 @@ export const ForeignKeyRow = ({
{x.source || '[column_name]'}
</code>
<ArrowRight size={16} />
- <code className="text-xs">
+ <code className="text-code-inline">
{foreignKey.schema}.{foreignKey.table}.{x.target}
</code>
</div>
diff --git a/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx b/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx
index 71f99c36a12..1a22d603d91 100644
--- a/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx
+++ b/apps/studio/components/ui/ProjectSettings/DisplayApiSettings.tsx
@@ -127,21 +127,21 @@ export const DisplayApiSettings = ({
<FormLayout
layout="horizontal"
label={
- <>
+ <div className="flex items-center space-x-1">
{x.tags?.split(',').map((x, i: number) => (
- <code key={`${x}${i}`} className="text-xs text-code">
+ <code key={`${x}${i}`} className="text-code-inline">
{x}
</code>
))}
{x.tags === 'service_role' && (
<>
- <code className="text-xs text-code !bg-destructive !text-white !border-destructive">
+ <code className="text-code-inline !bg-destructive !text-white !border-destructive">
secret
</code>
</>
)}
- {x.tags === 'anon' && <code className="text-xs text-code">public</code>}
- </>
+ {x.tags === 'anon' && <code className="text-code-inline">public</code>}
+ </div>
}
description={
x.tags === 'service_role' ? (
diff --git a/apps/studio/pages/project/[ref]/database/column-privileges.tsx b/apps/studio/pages/project/[ref]/database/column-privileges.tsx
index a2921a2cd6c..6d28e88b2a3 100644
--- a/apps/studio/pages/project/[ref]/database/column-privileges.tsx
+++ b/apps/studio/pages/project/[ref]/database/column-privileges.tsx
@@ -239,7 +239,7 @@ const PrivilegesPage: NextPageWithLayout = () => {
<AlertCircle strokeWidth={2} />
<AlertTitle_Shadcn_>
Changes to column privileges will not be reflected in migrations when running{' '}
- <code className="text-xs">supabase db diff</code>.
+ <code className="text-code-inline">supabase db diff</code>.
</AlertTitle_Shadcn_>
<AlertDescription_Shadcn_>
Column privileges are not supported in the current version of the Supabase CLI.
@@ -269,10 +269,12 @@ const PrivilegesPage: NextPageWithLayout = () => {
If you remove a column privilege for a role, that role will lose all access to
that column.
<br />
- All operations selecting <code className="text-xs">*</code> (including{' '}
- <code className="text-xs">returning *</code> for{' '}
- <code className="text-xs">insert</code>, <code className="text-xs">update</code>
- , and <code className="text-xs">delete</code>) will fail.
+ All operations selecting <code className="text-code-inline">
+ *
+ </code> (including <code className="text-code-inline">returning *</code> for{' '}
+ <code className="text-code-inline">insert</code>,{' '}
+ <code className="text-code-inline">update</code>, and{' '}
+ <code className="text-code-inline">delete</code>) will fail.
</AlertDescription_Shadcn_>
<Button
type="outline"
diff --git a/apps/studio/styles/typography.scss b/apps/studio/styles/typography.scss
index b432fb93cdf..0f2d5569a77 100644
--- a/apps/studio/styles/typography.scss
+++ b/apps/studio/styles/typography.scss
@@ -79,6 +79,7 @@
@apply truncate cursor-pointer underline underline-offset-4 decoration-foreground-muted/50 hover:decoration-foreground-lighter/80 transition-colors duration-100;
}
+ // Pair with `code` elements for semantic consistency, e.g. <code className="text-code-inline">
.text-code-inline {
@apply break-all text-xs tracking-tight bg-surface-200 border border-muted rounded-md px-1 py-0.5 text-foreground font-medium;
}
diff --git a/packages/config/ui.config.js b/packages/config/ui.config.js
index e017c152208..836d8dba4c7 100644
--- a/packages/config/ui.config.js
+++ b/packages/config/ui.config.js
@@ -325,13 +325,6 @@ const uiConfig = {
// "[data-state='closed'] .accordion-content-animation": {
// animation: 'slideUp 200ms ease-in',
// },
- '.text-code': {
- margin: '0 0.2em',
- padding: '0.05em 0.4em 0.05em',
- background: 'hsla(0, 0%, 58.8%, 0.1)',
- border: '1px solid hsla(0, 0%, 39.2%, 0.2)',
- borderRadius: '3px',
- },
'.no-scrollbar': {
/* Hide scrollbar for IE, Edge*/
'-ms-overflow-style': 'none',
@@ -354,10 +347,10 @@ const uiConfig = {
'mask-image': 'linear-gradient(to left, white 98%, transparent 100%)',
},
'input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button':
- {
- '-webkit-appearance': 'none',
- margin: '0',
- },
+ {
+ '-webkit-appearance': 'none',
+ margin: '0',
+ },
})
addVariant('data-open-parent', '[data-state="open"] &')
addVariant('data-closed-parent', '[data-state="closed"] &')
diff --git a/packages/ui-patterns/src/Toc/toc.tsx b/packages/ui-patterns/src/Toc/toc.tsx
index 0b2e8159cf8..315048e9636 100644
--- a/packages/ui-patterns/src/Toc/toc.tsx
+++ b/packages/ui-patterns/src/Toc/toc.tsx
@@ -1,11 +1,11 @@
'use client'
-import type { TOCItemType } from './server/get-toc'
-import * as Primitive from './toc-primitive'
import { type ComponentProps, Fragment, type HTMLAttributes, type ReactNode, useRef } from 'react'
-import { TocThumb } from './toc-thumb'
import { cn, ScrollArea, ScrollViewport } from 'ui'
import { removeAnchor } from 'ui/src/components/CustomHTMLElements/CustomHTMLElements.utils'
+import type { TOCItemType } from './server/get-toc'
+import * as Primitive from './toc-primitive'
+import { TocThumb } from './toc-thumb'
export interface TOCProps {
/**
@@ -139,11 +139,7 @@ function TOCItem({ item }: { item: TOCItemType }) {
>
{formatTOCHeader(removeAnchor(item.title)).map((x, index) => (
<Fragment key={index}>
- {x.type === 'code' ? (
- <code className="text-xs border rounded bg-muted">{x.value}</code>
- ) : (
- x.value
- )}
+ {x.type === 'code' ? <code className="text-code-inline">{x.value}</code> : x.value}
</Fragment>
))}
</Primitive.TOCItem>