The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Joshen/fe 3213 make rls tester feedback callout more obvious (#45820)
Joshen Lim2d47836f390b
diff --git a/apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx b/apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsxindex e57f1221b14..42a243b2a14 100644--- a/apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx+++ b/apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx@@ -14,7 +14,7 @@ import {SelectValue,} from '@ui/components/shadcn/ui/select'import { LOCAL_STORAGE_KEYS } from 'common'-import { Code } from 'lucide-react'+import { Code, ExternalLink } from 'lucide-react'import { useEffect, useRef, useState } from 'react'import {Button,@@ -42,6 +42,7 @@ import type { Policy } from '@/components/interfaces/Auth/Policies/PolicyTableRoimport { SIDEBAR_KEYS } from '@/components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider'import { AiAssistantDropdown } from '@/components/ui/AiAssistantDropdown'import { FeaturePreviewBadge } from '@/components/ui/FeaturePreviewBadge'+import { useTrack } from '@/lib/telemetry/track'import { useAiAssistantStateSnapshot } from '@/state/ai-assistant-state'import { useRoleImpersonationStateSnapshot } from '@/state/role-impersonation-state'import { useSidebarManagerSnapshot } from '@/state/sidebar-manager-state'@@ -51,6 +52,7 @@ interface RLSTesterSheetProps {}export const RLSTesterSheet = ({ handleSelectEditPolicy }: RLSTesterSheetProps) => {+ const track = useTrack()const aiSnap = useAiAssistantStateSnapshot()const { openSidebar } = useSidebarManagerSnapshot()const { setRole } = useRoleImpersonationStateSnapshot()@@ -103,8 +105,10 @@ export const RLSTesterSheet = ({ handleSelectEditPolicy }: RLSTesterSheetProps)if (format === 'lib') {if (!inferredSQL) returnawait testQuery({ value: acceptUntrustedSql(inferredSQL), ...executionCallbacks })+ track('rls_tester_run_query_clicked', { type: 'inferred' })} else {await testQuery({ value, ...executionCallbacks })+ track('rls_tester_run_query_clicked', { type: 'raw' })}}@@ -272,11 +276,10 @@ export const RLSTesterSheet = ({ handleSelectEditPolicy }: RLSTesterSheetProps)</div><SheetFooter className="sm:justify-between">- <Button asChild type="text">+ <Button asChild type="default" icon={<ExternalLink />}><atarget="_blank"rel="noopener noreferrer"- className="text-foreground-light hover:text-foreground"href="https://github.com/orgs/supabase/discussions/45233">Give feedbackdiff --git a/packages/common/telemetry-constants.ts b/packages/common/telemetry-constants.tsindex 58783240a55..c2a2e865e27 100644--- a/packages/common/telemetry-constants.ts+++ b/packages/common/telemetry-constants.ts@@ -3439,6 +3439,18 @@ export interface HeaderLocalVersionPopoverOpenedEvent {groups: Partial<TelemetryGroups>}+/**+ * User ran a query in the RLS tester feature preview.+ *+ * @group Events+ * @source studio+ */+export interface RLSTesterRunQueryClickedEvent {+ action: 'rls_tester_run_query_clicked'+ properties: { type: 'raw' | 'inferred' }+ groups: Partial<TelemetryGroups>+}+/*** @hidden*/@@ -3638,3 +3650,4 @@ export type TelemetryEvent =| HeaderUserDropdownOpenedEvent| HeaderLocalDropdownOpenedEvent| HeaderLocalVersionPopoverOpenedEvent+ | RLSTesterRunQueryClickedEvent