Skip to content

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

Chore/fix api preview columns (#18053)

Terry Sutton5396145494aa
diff --git a/studio/components/interfaces/Docs/Authentication.tsx b/studio/components/interfaces/Docs/Authentication.tsx
index d44b7b47ef5..c43a946d470 100644
--- a/studio/components/interfaces/Docs/Authentication.tsx
+++ b/studio/components/interfaces/Docs/Authentication.tsx
@@ -25,7 +25,7 @@ const Authentication = ({ autoApiService, selectedLang, showApiKey }: Authentica
<>
<h2 className="doc-heading">Authentication</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>Supabase works through a mixture of JWT and Key auth.</p>
<p>
If no <code>Authorization</code> header is included, the API will assume that you are
@@ -41,7 +41,7 @@ const Authentication = ({ autoApiService, selectedLang, showApiKey }: Authentica
<h2 className="doc-heading">Client API Keys</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Client keys allow "anonymous access" to your database, until the user has logged in.
After logging in the keys will switch to the user's own login token.
@@ -75,7 +75,7 @@ const Authentication = ({ autoApiService, selectedLang, showApiKey }: Authentica
<h2 className="doc-heading">Service Keys</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Service keys have FULL access to your data, bypassing any security policies. Be VERY
careful where you expose these keys. They should only be used on a server and never on a
diff --git a/studio/components/interfaces/Docs/GeneratingTypes.tsx b/studio/components/interfaces/Docs/GeneratingTypes.tsx
index b8482970623..35decdd404c 100644
--- a/studio/components/interfaces/Docs/GeneratingTypes.tsx
+++ b/studio/components/interfaces/Docs/GeneratingTypes.tsx
@@ -55,7 +55,7 @@ export default function GeneratingTypes({ selectedLang }: Props) {
</Link>
</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Supabase APIs are generated from your database, which means that we can use database
introspection to generate type-safe API definitions.
diff --git a/studio/components/interfaces/Docs/Pages/Rpc/Introduction.tsx b/studio/components/interfaces/Docs/Pages/Rpc/Introduction.tsx
index f700f772d8e..bc78b7ef7b6 100644
--- a/studio/components/interfaces/Docs/Pages/Rpc/Introduction.tsx
+++ b/studio/components/interfaces/Docs/Pages/Rpc/Introduction.tsx
@@ -3,7 +3,7 @@ const Introduction = () => {
<>
<h2 className="doc-heading">Introduction</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
All of your database stored procedures are available on your API. This means you can
build your logic directly into the database (if you're brave enough)!
diff --git a/studio/components/interfaces/Docs/Pages/Tables/Introduction.tsx b/studio/components/interfaces/Docs/Pages/Tables/Introduction.tsx
index dd15ec09ccc..499b9709810 100644
--- a/studio/components/interfaces/Docs/Pages/Tables/Introduction.tsx
+++ b/studio/components/interfaces/Docs/Pages/Tables/Introduction.tsx
@@ -15,7 +15,7 @@ const Introduction = ({ selectedLang }: IntroductionProps) => {
<>
<h2 className="doc-heading">Introduction</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
All views and tables in the <code>public</code> schema and accessible by the active
database role for a request are available for querying.
@@ -25,7 +25,7 @@ const Introduction = ({ selectedLang }: IntroductionProps) => {
<h2 className="doc-heading">Non-exposed tables</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
If you don't want to expose tables in your API, simply add them to a different schema
(not the <code>public</code> schema).
@@ -40,7 +40,7 @@ const Introduction = ({ selectedLang }: IntroductionProps) => {
GraphQL <span className="lowercase">vs</span> Supabase
</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
If you have a GraphQL background, you might be wondering if you can fetch your data in a
single round-trip. The answer is yes!
diff --git a/studio/components/interfaces/Docs/Pages/UserManagement.tsx b/studio/components/interfaces/Docs/Pages/UserManagement.tsx
index 5b696f9f5f7..7184b7e8002 100644
--- a/studio/components/interfaces/Docs/Pages/UserManagement.tsx
+++ b/studio/components/interfaces/Docs/Pages/UserManagement.tsx
@@ -27,7 +27,7 @@ export default function UserManagement({
<>
<h2 className="doc-heading">User Management</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>Supabase makes it easy to manage your users.</p>
<p>
Supabase assigns each user a unique ID. You can reference this ID anywhere in your
@@ -43,7 +43,7 @@ export default function UserManagement({
<h2 className="doc-heading">Sign up</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>Allow your users to sign up and create a new account.</p>
<p>
After they have signed up, all interactions using the Supabase JS client will be
@@ -60,7 +60,7 @@ export default function UserManagement({
<h2 className="doc-heading">Log in with Email/Password</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>If an account is created, users can login to your app.</p>
<p>
After they have logged in, all interactions using the Supabase JS client will be
@@ -77,7 +77,7 @@ export default function UserManagement({
<h2 className="doc-heading">Log in with Magic Link via Email</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>Send a user a passwordless link which they can use to redeem an access_token.</p>
<p>
After they have clicked the link, all interactions using the Supabase JS client will be
@@ -94,7 +94,7 @@ export default function UserManagement({
<h2 className="doc-heading">Sign Up with Phone/Password</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
A phone number can be used instead of an email as a primary account confirmation
mechanism.
@@ -118,7 +118,7 @@ export default function UserManagement({
<h2 className="doc-heading">Login via SMS OTP</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
SMS OTPs work like magic links, except you have to provide an interface for the user to
verify the 6 digit number they receive.
@@ -138,7 +138,7 @@ export default function UserManagement({
<h2 className="doc-heading">Verify an SMS OTP</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Once the user has received the OTP, have them enter it in a form and send it for
verification
@@ -158,7 +158,7 @@ export default function UserManagement({
<h2 className="doc-heading">Log in with Third Party OAuth</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Users can log in with Third Party OAuth like Google, Facebook, GitHub, and more. You
must first enable each of these in the Auth Providers settings{' '}
@@ -222,7 +222,7 @@ export default function UserManagement({
<h2 className="doc-heading">User</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>Get the JSON object for the logged in user.</p>
</article>
<article className="code">
@@ -235,7 +235,7 @@ export default function UserManagement({
<h2 className="doc-heading">Forgotten Password Email</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Sends the user a log in link via email. Once logged in you should direct the user to a
new password form. And use "Update User" below to save the new password.
@@ -251,7 +251,7 @@ export default function UserManagement({
<h2 className="doc-heading">Update User</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Update the user with a new email or password. Each key (email, password, and data) is
optional
@@ -267,7 +267,7 @@ export default function UserManagement({
<h2 className="doc-heading">Log out</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
After calling log out, all interactions using the Supabase JS client will be
"anonymous".
@@ -283,7 +283,7 @@ export default function UserManagement({
<h2 className="doc-heading">Send a User an Invite over Email</h2>
<div className="doc-section ">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>Send a user a passwordless link which they can use to sign up and log in.</p>
<p>
After they have clicked the link, all interactions using the Supabase JS client will be
diff --git a/studio/components/interfaces/Docs/ResourceContent.tsx b/studio/components/interfaces/Docs/ResourceContent.tsx
index 31fd526749f..090e0c6f73a 100644
--- a/studio/components/interfaces/Docs/ResourceContent.tsx
+++ b/studio/components/interfaces/Docs/ResourceContent.tsx
@@ -48,7 +48,7 @@ const ResourceContent = ({
</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<label className="font-mono text-xs uppercase text-foreground-lighter inline-block mb-2">
Description
</label>
@@ -64,7 +64,7 @@ const ResourceContent = ({
<div>
{properties.map((x) => (
<div className="doc-section py-4" key={x.id}>
- <div className="text-foreground">
+ <div className="code-column text-foreground">
<Param
key={x.id}
name={x.id}
@@ -99,7 +99,7 @@ const ResourceContent = ({
<>
<h3 className="text-foreground mt-4 px-6">Read rows</h3>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
To read rows in <code>{resourceId}</code>, use the <code>select</code> method.
</p>
@@ -137,7 +137,7 @@ const ResourceContent = ({
</article>
</div>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<h4 className="mt-0 text-white">Filtering</h4>
<p>Supabase provides a wide range of filters.</p>
<p>
@@ -163,7 +163,7 @@ const ResourceContent = ({
<>
<h3 className="text-foreground mt-4 px-6">Insert rows</h3>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
<code>insert</code> lets you insert into your tables. You can also insert in bulk
and do UPSERT.
@@ -202,7 +202,7 @@ const ResourceContent = ({
<>
<h3 className="text-foreground mt-4 px-6">Update rows</h3>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
<code>update</code> lets you update rows. <code>update</code> will match all rows by
default. You can update specific rows using horizontal filters, e.g. <code>eq</code>
@@ -234,7 +234,7 @@ const ResourceContent = ({
<>
<h3 className="text-foreground mt-4 px-6">Delete rows</h3>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
<code>delete</code> lets you delete rows. <code>delete</code> will match all rows by
default, so remember to specify your filters!
@@ -262,7 +262,7 @@ const ResourceContent = ({
<>
<h3 className="text-foreground mt-4 px-6">Subscribe to changes</h3>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<p>
Supabase provides realtime functionality and broadcasts database changes to
authorized users depending on Row Level Security (RLS) policies.
diff --git a/studio/components/interfaces/Docs/RpcContent.tsx b/studio/components/interfaces/Docs/RpcContent.tsx
index e5d9e7b56e2..73c541a015d 100644
--- a/studio/components/interfaces/Docs/RpcContent.tsx
+++ b/studio/components/interfaces/Docs/RpcContent.tsx
@@ -41,7 +41,7 @@ const RpcContent = ({
</h2>
<div className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<label className="font-mono text-xs uppercase text-foreground-lighter">Description</label>
<Description content={summary} metadata={{ rpc: rpcId }} onChange={refreshDocs} />
</article>
@@ -65,7 +65,7 @@ const RpcContent = ({
{rpcParams.map((x, i) => {
return (
<div key={i} className="doc-section">
- <article className="text-foreground">
+ <article className="code-column text-foreground">
<Param
key={x.name}
name={x.name}
diff --git a/studio/styles/ui.scss b/studio/styles/ui.scss
index c64e59460bb..00cfe212e5b 100644
--- a/studio/styles/ui.scss
+++ b/studio/styles/ui.scss
@@ -250,7 +250,7 @@
@apply mt-4;
}
- .text {
+ .code-column {
@apply p-4 px-6 w-1/2;
max-width: 50%;