Skip to content

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

chore: branding customisation (#39425)

Alaister Young09d5b8a18f95
diff --git a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HomeIcon.tsx b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HomeIcon.tsx
index aaed9c2cc79..95e7abe28a9 100644
--- a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HomeIcon.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HomeIcon.tsx
@@ -1,4 +1,3 @@
-import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
@@ -7,11 +6,14 @@ import { useOrganizationsQuery } from 'data/organizations/organizations-query'
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
import { IS_PLATFORM } from 'lib/constants'
+import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
export const HomeIcon = () => {
const { data: selectedOrganization } = useSelectedOrganizationQuery()
const { data: organizations } = useOrganizationsQuery()
+ const largeLogo = useIsFeatureEnabled('branding:large_logo')
+
const router = useRouter()
const [lastVisitedOrganization] = useLocalStorageQuery(
LOCAL_STORAGE_KEYS.LAST_VISITED_ORGANIZATION,
@@ -29,12 +31,10 @@ export const HomeIcon = () => {
return (
<Link href={href} className="items-center justify-center flex-shrink-0 hidden md:flex">
- <Image
+ <img
alt="Supabase"
src={`${router.basePath}/img/supabase-logo.svg`}
- width={18}
- height={18}
- className="w-[18px] h-[18px]"
+ className={largeLogo ? 'h-[20px]' : 'h-[18px]'}
/>
</Link>
)
diff --git a/apps/studio/components/layouts/SignInLayout/SignInLayout.tsx b/apps/studio/components/layouts/SignInLayout/SignInLayout.tsx
index fbc0b3abf0f..2b7717a02f0 100644
--- a/apps/studio/components/layouts/SignInLayout/SignInLayout.tsx
+++ b/apps/studio/components/layouts/SignInLayout/SignInLayout.tsx
@@ -1,6 +1,5 @@
import { useQueryClient } from '@tanstack/react-query'
import { useTheme } from 'next-themes'
-import Image from 'next/legacy/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { PropsWithChildren, useEffect, useState } from 'react'
@@ -31,7 +30,8 @@ const SignInLayout = ({
const { resolvedTheme } = useTheme()
const ongoingIncident = useFlag('ongoingIncident')
- const showTestimonial = useIsFeatureEnabled('dashboard_auth:show_testimonial')
+ const { dashboardAuthShowTestimonial: showTestimonial, brandingLargeLogo: largeLogo } =
+ useIsFeatureEnabled(['dashboard_auth:show_testimonial', 'branding:large_logo'])
// This useEffect redirects the user to MFA if they're already halfway signed in
useEffect(() => {
@@ -96,15 +96,14 @@ const SignInLayout = ({
<div className="flex items-center flex-grow flex-shrink-0 lg:flex-grow-0">
<div className="flex items-center justify-between w-full md:w-auto">
<Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/organizations'}>
- <Image
+ <img
src={
resolvedTheme?.includes('dark')
? `${BASE_PATH}/img/supabase-dark.svg`
: `${BASE_PATH}/img/supabase-light.svg`
}
alt="Supabase Logo"
- height={24}
- width={120}
+ className={largeLogo ? 'h-[40px]' : 'h-[24px]'}
/>
</Link>
</div>
diff --git a/apps/studio/components/ui/GlobalErrorBoundaryState.tsx b/apps/studio/components/ui/GlobalErrorBoundaryState.tsx
index 2959826daa3..c8539fd37ee 100644
--- a/apps/studio/components/ui/GlobalErrorBoundaryState.tsx
+++ b/apps/studio/components/ui/GlobalErrorBoundaryState.tsx
@@ -2,11 +2,11 @@ import { isError } from 'lodash'
import { ExternalLink } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import CopyButton from './CopyButton'
-import Image from 'next/image'
+import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
import { Button, cn } from 'ui'
import { Admonition } from 'ui-patterns'
+import CopyButton from './CopyButton'
import { InlineLinkClassName } from './InlineLink'
export type FallbackProps = {
@@ -18,6 +18,8 @@ export const GlobalErrorBoundaryState = ({ error, resetErrorBoundary }: Fallback
const router = useRouter()
const checkIsError = isError(error)
+ const largeLogo = useIsFeatureEnabled('branding:large_logo')
+
const errorMessage = checkIsError ? error.message : ''
const urlMessage = checkIsError ? `Path name: ${router.pathname}\n\n${error?.stack}` : ''
const isRemoveChildError = checkIsError
@@ -44,12 +46,10 @@ export const GlobalErrorBoundaryState = ({ error, resetErrorBoundary }: Fallback
<div className="w-screen mx-auto h-screen flex items-center justify-center">
<header className="h-12 absolute top-0 w-full border-b px-4 flex items-center">
<Link href="/" className="items-center justify-center">
- <Image
+ <img
alt="Supabase"
src={`${router.basePath}/img/supabase-logo.svg`}
- width={18}
- height={18}
- className="w-[18px] h-[18px]"
+ className={largeLogo ? 'h-[20px]' : 'h-[18px]'}
/>
</Link>
</header>
diff --git a/packages/common/enabled-features/enabled-features.json b/packages/common/enabled-features/enabled-features.json
index d47444f59f4..e5204a6f50f 100644
--- a/packages/common/enabled-features/enabled-features.json
+++ b/packages/common/enabled-features/enabled-features.json
@@ -24,8 +24,11 @@
"authentication:show_sort_by_email": true,
"authentication:show_sort_by_phone": true,
"authentication:show_user_type_filter": true,
+
"billing:all": true,
+ "branding:large_logo": false,
+
"dashboard_auth:sign_up": true,
"dashboard_auth:sign_in_with_github": true,
"dashboard_auth:sign_in_with_sso": true,
diff --git a/packages/common/enabled-features/enabled-features.schema.json b/packages/common/enabled-features/enabled-features.schema.json
index 96cd9ef0d8e..8fe3d88dbcc 100644
--- a/packages/common/enabled-features/enabled-features.schema.json
+++ b/packages/common/enabled-features/enabled-features.schema.json
@@ -95,6 +95,11 @@
"description": "Enable the billing settings page"
},
+ "branding:large_logo": {
+ "type": "boolean",
+ "description": "Show larger logo sizes throughout the apps"
+ },
+
"dashboard_auth:sign_up": {
"type": "boolean",
"description": "Enable the sign up page in the dashboard"