Skip to content

Commit

Permalink
Merge branch 'supabase:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nipundev authored Jul 14, 2023
2 parents 8b50b57 + 40a0c63 commit fbb0164
Show file tree
Hide file tree
Showing 328 changed files with 19,648 additions and 2,585 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ You can also [self-host](https://supabase.com/docs/guides/hosting/overview) and
- [pg_graphql](http://github.com/supabase/pg_graphql/) a PostgreSQL extension that exposes a GraphQL API
- [Storage](https://github.com/supabase/storage-api) provides a RESTful interface for managing Files stored in S3, using Postgres to manage permissions.
- [postgres-meta](https://github.com/supabase/postgres-meta) is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
- [GoTrue](https://github.com/netlify/gotrue) is an SWT based API for managing users and issuing SWT tokens.
- [GoTrue](https://github.com/supabase/gotrue) is an JWT based API for managing users and issuing JWT tokens.
- [Kong](https://github.com/Kong/kong) is a cloud-native API gateway.

#### Client libraries
Expand Down
34 changes: 19 additions & 15 deletions apps/docs/components/Extensions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@ import React, { useState } from 'react'
import { GlassPanel, IconLink, IconX, Input } from 'ui'
import extensions from '../data/extensions.json'

type extension = {
type Extension = {
name: string
comment: string
tags: string[]
link?: string
link: string
}

function getUniqueTags(json: extension[]) {
type LinkTarget = React.ComponentProps<'a'>['target']

function getLinkTarget(link: string): LinkTarget {
// Link is relative, open in the same tab
if (link.startsWith('/')) {
return '_self'
}
// Link is external, open in a new tab
return '_blank'
}

function getUniqueTags(json: Extension[]): string[] {
const tags = []
for (const item of json) {
if (item.tags) {
Expand All @@ -21,12 +32,12 @@ function getUniqueTags(json: extension[]) {
}

export default function Extensions() {
const [searchTerm, setSearchTerm] = useState('')
const [filters, setFilters] = useState([])
const [searchTerm, setSearchTerm] = useState<string>('')
const [filters, setFilters] = useState<string[]>([])

const tags = getUniqueTags(extensions)

function handleChecked(tag) {
function handleChecked(tag: string) {
if (filters.includes(tag)) {
setFilters(filters.filter((x) => x !== tag))
} else {
Expand Down Expand Up @@ -94,15 +105,8 @@ export default function Extensions() {
filters.length === 0 ? x : x.tags.some((item) => filters.includes(item))
)
.map((extension) => (
<Link
passHref
href={`${
extension.link
? `/guides/database/extensions/${extension.name}`
: '/guides/database/extensions#full-list-of-extensions'
}`}
>
<a target={`${extension.link ? '_blank' : '_self'}`} className="no-underline">
<Link passHref href={extension.link}>
<a target={getLinkTarget(extension.link)} className="no-underline">
<GlassPanel title={extension.name} background={false} key={extension.name}>
<p className="mt-4">
{extension.comment.charAt(0).toUpperCase() + extension.comment.slice(1)}
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/components/HomePageCover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const HomePageCover = (props) => {
Discover how to set up a database to an app making queries in just a few minutes.
</p>
</div>
<div className="flex flex-wrap md:grid md:grid-cols-4 2xl:grid-cols-7 gap-2 sm:gap-3">
<div className="flex flex-wrap md:grid md:grid-cols-4 2xl:grid-cols-8 gap-2 sm:gap-3">
{frameworks.map((framework, i) => (
<Link key={i} href={framework.href} passHref>
<a className="no-underline">
Expand All @@ -98,7 +98,7 @@ const HomePageCover = (props) => {
return (
<div className="w-full bg-scale-100 border-b prose dark:prose-dar max-w-none mb-16 md:mb-12 xl:mb-0">
<div className="max-w-7xl px-5 mx-auto py-8 sm:pb-16 sm:pt-12 xl:pt-16 flex flex-col xl:flex-row justify-between gap-12 xl:gap-12">
<div className="flex flex-col sm:flex-row gap-4 sm:gap-8 items-start sm:items-center w-full max-w-xl">
<div className="flex flex-col sm:flex-row gap-4 sm:gap-8 items-start sm:items-center w-full max-w-xl xl:max-w-[33rem]">
<DocsCoverLogo />
<div className="flex flex-col">
<h1 className="m-0 mb-3 text-2xl sm:text-3xl">{props.meta?.title}</h1>
Expand All @@ -108,7 +108,7 @@ const HomePageCover = (props) => {
</p>
</div>
</div>
<div className="w-full xl:max-w-[365px] 2xl:max-w-[608px] -mb-40">
<div className="w-full xl:max-w-[375px] 2xl:max-w-[620px] -mb-40">
<GettingStarted />
</div>
</div>
Expand Down
14 changes: 8 additions & 6 deletions apps/docs/components/Navigation/NavigationMenu/HomeMenuIcons.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { products } from 'shared-data'

type HomeMenuIcon = {
width?: number
height?: number
Expand Down Expand Up @@ -50,7 +52,7 @@ export function IconMenuAuth({ width = 16, height = 16 }: HomeMenuIcon) {
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.494 9.975h5m-5 0v2h5v-2m-5 0v-2h5v2M10 5V3a2 2 0 1 0-4 0v2m6.473 0v9h-9V5h9Z"
d={products.authentication.icon[16]}
stroke="currentColor"
strokeMiterlimit="10"
strokeLinejoin="bevel"
Expand Down Expand Up @@ -107,7 +109,7 @@ export function IconMenuDatabase({ width = 16, height = 16 }: HomeMenuIcon) {
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.502 6h8.996v4H3.502V6ZM3 10.002h10v4H3v-4ZM3 2h10v4H3V2Z"
d={products.database.icon[16]}
stroke="currentColor"
strokeMiterlimit="10"
strokeLinejoin="bevel"
Expand Down Expand Up @@ -145,7 +147,7 @@ export function IconMenuEdgeFunctions({ width = 16, height = 16 }: HomeMenuIcon)
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M1.857 11.36a7 7 0 0 1 9.41-9.551M4.774 14.212a7 7 0 0 0 9.41-9.497m-8.812 7.845a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm9.296-9.13a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM12.5 8a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"
d={products.functions.icon[16]}
stroke="currentColor"
strokeMiterlimit="10"
strokeLinejoin="bevel"
Expand Down Expand Up @@ -297,7 +299,7 @@ export function IconMenuRealtime({ width = 16, height = 16 }: HomeMenuIcon) {
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.362.984v2.35m-1.866.144L1.365 1.282m2.052 3.92H1.052m8.023 9.653L4.557 4.523 15 9.115l-4.748 1.182-1.177 4.558Z"
d={products.realtime.icon[16]}
stroke="currentColor"
strokeMiterlimit="10"
strokeLinejoin="bevel"
Expand Down Expand Up @@ -354,7 +356,7 @@ export function IconMenuStorage({ width = 16, height = 16 }: HomeMenuIcon) {
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M13 7.616V5.6l-3.618-3.6H3v4.03m9.964-.447L9.38 2v3.584h3.584ZM1.974 6v8h12V7.509h-7.59l-1.533-1.51H1.974Z"
d={products.storage.icon[16]}
stroke="currentColor"
strokeMiterlimit="10"
strokeLinejoin="bevel"
Expand All @@ -373,7 +375,7 @@ export function IconMenuAI({ width = 16, height = 16 }: HomeMenuIcon) {
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M7.99886 7.63216V14.4892M7.99886 7.63216L14.0488 4.11804M7.99886 7.63216L1.94922 4.11819M1.94922 4.11819V8.32332M1.94922 4.11819V4.08217L5.57319 1.97717M14.049 8.36007V4.08217L10.4251 1.97717M11.8165 12.4072L7.99913 14.6245L4.18177 12.4072"
d={products.vector.icon[16]}
stroke="currentColor"
strokeMiterlimit="10"
strokeLinecap="round"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ export const functions: NavMenuConstant = {
name: 'Connecting directly to Postgres',
url: '/guides/functions/connect-to-postgres',
},
{ name: 'Testing your Edge Functions', url: '/guides/functions/unit-test' },
{ name: 'Troubleshooting', url: '/guides/functions/troubleshooting' },
],
},
Expand Down Expand Up @@ -909,7 +910,7 @@ export const ai: NavMenuConstant = {
{ name: 'Managing indexes', url: '/guides/ai/managing-indexes' },
{ name: 'Vector columns', url: '/guides/ai/vector-columns' },
{ name: 'Engineering for scale', url: '/guides/ai/engineering-for-scale' },
{ name: 'Choosing instance type', url: '/guides/ai/choosing-instance-type' },
{ name: 'Choosing Compute Add-on', url: '/guides/ai/choosing-compute-addon' },
],
},
{
Expand Down
Loading

0 comments on commit fbb0164

Please sign in to comment.