Skip to content

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

Format api sections

Terry Suttone6bc954a9def
diff --git a/packages/ui/index.tsx b/packages/ui/index.tsx
index 772f434d345..3edb9ec62c3 100644
--- a/packages/ui/index.tsx
+++ b/packages/ui/index.tsx
@@ -305,6 +305,7 @@ export * from './src/components/Icon/icons/IconSun'
export * from './src/components/Icon/icons/IconSunrise'
export * from './src/components/Icon/icons/IconSunset'
export * from './src/components/Icon/icons/IconTablet'
+export * from './src/components/Icon/icons/IconTable'
export * from './src/components/Icon/icons/IconTag'
export * from './src/components/Icon/icons/IconTarget'
export * from './src/components/Icon/icons/IconTerminal'
diff --git a/packages/ui/internals/icons.js b/packages/ui/internals/icons.js
index 07a7f0e5539..1cde50bfbd9 100644
--- a/packages/ui/internals/icons.js
+++ b/packages/ui/internals/icons.js
@@ -234,6 +234,7 @@ export default {
IconSunrise: 'src/components/Icon/icons/IconSunrise/index.tsx',
IconSunset: 'src/components/Icon/icons/IconSunset/index.tsx',
IconTablet: 'src/components/Icon/icons/IconTablet/index.tsx',
+ IconTable: 'src/components/Icon/icons/IconTable/index.tsx',
IconTag: 'src/components/Icon/icons/IconTag/index.tsx',
IconTarget: 'src/components/Icon/icons/IconTarget/index.tsx',
IconTerminal: 'src/components/Icon/icons/IconTerminal/index.tsx',
@@ -284,5 +285,5 @@ export default {
IconZapOff: 'src/components/Icon/icons/IconZapOff/index.tsx',
IconZap: 'src/components/Icon/icons/IconZap/index.tsx',
IconZoomIn: 'src/components/Icon/icons/IconZoomIn/index.tsx',
- IconZoomOut: 'src/components/Icon/icons/IconZoomOut/index.tsx'
-}
\ No newline at end of file
+ IconZoomOut: 'src/components/Icon/icons/IconZoomOut/index.tsx',
+}
diff --git a/packages/ui/internals/icons.json b/packages/ui/internals/icons.json
index 992be561d20..a348ede4cf5 100644
--- a/packages/ui/internals/icons.json
+++ b/packages/ui/internals/icons.json
@@ -939,6 +939,10 @@
"name": "Tablet",
"path": "react-feather/dist/icons/tablet"
},
+ "Table": {
+ "name": "Table",
+ "path": "react-feather/dist/icons/table"
+ },
"Tag": {
"name": "Tag",
"path": "react-feather/dist/icons/tag"
diff --git a/packages/ui/src/components/Icon/IconImportHandler.tsx b/packages/ui/src/components/Icon/IconImportHandler.tsx
index 0d158b428c6..3863d419700 100644
--- a/packages/ui/src/components/Icon/IconImportHandler.tsx
+++ b/packages/ui/src/components/Icon/IconImportHandler.tsx
@@ -241,6 +241,7 @@ export const Sun: Icon = require(`react-feather/dist/icons/sun`)
export const Sunrise: Icon = require(`react-feather/dist/icons/sunrise`)
export const Sunset: Icon = require(`react-feather/dist/icons/sunset`)
export const Tablet: Icon = require(`react-feather/dist/icons/tablet`)
+export const Table: Icon = require(`react-feather/dist/icons/table`)
export const Tag: Icon = require(`react-feather/dist/icons/tag`)
export const Target: Icon = require(`react-feather/dist/icons/target`)
export const Terminal: Icon = require(`react-feather/dist/icons/terminal`)
diff --git a/packages/ui/src/components/Icon/icons/index.tsx b/packages/ui/src/components/Icon/icons/index.tsx
index 9fc2134a5a7..5975707ac72 100644
--- a/packages/ui/src/components/Icon/icons/index.tsx
+++ b/packages/ui/src/components/Icon/icons/index.tsx
@@ -234,6 +234,7 @@ export * as IconSun from './IconSun'
export * as IconSunrise from './IconSunrise'
export * as IconSunset from './IconSunset'
export * as IconTablet from './IconTablet'
+export * as IconTable from './IconTable'
export * as IconTag from './IconTag'
export * as IconTarget from './IconTarget'
export * as IconTerminal from './IconTerminal'
diff --git a/studio/components/interfaces/Docs/ResourceContent.tsx b/studio/components/interfaces/Docs/ResourceContent.tsx
index a37ed884081..784b5018793 100644
--- a/studio/components/interfaces/Docs/ResourceContent.tsx
+++ b/studio/components/interfaces/Docs/ResourceContent.tsx
@@ -2,6 +2,7 @@ import Snippets from 'components/to-be-cleaned/Docs/Snippets'
import CodeSnippet from 'components/to-be-cleaned/Docs/CodeSnippet'
import Param from 'components/to-be-cleaned/Docs/Param'
import Description from 'components/to-be-cleaned/Docs/Description'
+import { IconTable } from 'ui'
const ResourceContent = ({
autoApiService,
@@ -29,12 +30,18 @@ const ResourceContent = ({
return (
<>
- <h2 className="text-scale-1200mt-0">
- <span className="px-6 py-2 text-2xl">{resourceId}</span>
+ <h2 className="text-scale-1200 mt-0 flex items-center px-6 gap-2">
+ <span className="bg-slate-300 dark:bg-slate-400 p-2 rounded-lg">
+ <IconTable size="small" />
+ </span>
+ <span className="text-2xl font-bold">{resourceId}</span>
</h2>
<div className="doc-section">
- <article className="text ">
+ <article className="text">
+ <label className="font-mono text-xs uppercase text-scale-900 inline-block mb-2">
+ Description
+ </label>
<Description
content={description}
metadata={{ table: resourceId }}
@@ -87,8 +94,8 @@ const ResourceContent = ({
To read rows in <code>{resourceId}</code>, use the <code>select</code> method.
</p>
<p>
- <a href="https://supabase.com/docs/client/select" target="_blank">
- Learn more.
+ <a href="https://supabase.com/docs/reference/javascript/select" target="_blank">
+ Learn more
</a>
</p>
</article>
@@ -120,8 +127,11 @@ const ResourceContent = ({
<h4 className="mt-0 text-white">Filtering</h4>
<p>Supabase provides a wide range of filters.</p>
<p>
- <a href="https://supabase.com/docs/client/using-filters" target="_blank">
- Learn more.
+ <a
+ href="https://supabase.com/docs/reference/javascript/using-filters"
+ target="_blank"
+ >
+ Learn more
</a>
</p>
</article>
@@ -147,8 +157,8 @@ const ResourceContent = ({
<code>insert</code> will also return the replaced values for UPSERT.
</p>
<p>
- <a href="https://supabase.com/docs/client/insert" target="_blank">
- Learn more.
+ <a href="https://supabase.com/docs/reference/javascript/insert" target="_blank">
+ Learn more
</a>
</p>
</article>
@@ -183,8 +193,8 @@ const ResourceContent = ({
<code>update</code> will also return the replaced values for UPDATE.
</p>
<p>
- <a href="https://supabase.com/docs/client/update" target="_blank">
- Learn more.
+ <a href="https://supabase.com/docs/reference/javascript/update" target="_blank">
+ Learn more
</a>
</p>
</article>
@@ -207,8 +217,8 @@ const ResourceContent = ({
default, so remember to specify your filters!
</p>
<p>
- <a href="https://supabase.com/docs/client/delete" target="_blank">
- Learn more.
+ <a href="https://supabase.com/docs/reference/javascript/delete" target="_blank">
+ Learn more
</a>
</p>
</article>
@@ -230,8 +240,8 @@ const ResourceContent = ({
users depending on Row Level Security (RLS) policies.
</p>
<p>
- <a href="https://supabase.com/docs/client/subscribe" target="_blank">
- Learn more.
+ <a href="https://supabase.com/docs/reference/javascript/subscribe" target="_blank">
+ Learn more
</a>
</p>
</article>
diff --git a/studio/components/to-be-cleaned/Docs/Pages/Introduction.js b/studio/components/to-be-cleaned/Docs/Pages/Introduction.js
index 30e24301034..ed3e73462c0 100644
--- a/studio/components/to-be-cleaned/Docs/Pages/Introduction.js
+++ b/studio/components/to-be-cleaned/Docs/Pages/Introduction.js
@@ -5,7 +5,7 @@ export default function Introduction({ autoApiService, selectedLang }) {
return (
<>
<h2 className="doc-heading">Introduction</h2>
- <div className="doc-section">
+ <div className="doc-section doc-section--introduction">
<article className="text ">
<p>
This API provides an easy way to integrate with your Postgres database. The API
diff --git a/studio/components/to-be-cleaned/Docs/Param.js b/studio/components/to-be-cleaned/Docs/Param.js
deleted file mode 100644
index 9abb36712f8..00000000000
--- a/studio/components/to-be-cleaned/Docs/Param.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Badge } from 'ui'
-import Description from './Description'
-
-const Param = ({
- name,
- type,
- format,
- required,
- description,
- metadata = {},
- onDesciptionUpdated = () => {},
-}) => {
- return (
- <>
- <div className="mb-4 flex items-center justify-between ">
- <code className="inline-block px-2">{name}</code>
- <Badge color={required ? 'amber' : 'scale'}>{required ? 'Required' : 'Optional'}</Badge>
- </div>
- {format && format != type && (
- <div className="mb-4 flex items-center gap-2">
- <label className="font-mono text-xs uppercase text-scale-900">Format:</label>
- <code className="px-2">{format}</code>
- {type}
- </div>
- )}
- {description !== false && (
- <>
- <label className="font-mono text-xs uppercase text-scale-900">Description</label>
- <Description content={description} metadata={metadata} onChange={onDesciptionUpdated} />
- </>
- )}
- </>
- )
-}
-export default Param
diff --git a/studio/styles/ui.scss b/studio/styles/ui.scss
index 16a1284fc6b..d4515a3f090 100644
--- a/studio/styles/ui.scss
+++ b/studio/styles/ui.scss
@@ -224,6 +224,12 @@
@apply border-b flex border-scale-500;
}
+ .doc-section--introduction {
+ .text {
+ width: 85%;
+ }
+ }
+
.doc-section article:first-child {
@apply prose prose-docs prose-sm max-w-none;
}
@@ -239,7 +245,7 @@
a {
@apply transition;
}
-
+
a:hover {
@apply text-brand-1000;
}
@@ -333,4 +339,4 @@
.pitr-listbox {
@apply md:gap-x-2;
-}
\ No newline at end of file
+}