-
-
-
-
Foreign key relation:
-
-
{name}
-
-
- {foreignKey?.targetTableSchema}.{foreignKey?.targetTableName}.
- {foreignKey?.targetColumnName}
-
+
+
+
+
+
+
Foreign key relation:
+
+
{name}
+
+
+ {foreignKey?.targetTableSchema}.{foreignKey?.targetTableName}.
+ {foreignKey?.targetColumnName}
+
+
+ {foreignKey?.deletionAction !== FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
+
+ On delete: {getForeignKeyDeletionAction(foreignKey?.deletionAction)}
+
+ )}
- {foreignKey?.deletionAction !== FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
-
- On delete: {getForeignKeyDeletionAction(foreignKey?.deletionAction)}
-
- )}
-
-
+
+
)
default:
diff --git a/studio/components/grid/components/menu/ColumnMenu.tsx b/studio/components/grid/components/menu/ColumnMenu.tsx
index 27d5f59b57a..59e02b5a5b0 100644
--- a/studio/components/grid/components/menu/ColumnMenu.tsx
+++ b/studio/components/grid/components/menu/ColumnMenu.tsx
@@ -55,19 +55,21 @@ const ColumnMenu: React.FC
= ({ column, isEncrypted }) => {
{isEncrypted && (
-
-
-
-
- Encrypted columns cannot be edited
-
-
-
+
+
+
+
+
+ Encrypted columns cannot be edited
+
+
+
+
)}
)}
diff --git a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx
index f2909a7f4de..9f35431d3c0 100644
--- a/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx
+++ b/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx
@@ -169,19 +169,21 @@ const ProviderForm: FC = ({ provider }) => {
{!canUpdateConfig && (
-
-
-
-
- You need additional permissions to update provider settings
-
-
-
+
+
+
+
+
+ You need additional permissions to update provider settings
+
+
+
+
)}
diff --git a/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx b/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx
index 187b0576887..5cc064272fc 100644
--- a/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx
+++ b/studio/components/interfaces/Auth/Policies/PolicyEditor/PolicyDefinition.tsx
@@ -43,28 +43,31 @@ const PolicyDefinition: FC
= ({
-
-
-
-
- This expression will be added to queries that refer to the table if row-level
- security is enabled.
-
-
- Rows for which the expression returns true will be visible. Any rows for which
- the expression returns false or null will not be visible to the user (in a
- SELECT), and will not be available for modification (in an UPDATE or DELETE).
-
-
- Such rows are silently suppressed - no error is reported.
-
-
-
+
+
+
+
+
+ This expression will be added to queries that refer to the table if
+ row-level security is enabled.
+
+
+ Rows for which the expression returns true will be visible. Any rows for
+ which the expression returns false or null will not be visible to the user
+ (in a SELECT), and will not be available for modification (in an UPDATE or
+ DELETE).
+
+
+ Such rows are silently suppressed - no error is reported.
+
+
+
+
@@ -87,29 +90,31 @@ const PolicyDefinition: FC = ({
-
-
-
-
- This expression will be used in INSERT and UPDATE queries against the table if
- row-level security is enabled.
-
-
- Only rows for which the expression evaluates to true will be allowed. An error
- will be thrown if the expression evaluates to false or null for any of the
- records inserted or any of the records that result from the update.
-
-
- Note that this expression is evaluated against the proposed new contents of
- the row, not the original contents.
-
-
-
+
+
+
+
+
+ This expression will be used in INSERT and UPDATE queries against the table
+ if row-level security is enabled.
+
+
+ Only rows for which the expression evaluates to true will be allowed. An
+ error will be thrown if the expression evaluates to false or null for any of
+ the records inserted or any of the records that result from the update.
+
+
+ Note that this expression is evaluated against the proposed new contents of
+ the row, not the original contents.
+
+
+
+
diff --git a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx
index b3a00e0d638..41518f2742e 100644
--- a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx
+++ b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyRow.tsx
@@ -82,19 +82,21 @@ const PolicyRow: FC = ({
/>
{!canUpdatePolicies && (
-
-
-
-
- You need additional permissions to edit RLS policies
-
-
-
+
+
+
+
+
+ You need additional permissions to edit RLS policies
+
+
+
+
)}
)}
diff --git a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx
index 82cfd727e02..b081c241095 100644
--- a/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx
+++ b/studio/components/interfaces/Auth/Policies/PolicyTableRow/PolicyTableRowHeader.tsx
@@ -52,19 +52,21 @@ const PolicyTableRowHeader: FC = ({
{!canCreatePolicies && (
-
-
-
-
- You need additional permissions to create RLS policies
-
-
-
+
+
+
+
+
+ You need additional permissions to create RLS policies
+
+
+
+
)}
@@ -78,19 +80,21 @@ const PolicyTableRowHeader: FC = ({
{!canToggleRLS && (
-
-
-
-
- You need additional permissions to toggle RLS
-
-
-
+
+
+
+
+
+ You need additional permissions to toggle RLS
+
+
+
+
)}
diff --git a/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx b/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx
index 14354efddd0..ea58410a4b8 100644
--- a/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx
+++ b/studio/components/interfaces/Auth/RedirectDomains/RedirectDomains.tsx
@@ -97,19 +97,21 @@ const RedirectDomains = () => {
{!canUpdateConfig && (
-
-
-
-
- You need additional permissions to update redirect URLs
-
-
-
+
+
+
+
+
+ You need additional permissions to update redirect URLs
+
+
+
+
)}
diff --git a/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx b/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx
index f1b9156df4a..3cacf12808d 100644
--- a/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx
+++ b/studio/components/interfaces/Auth/Users/AddUserDropdown.tsx
@@ -47,19 +47,21 @@ const AddUserDropdown = ({ projectKpsVersion }: AddUserDropdownProps) => {
{!canInviteUsers && (
-
-
-
-
- You need additional permissions to invite users
-
-
-
+
+
+
+
+
+ You need additional permissions to invite users
+
+
+
+
)}
)}
@@ -76,19 +78,21 @@ const AddUserDropdown = ({ projectKpsVersion }: AddUserDropdownProps) => {
{!canCreateUsers && (
-
-
-
-
- You need additional permissions to create users
-
-
-
+
+
+
+
+
+ You need additional permissions to create users
+
+
+
+
)}
>
diff --git a/studio/components/interfaces/Auth/Users/UserDropdown.tsx b/studio/components/interfaces/Auth/Users/UserDropdown.tsx
index 016f4e20dc2..b94cf60ddce 100644
--- a/studio/components/interfaces/Auth/Users/UserDropdown.tsx
+++ b/studio/components/interfaces/Auth/Users/UserDropdown.tsx
@@ -184,19 +184,21 @@ const UserDropdown: FC = ({ user, canRemoveUser, canRemoveMFAFactors }) =
need to double check with KM / anyone familiar with ABAC
*/}
{!canRemoveMFAFactors && (
-
-
-
-
- You need additional permissions to remove a user's authentication factors.
-
-
-
+
+
+
+
+
+ You need additional permissions to remove a user's authentication factors.
+
+
+
+
)}
@@ -210,19 +212,21 @@ const UserDropdown: FC = ({ user, canRemoveUser, canRemoveMFAFactors }) =
{!canRemoveUser && (
-
-
-
-
- You need additional permissions to delete users
-
-
-
+
+
+
+
+
+ You need additional permissions to delete users
+
+
+
+
)}
>
diff --git a/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx b/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx
index d355b584fea..ecf6a931eef 100644
--- a/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx
+++ b/studio/components/interfaces/Billing/InvoiceStatusBadge.tsx
@@ -48,41 +48,43 @@ const InvoiceStatusBadge: FC = ({ status }) => {
{statusMapping?.label || status}
-
-
-
- {[InvoiceStatus.OPEN, InvoiceStatus.UNCOLLECTIBLE].includes(status) && (
-
- We were not able to collect the money. Make sure you have a valid payment method and
- enough funds. Outstanding invoices may cause restrictions. You can manually pay the
- using the "Pay Now" button.
-
- )}
+
+
+
+
+ {[InvoiceStatus.OPEN, InvoiceStatus.UNCOLLECTIBLE].includes(status) && (
+
+ We were not able to collect the money. Make sure you have a valid payment method and
+ enough funds. Outstanding invoices may cause restrictions. You can manually pay the
+ using the "Pay Now" button.
+
+ )}
- {status === InvoiceStatus.DRAFT && (
-
- The invoice will soon be finalized and charged for.
-
- )}
+ {status === InvoiceStatus.DRAFT && (
+
+ The invoice will soon be finalized and charged for.
+
+ )}
- {status === InvoiceStatus.PAID && (
-
- The invoice has been paid successfully. No action is required on your side.
-
- )}
+ {status === InvoiceStatus.PAID && (
+
+ The invoice has been paid successfully. No action is required on your side.
+
+ )}
- {status === InvoiceStatus.VOID && (
-
- This invoice has been forgiven. No action is required on your side.
-
- )}
-
-
+ {status === InvoiceStatus.VOID && (
+
+ This invoice has been forgiven. No action is required on your side.
+
+ )}
+
+
+
)
}
diff --git a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
index f45b945ca9d..0a3d3688a42 100644
--- a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
+++ b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentSummaryPanel.tsx
@@ -372,20 +372,22 @@ const PaymentSummaryPanel: FC = ({
{!canUpdatePaymentMethods && (
-
-
-
-
- You need additional permissions to add new payment methods to this
- organization
-
-
-
+
+
+
+
+
+ You need additional permissions to add new payment methods to this
+ organization
+
+
+
+
)}
@@ -448,31 +450,35 @@ const PaymentSummaryPanel: FC = ({
{!hasChangesToPlan ? (
-
-
-
-
- No changes made to your subscription
-
-
-
+
+
+
+
+
+ No changes made to your subscription
+
+
+
+
) : !selectedPaymentMethod ? (
-
-
-
- Please select a payment method
-
-
+
+
+
+
+ Please select a payment method
+
+
+
) : (
<>>
)}
diff --git a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx
index 5a1b2e824a7..7979c53969e 100644
--- a/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx
+++ b/studio/components/interfaces/Billing/PaymentSummaryPanel/PaymentTotal.tsx
@@ -54,17 +54,19 @@ const PaymentTotal: FC = ({
onClick={() => setShowCostBreakdown(true)}
/>
-
-
-
- How is this calculated?
-
-
+
+
+
+
+ How is this calculated?
+
+
+
)}
diff --git a/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx b/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx
index ca1595eaf6c..316265f8e2b 100644
--- a/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx
+++ b/studio/components/interfaces/Billing/PlanSelection/Plans/PlanCTAButton.tsx
@@ -112,19 +112,23 @@ const PlanCTAButton: FC = ({ plan, currentPlan, onSelectPlan }) => {
{!disabled && projectUpdateDisabled && (
-
-
-
-
- Subscription changes are currently disabled, our engineers are working on a fix
-
-
-
+
+
+
+
+
+
+ Subscription changes are currently disabled, our engineers are working on a fix
+
+
+
+
+
)}
diff --git a/studio/components/interfaces/Billing/SpendCapModal.tsx b/studio/components/interfaces/Billing/SpendCapModal.tsx
index 1b809b51ddb..fddf841e0dd 100644
--- a/studio/components/interfaces/Billing/SpendCapModal.tsx
+++ b/studio/components/interfaces/Billing/SpendCapModal.tsx
@@ -55,20 +55,24 @@ const SpendCapModal: FC = ({ visible, onHide }) => {
className="transition opacity-50 cursor-pointer hover:opacity-100"
/>
-
-
-
-
- Monthly Active Users: A user that has made an API request in the last
- month
-
-
-
+
+
+
+
+
+
+ Monthly Active Users: A user that has made an API request in the
+ last month
+
+
+
+
+
100,000
diff --git a/studio/components/interfaces/Billing/Subscription/Subscription.tsx b/studio/components/interfaces/Billing/Subscription/Subscription.tsx
index 4bf3bf8ad04..8dc90989675 100644
--- a/studio/components/interfaces/Billing/Subscription/Subscription.tsx
+++ b/studio/components/interfaces/Billing/Subscription/Subscription.tsx
@@ -97,29 +97,31 @@ const Subscription: FC = ({
{!canUpdateSubscription || projectUpdateDisabled ? (
-
-
-
-
- {projectUpdateDisabled ? (
- <>
- Subscription changes are currently disabled.
-
- Our engineers are working on a fix.
- >
- ) : !canUpdateSubscription ? (
- 'You need additional permissions to amend subscriptions'
- ) : (
- ''
- )}
-
-
-
+
+
+
+
+
+ {projectUpdateDisabled ? (
+ <>
+ Subscription changes are currently disabled.
+
+ Our engineers are working on a fix.
+ >
+ ) : !canUpdateSubscription ? (
+ 'You need additional permissions to amend subscriptions'
+ ) : (
+ ''
+ )}
+
+
+
+
) : (
<>>
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx b/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx
index daab4106406..fecbf2eafd1 100644
--- a/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/PITRNotice.tsx
@@ -34,19 +34,21 @@ const PITRNotice = ({}) => {
{!canUpdateSubscription && (
-
-
-
-
- You need additional permissions to amend subscriptions
-
-
-
+
+
+
+
+
+ You need additional permissions to amend subscriptions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx b/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
index 6ed84243dd2..bba2f68b3f4 100644
--- a/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/PITRSelection.tsx
@@ -192,19 +192,21 @@ const PITRSelection = ({}) => {
{isSelectedOutOfRange && (
-
-
-
-
- Selected date is out of range where backups are available
-
-
-
+
+
+
+
+
+ Selected date is out of range where backups are available
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx b/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx
index b634e1365c7..86983a22ba6 100644
--- a/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/PITRStatus.tsx
@@ -55,19 +55,21 @@ const PITRStatus: FC = ({ selectedTimezone, onUpdateTimezone, onSetConfig
{!canTriggerPhysicalBackup && (
-
-
-
-
- You need additional permissions to trigger a PITR recovery
-
-
-
+
+
+
+
+
+ You need additional permissions to trigger a PITR recovery
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx b/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx
index 3b1d4689e74..90b2b7e6032 100644
--- a/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx
+++ b/studio/components/interfaces/Database/Backups/PITR/TimeInput.tsx
@@ -110,17 +110,19 @@ const TimeInput: FC = ({ defaultTime, minimumTime, maximumTime, onChange
className="w-full text-sm bg-transparent p-0 text-center outline-none border-none focus:ring-0"
/>
-
-
-
- Hours (HH)
-
-
+
+
+
+
+ Hours (HH)
+
+
+
:
@@ -138,17 +140,19 @@ const TimeInput: FC = ({ defaultTime, minimumTime, maximumTime, onChange
className="w-full text-sm bg-transparent p-0 text-center outline-none border-none focus:ring-0"
/>
-
-
-
- Minutes (MM)
-
-
+
+
+
+
+ Minutes (MM)
+
+
+
:
@@ -166,17 +170,19 @@ const TimeInput: FC = ({ defaultTime, minimumTime, maximumTime, onChange
className="w-full text-sm bg-transparent p-0 text-center outline-none border-none focus:ring-0"
/>
-
-
-
- Seconds (SS)
-
-
+
+
+
+
+ Seconds (SS)
+
+
+
{error && {error}
}
diff --git a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx
index a4d9cdc8423..6987deebd2d 100644
--- a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx
+++ b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionList.tsx
@@ -89,19 +89,21 @@ const FunctionList: FC = ({
} />
-
-
-
-
- You need additional permissions to update functions
-
-
-
+
+
+
+
+
+ You need additional permissions to update functions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx
index df69111db50..d9036ab8fa6 100644
--- a/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx
+++ b/studio/components/interfaces/Database/Functions/FunctionsList/FunctionsList.tsx
@@ -90,19 +90,23 @@ const FunctionsList: FC = ({
{!canCreateFunctions && (
-
-
-
-
- You need additional permissions to create functions
-
-
-
+
+
+
+
+
+
+ You need additional permissions to create functions
+
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx b/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
index 46bed2316b5..afccb7f5b5e 100644
--- a/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
+++ b/studio/components/interfaces/Database/Hooks/HooksList/HookList.tsx
@@ -105,19 +105,21 @@ const HookList: FC = ({
} />
-
-
-
-
- You need additional permissions to update webhooks
-
-
-
+
+
+
+
+
+ You need additional permissions to update webhooks
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx b/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx
index e1274b1b097..bd87e81dd5c 100644
--- a/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx
+++ b/studio/components/interfaces/Database/Hooks/HooksList/HooksList.tsx
@@ -107,19 +107,21 @@ const HooksList = ({
{!canCreateWebhooks && (
-
-
-
-
- You need additional permissions to create webhooks
-
-
-
+
+
+
+
+
+ You need additional permissions to create webhooks
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Roles/RoleRow.tsx b/studio/components/interfaces/Database/Roles/RoleRow.tsx
index d8fcecb0c93..50c7702c4eb 100644
--- a/studio/components/interfaces/Database/Roles/RoleRow.tsx
+++ b/studio/components/interfaces/Database/Roles/RoleRow.tsx
@@ -184,19 +184,21 @@ const RoleRow: FC = ({ role, disabled = false, onSelectDelete }) => {
className="ml-2 relative top-[3px]"
/>
-
-
-
-
- This privilege cannot be updated via the dashboard
-
-
-
+
+
+
+
+
+ This privilege cannot be updated via the dashboard
+
+
+
+
)
}
diff --git a/studio/components/interfaces/Database/Tables/ColumnList.tsx b/studio/components/interfaces/Database/Tables/ColumnList.tsx
index e53ed442863..447e4a82750 100644
--- a/studio/components/interfaces/Database/Tables/ColumnList.tsx
+++ b/studio/components/interfaces/Database/Tables/ColumnList.tsx
@@ -72,19 +72,21 @@ const ColumnList: FC = ({
{!canUpdateColumns && (
-
-
-
-
- You need additional permissions to create columns
-
-
-
+
+
+
+
+
+ You need additional permissions to create columns
+
+
+
+
)}
@@ -140,19 +142,21 @@ const ColumnList: FC = ({
/>
{!canUpdateColumns && (
-
-
-
-
- You need additional permissions to edit columns
-
-
-
+
+
+
+
+
+ You need additional permissions to edit columns
+
+
+
+
)}
@@ -167,19 +171,21 @@ const ColumnList: FC = ({
/>
{!canUpdateColumns && (
-
-
-
-
- You need additional permissions to delete columns
-
-
-
+
+
+
+
+
+ You need additional permissions to delete columns
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Tables/TableList.tsx b/studio/components/interfaces/Database/Tables/TableList.tsx
index 78381601079..bfb97d7e2ac 100644
--- a/studio/components/interfaces/Database/Tables/TableList.tsx
+++ b/studio/components/interfaces/Database/Tables/TableList.tsx
@@ -134,19 +134,21 @@ const TableList: FC = ({
{!canUpdateTables && (
-
-
-
-
- You need additional permissions to create tables
-
-
-
+
+
+
+
+
+ You need additional permissions to create tables
+
+
+
+
)}
@@ -228,19 +230,21 @@ const TableList: FC = ({
/>
{!canUpdateTables && (
-
-
-
-
- You need additional permissions to edit tables
-
-
-
+
+
+
+
+
+ You need additional permissions to edit tables
+
+
+
+
)}
@@ -255,19 +259,21 @@ const TableList: FC = ({
/>
{!canUpdateTables && (
-
-
-
-
- You need additional permissions to delete tables
-
-
-
+
+
+
+
+
+ You need additional permissions to delete tables
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx b/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
index f4411eff581..f459c145aa0 100644
--- a/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
+++ b/studio/components/interfaces/Database/Triggers/TriggersList/TriggerList.tsx
@@ -82,19 +82,21 @@ const TriggerList: FC = ({ filterString, schema, editTrigger, deleteTrigg
} />
-
-
-
-
- You need additional permissions to update triggers
-
-
-
+
+
+
+
+
+ You need additional permissions to update triggers
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx b/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
index 2bb4b194b49..75fa2be96dc 100644
--- a/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
+++ b/studio/components/interfaces/Database/Triggers/TriggersList/TriggersList.tsx
@@ -80,19 +80,21 @@ const TriggersList: FC = ({
{!canCreateTriggers && (
-
-
-
-
- You need additional permissions to create triggers
-
-
-
+
+
+
+
+
+ You need additional permissions to create triggers
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx b/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx
index 896cd11d45e..9628bde820c 100644
--- a/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx
+++ b/studio/components/interfaces/Database/Wrappers/WrapperRow.tsx
@@ -181,19 +181,21 @@ const WrapperRow: FC = ({ wrappers = [], wrapperMeta, isOpen, onOpen }) =
/>
{!canManageWrappers && (
-
-
-
-
- You need additional permissions to edit wrappers
-
-
-
+
+
+
+
+
+ You need additional permissions to edit wrappers
+
+
+
+
)}
)}
@@ -208,19 +210,21 @@ const WrapperRow: FC = ({ wrappers = [], wrapperMeta, isOpen, onOpen }) =
/>
{!canManageWrappers && (
-
-
-
-
- You need additional permissions to add wrappers
-
-
-
+
+
+
+
+
+ You need additional permissions to add wrappers
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx b/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx
index d80ab7d57c5..07ce73df7b4 100644
--- a/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx
+++ b/studio/components/interfaces/Database/Wrappers/WrappersDisabledState.tsx
@@ -131,19 +131,21 @@ const WrappersDisabledState = () => {
{!canToggleWrappers && (
-
-
-
-
- You need additional permissions to enable Wrappers for this project
-
-
-
+
+
+
+
+
+ You need additional permissions to enable Wrappers for this project
+
+
+
+
)}
diff --git a/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx b/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx
index 76a5ce5b6b4..ba76b237de1 100644
--- a/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx
+++ b/studio/components/interfaces/Database/Wrappers/WrappersDropdown.tsx
@@ -26,19 +26,21 @@ const WrapperDropdown: FC = ({ buttonText = 'Add wrapper', align = 'end'
{buttonText}
-
-
-
-
- You need additional permissions to add wrappers
-
-
-
+
+
+
+
+
+ You need additional permissions to add wrappers
+
+
+
+
)
}
diff --git a/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx b/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
index af520a18d31..1da604d200e 100644
--- a/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
+++ b/studio/components/interfaces/Functions/EdgeFunctionDetails/EdgeFunctionDetails.tsx
@@ -276,19 +276,21 @@ const EdgeFunctionDetails: FC = () => {
{!canUpdateEdgeFunction && (
-
-
-
-
- You need additional permissions to delete an edge function
-
-
-
+
+
+
+
+
+ You need additional permissions to delete an edge function
+
+
+
+
)}
diff --git a/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx b/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
index bb1b1f86edd..2c4c666e417 100644
--- a/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
+++ b/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx
@@ -78,19 +78,21 @@ const EdgeFunctionsListItem: FC = ({ function: item }) => {
{dayjs(item.updated_at).fromNow()}
-
-
-
-
- Last updated on {dayjs(item.updated_at).format('DD MMM, YYYY HH:mm')}
-
-
-
+
+
+
+
+
+ Last updated on {dayjs(item.updated_at).format('DD MMM, YYYY HH:mm')}
+
+
+
+
diff --git a/studio/components/interfaces/Functions/TerminalInstructions.tsx b/studio/components/interfaces/Functions/TerminalInstructions.tsx
index a5770812ef0..0a933c1d0b9 100644
--- a/studio/components/interfaces/Functions/TerminalInstructions.tsx
+++ b/studio/components/interfaces/Functions/TerminalInstructions.tsx
@@ -143,7 +143,7 @@ const TerminalInstructions: FC = ({ closable = false, removeBorder = fals
href="https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions"
>
- }>
+ }>
Examples
diff --git a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx
index 2e22372256a..9963a537053 100644
--- a/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx
+++ b/studio/components/interfaces/Organization/BillingSettings/PaymentMethods.tsx
@@ -187,19 +187,21 @@ const PaymentMethods: FC = ({
} />
-
-
-
-
- Your default payment method cannot be deleted
-
-
-
+
+
+
+
+
+ Your default payment method cannot be deleted
+
+
+
+
) : (
{!canInviteMembers && (
-
-
-
-
- You need additional permissions to invite a member to this organization
-
-
-
+
+
+
+
+
+ You need additional permissions to invite a member to this organization
+
+
+
+
)}
= ({ member, roles }) => {
} />
-
-
-
-
- You need additional permissions to manage this team member
-
-
-
+
+
+
+
+
+ You need additional permissions to manage this team member
+
+
+
+
)
diff --git a/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx b/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx
index 7958d26f3f7..ffbb54d6f65 100644
--- a/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx
+++ b/studio/components/interfaces/Organization/TeamSettings/MembersView.tsx
@@ -214,33 +214,38 @@ const MembersView = ({ searchString }: MembersViewProps) => {
{memberIsPendingInvite ? (
-
-
-
-
- Role can only be changed after the user has accepted the invite
-
-
-
+
+
+
+
+
+ Role can only be changed after the user has accepted the
+ invite
+
+
+
+
) : !memberIsUser && !canRemoveRole ? (
-
-
-
-
- You need additional permissions to manage this team member
-
-
-
+
+
+
+
+
+ You need additional permissions to manage this team member
+
+
+
+
) : (
<>>
)}
@@ -252,20 +257,22 @@ const MembersView = ({ searchString }: MembersViewProps) => {
-
-
-
-
- This user has an invalid role, please reach out to us via
- support
-
-
-
+
+
+
+
+
+ This user has an invalid role, please reach out to us via
+ support
+
+
+
+
)}
diff --git a/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx b/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx
index 6c322bf60f3..9f08f55e877 100644
--- a/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx
+++ b/studio/components/interfaces/Organization/TeamSettings/RolesHelperModal/RolesHelperModal.tsx
@@ -17,17 +17,19 @@ const RolesHelperModal: FC = ({}) => {
-
-
-
- Only available in Team/Enterprise plan.
-
-
+
+
+
+
+ Only available in Team/Enterprise plan.
+
+
+
)
diff --git a/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx b/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
index fe2a3ae0e24..42140783088 100644
--- a/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
+++ b/studio/components/interfaces/Organization/TeamSettings/TeamSettings.tsx
@@ -97,19 +97,21 @@ const TeamSettings = () => {
{!canLeave && (
-
-
-
-
- An organization requires at least 1 owner
-
-
-
+
+
+
+
+
+ An organization requires at least 1 owner
+
+
+
+
)}
diff --git a/studio/components/interfaces/Reports/ReportFilterBar.tsx b/studio/components/interfaces/Reports/ReportFilterBar.tsx
index 6b0dba60aca..15bc75c22ec 100644
--- a/studio/components/interfaces/Reports/ReportFilterBar.tsx
+++ b/studio/components/interfaces/Reports/ReportFilterBar.tsx
@@ -99,7 +99,7 @@ const ReportFilterBar: FC = ({
]
const [showAdder, setShowAdder] = useState(false)
const [currentProductFilter, setCurrentProductFilter] = useState<
- null | typeof PRODUCT_FILTERS[number]
+ null | (typeof PRODUCT_FILTERS)[number]
>(null)
const [addFilterValues, setAddFilterValues] = useState({
key: filterKeys[0],
@@ -116,7 +116,7 @@ const ReportFilterBar: FC = ({
}
const handleProductFilterChange = async (
- nextProductFilter: null | typeof PRODUCT_FILTERS[number]
+ nextProductFilter: null | (typeof PRODUCT_FILTERS)[number]
) => {
const toRemove = PRODUCT_FILTERS.map(
(productFilter) =>
@@ -156,6 +156,7 @@ const ReportFilterBar: FC = ({
All Requests
+
{PRODUCT_FILTERS.map((productFilter) => {
const Icon = productFilter.icon
return (
@@ -163,7 +164,6 @@ const ReportFilterBar: FC = ({
key={productFilter.key}
disabled={productFilter.key === currentProductFilter?.key}
onClick={() => handleProductFilterChange(productFilter)}
- className="hover:bg-scale-600"
icon={ }
>
= (props) => {
-
-
-
- {props.tooltip}
-
-
+
+
+
+
+ {props.tooltip}
+
+
+
)}
@@ -80,17 +82,19 @@ const ReportWidget: React.FC = (props) => {
}}
/>
-
-
-
- Open in Logs Explorer
-
-
+
+
+
+
+ Open in Logs Explorer
+
+
+
diff --git a/studio/components/interfaces/Reports/Reports.tsx b/studio/components/interfaces/Reports/Reports.tsx
index ec43b8041ec..ecf0223e60c 100644
--- a/studio/components/interfaces/Reports/Reports.tsx
+++ b/studio/components/interfaces/Reports/Reports.tsx
@@ -275,7 +275,7 @@ const Reports = () => {
return (
x.attribute === metric.key)}
+ checked={config.layout?.some((x: any) => x.attribute === metric.key)}
onChange={(e) => handleChartSelection({ metric, value: e })}
>
@@ -360,19 +360,21 @@ const Reports = () => {
Add / Remove charts
-
-
-
-
- You need additional permissions to update this project's report
-
-
-
+
+
+
+
+
+ You need additional permissions to update this project's report
+
+
+
+
)}
diff --git a/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx b/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx
index 59cd87f4141..eb9389602fc 100644
--- a/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx
+++ b/studio/components/interfaces/SQLEditor/TabSqlQuery/FavouriteButton.tsx
@@ -112,20 +112,22 @@ const FavouriteButton = () => {
return (
<>
-
-
-
-
- {isFavorite ? 'Remove' : 'Add'} this query {isFavorite ? 'from' : 'to'} your
- Favourites
-
-
-
+
+
+
+
+
+ {isFavorite ? 'Remove' : 'Add'} this query {isFavorite ? 'from' : 'to'} your
+ Favourites
+
+
+
+
= ({ updateSqlSnippet }) => {
-
-
-
- Saving changes...
-
-
+
+
+
+
+ Saving changes...
+
+
+
)}
{(content.savingState === 'CREATING_FAILED' || content.savingState === 'UPDATING_FAILED') && (
@@ -85,17 +87,19 @@ const SavingIndicator: FC = ({ updateSqlSnippet }) => {
-
-
-
- All changes saved
-
-
+
+
+
+
+ All changes saved
+
+
+
)}
diff --git a/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx b/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx
index fa06f309151..af809c2676a 100644
--- a/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx
+++ b/studio/components/interfaces/SQLEditor/TabSqlQuery/UtilityActions.tsx
@@ -46,19 +46,21 @@ const UtilityActions = ({ updateSqlSnippet }: UtilityActionsProps) => {
-
-
-
-
- Queries are not saved as you do not have sufficient permissions
-
-
-
+
+
+
+
+
+ Queries are not saved as you do not have sufficient permissions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/API/JWTSettings.tsx b/studio/components/interfaces/Settings/API/JWTSettings.tsx
index f05341b37cf..8a0c66ed22a 100644
--- a/studio/components/interfaces/Settings/API/JWTSettings.tsx
+++ b/studio/components/interfaces/Settings/API/JWTSettings.tsx
@@ -165,19 +165,21 @@ const JWTSettings: FC = ({}) => {
Generate a new secret
-
-
-
-
- You need additional permissions to generate a new JWT secret
-
-
-
+
+
+
+
+
+ You need additional permissions to generate a new JWT secret
+
+
+
+
) : (
= ({ disabled = false }) => {
{!canResetDbPassword && (
-
-
-
-
- You need additional permissions to reset the database password
-
-
-
+
+
+
+
+
+ You need additional permissions to reset the database password
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx b/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
index c2cfd9755f4..b79d99fa3c6 100644
--- a/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
+++ b/studio/components/interfaces/Settings/Database/NetworkRestrictions/AddRestrictionModal.tsx
@@ -154,22 +154,24 @@ const AddRestrictionModal: FC = ({
-
-
-
-
- Classless inter-domain routing (CIDR) notation is the notation
- used to identify networks and hosts in the networks. The block
- size tells us how many bits we need to take for the network
- prefix, and is a value between 0 to 32.
-
-
-
+
+
+
+
+
+ Classless inter-domain routing (CIDR) notation is the notation
+ used to identify networks and hosts in the networks. The block
+ size tells us how many bits we need to take for the network
+ prefix, and is a value between 0 to 32.
+
+
+
+
}
diff --git a/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx b/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx
index b3c47c59119..7f09507c99c 100644
--- a/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx
+++ b/studio/components/interfaces/Settings/Database/NetworkRestrictions/NetworkRestrictions.tsx
@@ -25,19 +25,21 @@ const AllowAllAccessButton: FC<{ disabled: boolean; onClick: (value: boolean) =>
{disabled && (
-
-
-
-
- You need additional permissions to update network restrictions
-
-
-
+
+
+
+
+
+ You need additional permissions to update network restrictions
+
+
+
+
)}
)
@@ -53,19 +55,21 @@ const DisallowAllAccessButton: FC<{ disabled: boolean; onClick: (value: boolean)
{disabled && (
-
-
-
-
- You need additional permissions to update network restrictions
-
-
-
+
+
+
+
+
+ You need additional permissions to update network restrictions
+
+
+
+
)}
)
@@ -118,19 +122,21 @@ const NetworkRestrictions = ({}) => {
{!canUpdateNetworkRestrictions && (
-
-
-
-
- You need additional permissions to update network restrictions
-
-
-
+
+
+
+
+
+ You need additional permissions to update network restrictions
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx b/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
index 9f1f8596905..92e146e911e 100644
--- a/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
+++ b/studio/components/interfaces/Settings/Database/SSLConfiguration.tsx
@@ -152,20 +152,22 @@ const SSLConfiguration = () => {
{!hasSSLCertificate && (
-
-
-
-
- Projects before 15:08 (GMT+08), 29th April 2021 do not have SSL certificates
- installed
-
-
-
+
+
+
+
+
+ Projects before 15:08 (GMT+08), 29th April 2021 do not have SSL certificates
+ installed
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
index a316a3b1bf6..7a80c2d4b9f 100644
--- a/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
+++ b/studio/components/interfaces/Settings/General/DeleteProjectPanel/DeleteProjectButton.tsx
@@ -81,9 +81,9 @@ const DeleteProjectButton: FC = ({ type = 'danger' }) => {
if (!isFree) {
const feedbackRes = await post(`${API_URL}/feedback/downgrade`, {
projectRef,
- reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
- additionalFeedback: cancellationMessage,
- exitAction: 'delete',
+ reasons: selectedReasons.reduce((a, b) => `${a}- ${b}\n`, ''),
+ additionalFeedback: cancellationMessage,
+ exitAction: 'delete',
})
if (feedbackRes.error) throw feedbackRes.error
}
@@ -98,19 +98,21 @@ const DeleteProjectButton: FC = ({ type = 'danger' }) => {
{!canDeleteProject && (
-
-
-
-
- You need additional permissions to delete this project
-
-
-
+
+
+
+
+
+ You need additional permissions to delete this project
+
+
+
+
)}
= ({}) => {
Latest
-
-
-
-
- Project is on the latest version of Postgres that Supabase supports
-
-
-
+
+
+
+
+
+ Project is on the latest version of Postgres that Supabase supports
+
+
+
+
),
]}
diff --git a/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx b/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx
index 9c198671b9e..449c6f1fb13 100644
--- a/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx
+++ b/studio/components/interfaces/Settings/General/Infrastructure/PauseProjectButton.tsx
@@ -73,31 +73,35 @@ const PauseProjectButton: FC = observer(({ projectRef, projectId }) => {
{isPaused ? (
-
-
-
- Your project is already paused
-
-
+
+
+
+
+ Your project is already paused
+
+
+
) : !canPauseProject ? (
-
-
-
-
- You need additional permissions to pause this project
-
-
-
+
+
+
+
+
+ You need additional permissions to pause this project
+
+
+
+
) : (
<>>
)}
diff --git a/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx b/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
index adbc60926ea..8099afc7b63 100644
--- a/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
+++ b/studio/components/interfaces/Settings/General/Infrastructure/RestartServerButton.tsx
@@ -122,19 +122,21 @@ const RestartServerButton: FC = ({ project }) => {
{!canRestartProject && (
-
-
-
-
- You need additional permissions to restart this project
-
-
-
+
+
+
+
+
+ You need additional permissions to restart this project
+
+
+
+
)}
= ({
)}
}
- portalled
showClose
side="bottom"
>
diff --git a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
index 3707cf06f8d..9baa2711c85 100644
--- a/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
+++ b/studio/components/interfaces/Settings/Logs/LogsQueryPanel.tsx
@@ -102,7 +102,6 @@ const LogsQueryPanel = ({
}`}
>
@@ -143,19 +142,21 @@ const LogsQueryPanel = ({
{!canCreateLogQuery && (
-
-
-
-
- You need additional permissions to save your query
-
-
-
+
+
+
+
+
+ You need additional permissions to save your query
+
+
+
+
)}
)}
diff --git a/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx b/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
index f6351377d9d..431cfb6afe9 100644
--- a/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
+++ b/studio/components/interfaces/Settings/Logs/UpgradePrompt.tsx
@@ -62,13 +62,14 @@ const UpgradePrompt: React.FC
= ({ show, setShowUpgradePrompt }) => {
-
+
setShowUpgradePrompt(false)}>
Close
-
-
-
Upgrade
+
+
+ Upgrade
+
diff --git a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
index b91e9c99bb9..a5439c7878b 100644
--- a/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
+++ b/studio/components/interfaces/Settings/ProjectUsageBars/ProjectUsageBars.tsx
@@ -136,7 +136,9 @@ const ProjectUsage: FC
= ({ projectRef }) => {
for a full breakdown of available plans.
- Upgrade to Pro
+
+ Upgrade to Pro
+
) : (
@@ -148,7 +150,9 @@ const ProjectUsage: FC = ({ projectRef }) => {
spend cap and pay for over-usage beyond the quota.
- Configure Spend Cap
+
+ Configure Spend Cap
+
)}
@@ -263,21 +267,23 @@ const ProjectUsage: FC = ({ projectRef }) => {
-
-
-
-
- {feature.tooltip}
-
-
-
+
+
+
+
+
+ {feature.tooltip}
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx b/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx
index 63cac0d9820..6010ec432ca 100644
--- a/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx
+++ b/studio/components/interfaces/Settings/Vault/Keys/EncryptionKeysManagement.tsx
@@ -157,19 +157,21 @@ const EncryptionKeysManagement: FC = ({}) => {
{!canManageKeys && (
-
-
-
-
- You need additional permissions to add keys
-
-
-
+
+
+
+
+
+ You need additional permissions to add keys
+
+
+
+
)}
@@ -215,19 +217,21 @@ const EncryptionKeysManagement: FC = ({}) => {
/>
{!canManageKeys && (
-
-
-
-
- You need additional permissions to delete keys
-
-
-
+
+
+
+
+
+ You need additional permissions to delete keys
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx b/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx
index c3c08a02e92..9ff849dd7ae 100644
--- a/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx
+++ b/studio/components/interfaces/Settings/Vault/Secrets/SecretRow.tsx
@@ -121,19 +121,21 @@ const SecretRow: FC = ({ secret, onSelectEdit, onSelectRemove }) => {
{!canManageSecrets && (
-
-
-
-
- You need additional permissions to edit secrets
-
-
-
+
+
+
+
+
+ You need additional permissions to edit secrets
+
+
+
+
)}
@@ -147,19 +149,21 @@ const SecretRow: FC = ({ secret, onSelectEdit, onSelectRemove }) => {
{!canManageSecrets && (
-
-
-
-
- You need additional permissions to delete secrets
-
-
-
+
+
+
+
+
+ You need additional permissions to delete secrets
+
+
+
+
)}
>
diff --git a/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx b/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx
index 05ca9c5d11c..b3adab646d4 100644
--- a/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx
+++ b/studio/components/interfaces/Settings/Vault/Secrets/SecretsManagement.tsx
@@ -120,19 +120,21 @@ const SecretsManagement: FC = ({}) => {
{!canManageSecrets && (
-
-
-
-
- You need additional permissions to add secrets
-
-
-
+
+
+
+
+
+ You need additional permissions to add secrets
+
+
+
+
)}
diff --git a/studio/components/interfaces/Settings/Vault/VaultToggle.tsx b/studio/components/interfaces/Settings/Vault/VaultToggle.tsx
index 4f7c679b2ba..f03f88633c7 100644
--- a/studio/components/interfaces/Settings/Vault/VaultToggle.tsx
+++ b/studio/components/interfaces/Settings/Vault/VaultToggle.tsx
@@ -128,19 +128,21 @@ const VaultToggle: FC = () => {
{!canToggleVault && (
-
-
-
-
- You need additional permissions to enable Vault for this project
-
-
-
+
+
+
+
+
+ You need additional permissions to enable Vault for this project
+
+
+
+
)}
diff --git a/studio/components/interfaces/Support/Success.tsx b/studio/components/interfaces/Support/Success.tsx
index 0293f7283a0..45663e5d379 100644
--- a/studio/components/interfaces/Support/Success.tsx
+++ b/studio/components/interfaces/Support/Success.tsx
@@ -71,7 +71,9 @@ const Success: FC = ({ sentCategory = '' }) => {
diff --git a/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx b/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
index 739df8e8d54..543b78c669c 100644
--- a/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
+++ b/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx
@@ -55,19 +55,21 @@ const GridHeaderActions: FC = ({
Viewing as read-only
-
-
-
-
- You need additional permissions to manage your project's data
-
-
-
+
+
+
+
+
+ You need additional permissions to manage your project's data
+
+
+
+
)}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
index 59da15bb67b..af4232ea154 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/InputWithSuggestions.tsx
@@ -112,19 +112,21 @@ const InputWithSuggestions: FC
= ({
icon={ }
/>
-
-
-
-
- {suggestionsTooltip || 'Suggestions'}
-
-
-
+
+
+
+
+
+ {suggestionsTooltip || 'Suggestions'}
+
+
+
+
)
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
index 916a162106b..1e5a32085d2 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ForeignKeySelector/ForeignKeySelector.utils.tsx
@@ -33,20 +33,22 @@ export const generateDeletionActionDescription = (deletionAction: string, refere
-
-
-
-
- This is similar to no action, but the restrict check cannot be deferred till later
- in the transaction
-
-
-
+
+
+
+
+
+ This is similar to no action, but the restrict check cannot be deferred till
+ later in the transaction
+
+
+
+
: Deleting a record from {reference} will{' '}
prevent deletion of existing
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx
index f57ba551d13..a77e38a9039 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/ForeignRowSelector/SelectorGrid.tsx
@@ -24,12 +24,14 @@ const columnRender = (name: string, isPrimaryKey = false) => {
-
-
-
- Primary key
-
-
+
+
+
+
+ Primary key
+
+
+
)}
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
index 1305a22b45f..d9b4c832d28 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx
@@ -102,39 +102,42 @@ const Column: FC = ({
-
-
-
- {column.foreignKey === undefined ? (
-
Edit foreign key relation
- ) : (
-
-
Foreign key relation:
-
-
- {column.foreignKey.source_schema}.{column.foreignKey.source_table_name}.
- {column.foreignKey.source_column_name}
-
-
-
- {column.foreignKey.target_table_schema}.{column.foreignKey.target_table_name}.
- {column.foreignKey.target_column_name}
-
+
+
+
+
+ {column.foreignKey === undefined ? (
+
Edit foreign key relation
+ ) : (
+
+
Foreign key relation:
+
+
+ {column.foreignKey.source_schema}.{column.foreignKey.source_table_name}.
+ {column.foreignKey.source_column_name}
+
+
+
+ {column.foreignKey.target_table_schema}.
+ {column.foreignKey.target_table_name}.{column.foreignKey.target_column_name}
+
+
+ {column.foreignKey.deletion_action !==
+ FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
+
+ On delete: {getForeignKeyDeletionAction(column.foreignKey.deletion_action)}
+
+ )}
- {column.foreignKey.deletion_action !== FOREIGN_KEY_DELETION_ACTION.NO_ACTION && (
-
- On delete: {getForeignKeyDeletionAction(column.foreignKey.deletion_action)}
-
- )}
-
- )}
-
-
+ )}
+
+
+
@@ -190,6 +193,7 @@ const Column: FC
= ({
Extra options
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
index cf9b0c06f10..d01b213b3ab 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/ColumnManagement.tsx
@@ -202,20 +202,22 @@ const ColumnManagement: FC = ({
-
-
-
-
- Recommended to use lowercase and use an underscore to separate words e.g.
- column_name
-
-
-
+
+
+
+
+
+ Recommended to use lowercase and use an underscore to separate words e.g.
+ column_name
+
+
+
+
@@ -230,19 +232,21 @@ const ColumnManagement: FC
= ({
-
-
-
-
- Can be either a value or a SQL expression
-
-
-
+
+
+
+
+
+ Can be either a value or a SQL expression
+
+
+
+
diff --git a/studio/components/layouts/ProjectLayout/BuildingState.tsx b/studio/components/layouts/ProjectLayout/BuildingState.tsx
index 01b4af13c10..06c7c221db9 100644
--- a/studio/components/layouts/ProjectLayout/BuildingState.tsx
+++ b/studio/components/layouts/ProjectLayout/BuildingState.tsx
@@ -111,7 +111,9 @@ const BuildingState: FC
= ({ project }) => {
support ticket.
- Contact support team
+
+ Contact support team
+
>
}
diff --git a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
index 0436b50b488..7f8bdc90e39 100644
--- a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
+++ b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
@@ -37,9 +37,11 @@ const HelpPopover: FC = () => {
diff --git a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx
index e1d751dd6b4..078addfffa2 100644
--- a/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx
+++ b/studio/components/layouts/ProjectLayout/NavigationBar/NavigationIconButton.tsx
@@ -31,17 +31,19 @@ const NavigationIconButton: FC = ({ route, isActive = false }) => {
-
-
-
- {route.label}
-
-
+
+
+
+
+ {route.label}
+
+
+
)
}
diff --git a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
index 8181045826d..0733a2fbc81 100644
--- a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
@@ -72,19 +72,21 @@ const ProjectPausedState: FC = ({ project }) => {
{!canResumeProject && (
-
-
-
-
- You need additional permissions to resume this project
-
-
-
+
+
+
+
+
+ You need additional permissions to resume this project
+
+
+
+
)}
diff --git a/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx b/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx
index 8413e9a37cf..561f596c4c0 100644
--- a/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx
+++ b/studio/components/layouts/ProjectLayout/UpgradingState/UpgradingState.tsx
@@ -203,17 +203,19 @@ const UpgradingState = () => {
Started on: {initiatedAtUTC} (UTC)
-
-
-
- {initiatedAt}
-
-
+
+
+
+
+ {initiatedAt}
+
+
+
)}
diff --git a/studio/components/layouts/StorageLayout/StorageMenu.tsx b/studio/components/layouts/StorageLayout/StorageMenu.tsx
index 1d2a88de2fd..be1575b9caa 100644
--- a/studio/components/layouts/StorageLayout/StorageMenu.tsx
+++ b/studio/components/layouts/StorageLayout/StorageMenu.tsx
@@ -54,19 +54,21 @@ const StorageMenu: FC = () => {
{!canCreateBuckets && (
-
-
-
-
- You need additional permissions to create buckets
-
-
-
+
+
+
+
+
+ You need additional permissions to create buckets
+
+
+
+
)}
diff --git a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
index 865782e3da6..2ad3668090f 100644
--- a/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
+++ b/studio/components/layouts/TableEditorLayout/TableEditorMenu.tsx
@@ -186,19 +186,21 @@ const TableEditorMenu = ({
{!canCreateTables && (
-
-
-
-
- You need additional permissions to create tables
-
-
-
+
+
+
+
+
+ You need additional permissions to create tables
+
+
+
+
)}
@@ -307,18 +309,19 @@ const TableEditorMenu = ({
-
-
-
-
- Sort By
-
-
+
+
+
+
+ Sort By
+
+
+
@@ -397,7 +400,7 @@ const EntityListItem = ({
hoverText={entity.comment ? entity.comment : entity.name}
isActive={isActive}
icon={
-
+
{entity.type === ENTITY_TYPE.TABLE ? (
)}
-
-
-
-
- {formatTooltipText(entity.type)}
-
-
-
+
+
+
+
+
+ {formatTooltipText(entity.type)}
+
+
+
+
}
action={
diff --git a/studio/components/to-be-cleaned/ProductEmptyState.tsx b/studio/components/to-be-cleaned/ProductEmptyState.tsx
index 304e3ffd4d3..0c22a898885 100644
--- a/studio/components/to-be-cleaned/ProductEmptyState.tsx
+++ b/studio/components/to-be-cleaned/ProductEmptyState.tsx
@@ -45,17 +45,19 @@ const ProductEmptyState: FC = ({
{disabled && disabledMessage.length > 0 && (
-
-
-
- {disabledMessage}
-
-
+
+
+
+
+ {disabledMessage}
+
+
+
)}
)}
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx
index d3b10ab5108..cf250949884 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerHeader.tsx
@@ -409,19 +409,21 @@ const FileExplorerHeader: FC = ({
{!canUpdateStorage && (
-
-
-
-
- You need additional permissions to upload files
-
-
-
+
+
+
+
+
+ You need additional permissions to upload files
+
+
+
+
)}
@@ -436,19 +438,21 @@ const FileExplorerHeader: FC = ({
{!canUpdateStorage && (
-
-
-
-
- You need additional permissions to create folders
-
-
-
+
+
+
+
+
+ You need additional permissions to create folders
+
+
+
+
)}
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx
index 2b80cbabb77..be84f2c6a88 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerRow.tsx
@@ -404,19 +404,21 @@ const FileExplorerRow: FC = ({
-
-
-
-
- File is corrupted, please delete and reupload again.
-
-
-
+
+
+
+
+
+ File is corrupted, please delete and reupload again.
+
+
+
+
)}
diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx b/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx
index a248ebe4ad4..2dd3a029e33 100644
--- a/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx
+++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/PreviewPane.tsx
@@ -255,19 +255,21 @@ const PreviewPane = () => {
{!canUpdateFiles && (
-
-
-
-
- You need additional permissions to delete this file
-
-
-
+
+
+
+
+
+ You need additional permissions to delete this file
+
+
+
+
)}
diff --git a/studio/components/ui/Logs/LogsExplorerHeader.tsx b/studio/components/ui/Logs/LogsExplorerHeader.tsx
index b6d211f92b3..aa4ca18c83a 100644
--- a/studio/components/ui/Logs/LogsExplorerHeader.tsx
+++ b/studio/components/ui/Logs/LogsExplorerHeader.tsx
@@ -135,34 +135,38 @@ const LogsExplorerHeader: FC = ({ subtitle }) => {
-
-
-
- Copied
-
-
+
+
+
+
+ Copied
+
+
+
) : (
-
-
-
- Copy value
-
-
+
+
+
+
+ Copy value
+
+
+
)}
diff --git a/studio/components/ui/UpgradeToPro.tsx b/studio/components/ui/UpgradeToPro.tsx
index ccee10b1295..81ba2eedb2d 100644
--- a/studio/components/ui/UpgradeToPro.tsx
+++ b/studio/components/ui/UpgradeToPro.tsx
@@ -63,29 +63,31 @@ const UpgradeToPro: FC = ({ icon, primaryText, projectRef, secondaryText
{!canUpdateSubscription || projectUpdateDisabled ? (
-
-
-
-
- {projectUpdateDisabled ? (
- <>
- Subscription changes are currently disabled.
-
- Our engineers are working on a fix.
- >
- ) : !canUpdateSubscription ? (
- 'You need additional permissions to amend subscriptions'
- ) : (
- ''
- )}
-
-
-
+
+
+
+
+
+ {projectUpdateDisabled ? (
+ <>
+ Subscription changes are currently disabled.
+
+ Our engineers are working on a fix.
+ >
+ ) : !canUpdateSubscription ? (
+ 'You need additional permissions to amend subscriptions'
+ ) : (
+ ''
+ )}
+
+
+
+
) : (
<>>
)}
diff --git a/studio/package.json b/studio/package.json
index dc6c1024dd9..f88457c8533 100644
--- a/studio/package.json
+++ b/studio/package.json
@@ -21,8 +21,8 @@
"@headlessui/react": "^1.4.1",
"@monaco-editor/react": "^4.3.1",
"@next/bundle-analyzer": "^12.0.4",
- "@radix-ui/react-portal": "^0.1.1",
- "@radix-ui/react-tooltip": "^0.1.6",
+ "@radix-ui/react-portal": "^1.0.1",
+ "@radix-ui/react-tooltip": "^1.0.5",
"@scaleleap/pg-format": "^1.0.0",
"@sentry/browser": "^6.15.0",
"@sentry/nextjs": "^6.17.4",
@@ -57,7 +57,7 @@
"markdown-table": "=2.0.0",
"mobx": "^6.3.2",
"mobx-react-lite": "^3.2.0",
- "next": "12.1.0",
+ "next": "12.3.2",
"next-compose-plugins": "^2.2.1",
"next-transpile-modules": "^9.0.0",
"openapi-types": "^9.1.0",
@@ -142,8 +142,7 @@
"postcss": "^8.4.6",
"prettier": "^2.7.1",
"storybook-dark-mode": "^1.0.4",
- "tailwindcss": "^3.0.22",
- "ts-jest": "^27.0.7",
+ "tailwindcss": "^3.0.15",
"typescript": "4.8.4"
}
}
diff --git a/studio/pages/_app.tsx b/studio/pages/_app.tsx
index 96d5f954a5d..054c4fe8cfa 100644
--- a/studio/pages/_app.tsx
+++ b/studio/pages/_app.tsx
@@ -40,6 +40,8 @@ import { PortalToast, RouteValidationWrapper, AppBannerWrapper } from 'component
import PageTelemetry from 'components/ui/PageTelemetry'
import FlagProvider from 'components/ui/Flag/FlagProvider'
import useAutoAuthRedirect from 'hooks/misc/useAutoAuthRedirect'
+// import CommandMenuProvider from 'ui/src/components/Command/CommandMenuProvider'
+import { TooltipProvider } from '@radix-ui/react-tooltip'
dayjs.extend(customParseFormat)
dayjs.extend(utc)
@@ -109,13 +111,19 @@ function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
gtag('js', new Date());
gtag('config', '${process.env.NEXT_PUBLIC_GA4_MEASUREMENT_ID}', { 'send_page_view': false });
- `}
+ `}
-
- {getLayout( )}
-
+
+
+
+ {/* */}
+ {getLayout( )}
+ {/* */}
+
+
+
diff --git a/studio/pages/join/index.tsx b/studio/pages/join/index.tsx
index 89a7f563bb7..2f462f2f535 100644
--- a/studio/pages/join/index.tsx
+++ b/studio/pages/join/index.tsx
@@ -212,14 +212,14 @@ const JoinOrganizationPage = () => {
diff --git a/studio/pages/support/new.tsx b/studio/pages/support/new.tsx
index 4e5ff5c2e5a..a3e256afafa 100644
--- a/studio/pages/support/new.tsx
+++ b/studio/pages/support/new.tsx
@@ -58,17 +58,19 @@ const SupportPage = () => {
-
-
-
- Check Supabase status page
-
-
+
+
+
+
+ Check Supabase status page
+
+
+
diff --git a/studio/styles/main.scss b/studio/styles/main.scss
index e3d187c24c4..b25a92f920c 100644
--- a/studio/styles/main.scss
+++ b/studio/styles/main.scss
@@ -184,10 +184,6 @@ div[data-radix-portal]:not(.portal--toast) {
}
}
-div.fixed.inset-0 {
- z-index: 11 !important;
-}
-
.recharts-tooltip-cursor {
@apply fill-transparent;
}
@@ -236,4 +232,9 @@ div.fixed.inset-0 {
input {
@apply pr-7;
}
-}
\ No newline at end of file
+}
+
+// to do: remove this CSS and do the same thing in a reusable tooltip component
+[data-radix-popper-content-wrapper] {
+ @apply z-50 #{!important};
+}
diff --git a/studio/styles/ui.scss b/studio/styles/ui.scss
index 8903cb37368..b9191559f62 100644
--- a/studio/styles/ui.scss
+++ b/studio/styles/ui.scss
@@ -418,8 +418,9 @@
rect {
@apply fill-blue-500 stroke-blue-500;
}
- path, circle {
- @apply stroke-blue-900 fill-blue-500;;
+ path,
+ circle {
+ @apply stroke-blue-900 fill-blue-500;
}
}
@@ -430,4 +431,4 @@
line {
@apply stroke-green-500;
}
-}
\ No newline at end of file
+}
diff --git a/studio/tailwind.config.js b/studio/tailwind.config.js
index 42d8f6c8553..6cf20d5b59a 100644
--- a/studio/tailwind.config.js
+++ b/studio/tailwind.config.js
@@ -37,6 +37,7 @@ module.exports = ui({
'./lib/**/*.{js,ts,jsx,tsx}',
'./lib/**/**/*.{js,ts,jsx,tsx}',
'./../packages/ui/src/lib/theme/defaultTheme.ts',
+ './../packages/ui/src/components/**/*.{ts,tsx}',
// purge styles from supabase ui theme
// './../node_modules/ui/dist/config/default-theme.js',
// purge styles from grid library
diff --git a/studio/tests/helpers.tsx b/studio/tests/helpers.tsx
index 6aacb05b4de..8dbd99290f2 100644
--- a/studio/tests/helpers.tsx
+++ b/studio/tests/helpers.tsx
@@ -5,6 +5,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { render as originalRender } from '@testing-library/react'
import { RootStore } from 'stores'
import { StoreProvider } from 'hooks'
+import { TooltipProvider } from '@radix-ui/react-tooltip'
interface SelectorOptions {
container?: HTMLElement
}
@@ -68,7 +69,9 @@ const ReactQueryTestConfig: React.FC = ({ children }) => {
return (
- {children}
+
+ {children}
+
)
}
diff --git a/studio/types/next.ts b/studio/types/next.ts
index 629d626cc8b..440e552e411 100644
--- a/studio/types/next.ts
+++ b/studio/types/next.ts
@@ -2,11 +2,11 @@ import { NextPage } from 'next'
import { AppProps } from 'next/app'
import { ComponentType, ReactElement, ReactNode } from 'react'
-export type AppPropsWithLayout = AppProps & {
+export type AppPropsWithLayout = AppProps<{ dehydratedState: any }> & {
Component: NextPageWithLayout
}
-export type NextPageWithLayout = NextPage
& {
+export type NextPageWithLayout
= NextPage
& {
getLayout?: (page: ReactElement) => ReactNode
}
diff --git a/studio/types/sse.d.ts b/studio/types/sse.d.ts
new file mode 100644
index 00000000000..dbf97ac0836
--- /dev/null
+++ b/studio/types/sse.d.ts
@@ -0,0 +1,12 @@
+declare module 'sse.js' {
+ export type SSEOptions = EventSourceInit & {
+ headers?: Record
+ payload?: string
+ method?: string
+ }
+
+ export class SSE extends EventSource {
+ constructor(url: string | URL, sseOptions?: SSEOptions)
+ stream(): void
+ }
+}
diff --git a/supabase/functions/clippy-search/index.ts b/supabase/functions/clippy-search/index.ts
index 5ca3b422246..de86010809b 100644
--- a/supabase/functions/clippy-search/index.ts
+++ b/supabase/functions/clippy-search/index.ts
@@ -3,7 +3,13 @@ import 'https://deno.land/x/xhr@0.2.1/mod.ts'
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2.5.0'
import { codeBlock, oneLine } from 'https://esm.sh/common-tags@1.8.2'
import GPT3Tokenizer from 'https://esm.sh/gpt3-tokenizer@1.1.5'
-import { Configuration, CreateCompletionRequest, OpenAIApi } from 'https://esm.sh/openai@3.1.0'
+import {
+ ChatCompletionRequestMessage,
+ ChatCompletionRequestMessageRoleEnum,
+ Configuration,
+ CreateChatCompletionRequest,
+ OpenAIApi,
+} from 'https://esm.sh/openai@3.2.1'
import { ApplicationError, UserError } from '../common/errors.ts'
const openAiKey = Deno.env.get('OPENAI_KEY')
@@ -46,6 +52,9 @@ serve(async (req) => {
throw new UserError('Missing query in request data')
}
+ // Intentionally log the query
+ console.log({ query })
+
const sanitizedQuery = query.trim()
const supabaseClient = createClient(supabaseUrl, supabaseServiceKey)
@@ -127,15 +136,76 @@ serve(async (req) => {
Answer as markdown (including related code snippets if available):
`
- const completionOptions: CreateCompletionRequest = {
- model: 'text-davinci-003',
- prompt,
- max_tokens: 512,
+ const messages: ChatCompletionRequestMessage[] = [
+ {
+ role: ChatCompletionRequestMessageRoleEnum.System,
+ content: codeBlock`
+ ${oneLine`
+ You are a very enthusiastic Supabase AI who loves
+ to help people! Given the following information from
+ the Supabase documentation, answer the user's question using
+ only that information, outputted in markdown format.
+ `}
+
+ ${oneLine`
+ If you are unsure
+ and the answer is not explicitly written in the documentation, say
+ "Sorry, I don't know how to help with that."
+ `}
+
+ ${oneLine`
+ Always include related code snippets if available.
+ `}
+ `,
+ },
+ {
+ role: ChatCompletionRequestMessageRoleEnum.User,
+ content: codeBlock`
+ Here is the Supabase documentation:
+ ${contextText}
+ `,
+ },
+ {
+ role: ChatCompletionRequestMessageRoleEnum.User,
+ content: codeBlock`
+ ${oneLine`
+ Answer my next question using only the above documentation.
+ You must also follow the below rules when answering:
+ `}
+ ${oneLine`
+ - Do not make up answers that are not provided in the documentation.
+ `}
+ ${oneLine`
+ - If you are unsure and the answer is not explicitly written
+ in the documentation context, say
+ "Sorry, I don't know how to help with that."
+ `}
+ ${oneLine`
+ - Prefer splitting your response into multiple paragraphs.
+ `}
+ ${oneLine`
+ - Output as markdown with code snippets if available.
+ `}
+ `,
+ },
+ {
+ role: ChatCompletionRequestMessageRoleEnum.User,
+ content: codeBlock`
+ Here is my question:
+ ${oneLine`${sanitizedQuery}`}
+ `,
+ },
+ ]
+
+ const completionOptions: CreateChatCompletionRequest = {
+ model: 'gpt-3.5-turbo',
+ messages,
+ max_tokens: 1024,
temperature: 0,
stream: true,
}
- const response = await fetch('https://api.openai.com/v1/completions', {
+ const response = await fetch('https://api.openai.com/v1/chat/completions', {
headers: {
Authorization: `Bearer ${openAiKey}`,
'Content-Type': 'application/json',
diff --git a/supabase/functions/search/index.ts b/supabase/functions/search/index.ts
index a9a09ab2866..3d5c91c2904 100644
--- a/supabase/functions/search/index.ts
+++ b/supabase/functions/search/index.ts
@@ -45,6 +45,9 @@ serve(async (req) => {
throw new UserError('Missing query in request data')
}
+ // Intentionally log the query
+ console.log({ query })
+
const sanitizedQuery = query.trim()
const supabaseClient = createClient(supabaseUrl, supabaseServiceKey)