mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 23:59:08 +03:00
## Context We've had a number of users run into issues after installing database extensions in schemas outside of the `extensions` schema - in particular for the `public` schema, which issues that normally surface are either: - Inability to enable RLS because the extensions are owned by `supabase_admin` when created - Security advisor hence constantly flags this as an issue - Inability to move the extension for the same reason - There is a solution for but it requires a lengthy resolution as outlined here in [our docs](https://supabase.com/docs/guides/database/extensions/postgis#moving-postgis-to-a-different-schema) While the option to select a schema to enable the database extension was for convenience, this is typically more for power users which seems to be more of a footgun for most other users. Hence we're opting to remove the schema selection option in the enable extension modal to also streamline the UX for enabling an extension by removing that additional cognitive load. ## Changes involved ### Before: <img width="430" height="248" alt="image" src="https://github.com/user-attachments/assets/e99ce86c-b56c-4149-86ca-2457da65b179" /> ### After: <img width="438" height="328" alt="image" src="https://github.com/user-attachments/assets/6be599d5-185b-4efe-9718-b50ac0ed4948" /> Clicking on the foot note expands a note as such with an alternative for power users: <img width="425" height="434" alt="image" src="https://github.com/user-attachments/assets/7cbf0b59-0ddc-4933-8c6b-4e30a32115b5" /> Extensions will be installed in the `extensions` by default unless otherwise specified by the extension itself within `default_version_schema`
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly — use a named export, not a default export
export const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}