mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore(studio): remove expired tos update banner (#50533)
This commit is contained in:
1 parent
c8a9a7a630
commit
66d4b4c19b
5 files changed
-147
No files matched your search
@@ -19,13 +19,10 @@ import {
|
||||
SELECT_26_BANNER_PRIORITY,
|
||||
shouldShowSelect26Banner,
|
||||
} from '@/components/ui/BannerStack/Banners/BannerSelect2026.utils'
|
||||
import { BannerTOSUpdate } from '@/components/ui/BannerStack/Banners/BannerTOSUpdate'
|
||||
import { BANNER_ID, useBannerStack } from '@/components/ui/BannerStack/BannerStackProvider'
|
||||
import { useLocalStorageQuery } from '@/hooks/misc/useLocalStorage'
|
||||
import { useTrack } from '@/lib/telemetry/track'
|
||||
|
||||
const TOSUpdateExpiry = new Date('2026-08-29T00:00:00Z')
|
||||
|
||||
// Update this whenever the banner content changes so old client bundles stop
|
||||
// displaying the notice after the removal date passes.
|
||||
const LogsAllDeprecationExpiry = dayjs('2026-09-24T00:00:00Z')
|
||||
@@ -41,11 +38,6 @@ export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {
|
||||
const pathname = usePathname()
|
||||
const track = useTrack()
|
||||
|
||||
const [TOSUpdateAcknowledged, , { isSuccess }] = useLocalStorageQuery(
|
||||
LOCAL_STORAGE_KEYS.TERMS_OF_SERVICE_UPDATE,
|
||||
false
|
||||
)
|
||||
|
||||
const [privacyPolicyUpdateAcknowledged, , { isSuccess: isPrivacyPolicyDismissalLoaded }] =
|
||||
useLocalStorageQuery(LOCAL_STORAGE_KEYS.PRIVACY_POLICY_UPDATE, false)
|
||||
|
||||
@@ -81,21 +73,6 @@ export const AppBannerWrapper = ({ children }: PropsWithChildren<{}>) => {
|
||||
dismissBanner,
|
||||
])
|
||||
|
||||
useEffect(() => {
|
||||
if (Date.now() >= TOSUpdateExpiry.getTime()) return
|
||||
|
||||
if (isSuccess && !TOSUpdateAcknowledged) {
|
||||
addBanner({
|
||||
id: 'tos-update-banner',
|
||||
isDismissed: false,
|
||||
content: <BannerTOSUpdate />,
|
||||
priority: 0,
|
||||
})
|
||||
} else {
|
||||
dismissBanner('tos-update-banner')
|
||||
}
|
||||
}, [TOSUpdateAcknowledged, isSuccess, addBanner, dismissBanner])
|
||||
|
||||
useEffect(() => {
|
||||
if (!isPrivacyPolicyDismissalLoaded || pathname == null) return
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ export const BANNER_ID = {
|
||||
TABLE_EDITOR_QUEUE_OPERATIONS: 'table-editor-queue-operations-banner',
|
||||
RLS_EVENT_TRIGGER: 'rls-event-trigger-banner',
|
||||
FREE_MICRO_UPGRADE: 'free-micro-upgrade-banner',
|
||||
TOS_UPDATE: 'tos-update-banner',
|
||||
PRIVACY_POLICY_UPDATE: 'privacy-policy-update-banner',
|
||||
LOGS_ALL_DEPRECATION: 'logs-all-deprecation-banner',
|
||||
SELECT_26: 'select-2026-banner',
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
import { LOCAL_STORAGE_KEYS } from 'common'
|
||||
import {
|
||||
Badge,
|
||||
Button,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogSection,
|
||||
DialogSectionSeparator,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from 'ui'
|
||||
|
||||
import { InlineLink } from '../../InlineLink'
|
||||
import { BannerCard } from '../BannerCard'
|
||||
import { useBannerStack } from '../BannerStackProvider'
|
||||
import { useLocalStorageQuery } from '@/hooks/misc/useLocalStorage'
|
||||
|
||||
export const BannerTOSUpdate = () => {
|
||||
const { dismissBanner } = useBannerStack()
|
||||
const [, setTOSUpdateAcknowledged] = useLocalStorageQuery(
|
||||
LOCAL_STORAGE_KEYS.TERMS_OF_SERVICE_UPDATE,
|
||||
false
|
||||
)
|
||||
|
||||
return (
|
||||
<BannerCard
|
||||
onDismiss={() => {
|
||||
setTOSUpdateAcknowledged(true)
|
||||
dismissBanner('tos-update-banner')
|
||||
}}
|
||||
>
|
||||
<div className="flex flex-col gap-y-2">
|
||||
<Badge variant="default" className="w-min -ml-0.5 uppercase inline-flex items-center mb-2">
|
||||
Notice
|
||||
</Badge>
|
||||
|
||||
<div className="flex flex-col gap-y-1 mb-2">
|
||||
<p className="text-sm font-medium">We're updating our Terms of Service</p>
|
||||
<p className="text-xs text-foreground-lighter text-balance">
|
||||
Our Data Processing Addendum is now built into the Terms, effective August 1, 2026.
|
||||
</p>
|
||||
</div>
|
||||
<UpdatedTermsOfServiceDialog />
|
||||
</div>
|
||||
</BannerCard>
|
||||
)
|
||||
}
|
||||
|
||||
const UpdatedTermsOfServiceDialog = () => {
|
||||
const [, setTOSUpdateAcknowledged] = useLocalStorageQuery(
|
||||
LOCAL_STORAGE_KEYS.TERMS_OF_SERVICE_UPDATE,
|
||||
false
|
||||
)
|
||||
|
||||
return (
|
||||
<Dialog>
|
||||
<DialogTrigger asChild>
|
||||
<Button className="w-min">Learn more</Button>
|
||||
</DialogTrigger>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>Terms of Service update</DialogTitle>
|
||||
<DialogDescription>
|
||||
We're updating our Terms of Service, effective August 1, 2026.
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<DialogSectionSeparator />
|
||||
|
||||
<DialogSection className="text-sm flex flex-col gap-y-2">
|
||||
<p>What's changing:</p>
|
||||
|
||||
<ul className="list-disc pl-4 flex flex-col gap-y-2">
|
||||
<li>
|
||||
Our{' '}
|
||||
<InlineLink href="https://supabase.com/legal/customer-resources/data-processing-addendum">
|
||||
Data Processing Addendum
|
||||
</InlineLink>{' '}
|
||||
is now built into the Terms, so all customers get its protections automatically. No
|
||||
separate signed DPA is needed.
|
||||
</li>
|
||||
<li>
|
||||
Our subprocessor list now lives at{' '}
|
||||
<InlineLink href="https://supabase.com/legal/customer-resources/subprocessor-list">
|
||||
supabase.com/legal/customer-resources/subprocessor-list
|
||||
</InlineLink>
|
||||
, where you can subscribe to receive updates to the list.
|
||||
</li>
|
||||
<li>
|
||||
We've added provisions to our fees section relevant to fraud prevention and the rights
|
||||
of EU and UK consumers.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The updated Terms (Version 3) take effect on August 1, 2026. By continuing to use the
|
||||
Services after that date, you agree to the updated Terms. You can review the changes{' '}
|
||||
<InlineLink href="https://supabase.com/terms">here</InlineLink>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you have a separate signed subscription agreement or DPA with us, that agreement
|
||||
continues to govern your use of our Services.
|
||||
</p>
|
||||
</DialogSection>
|
||||
|
||||
<DialogFooter>
|
||||
<DialogClose asChild>
|
||||
<Button className="opacity-100" onClick={() => setTOSUpdateAcknowledged(true)}>
|
||||
Understood
|
||||
</Button>
|
||||
</DialogClose>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
@@ -26,7 +26,6 @@ export const test = base.extend<TestOptions>({
|
||||
`table-editor-queue-operations-banner-dismissed-${ref}`,
|
||||
JSON.stringify(true)
|
||||
)
|
||||
localStorage.setItem(`terms-of-service-update-2026-08-01`, JSON.stringify(true))
|
||||
}, ref)
|
||||
await use(page)
|
||||
},
|
||||
|
||||
@@ -81,7 +81,6 @@ export const LOCAL_STORAGE_KEYS = {
|
||||
GITHUB_AUTHORIZATION_STATE: 'supabase-github-authorization-state',
|
||||
// Notice banner keys
|
||||
API_KEYS_FEEDBACK_DISMISSED: (ref: string) => `supabase-api-keys-feedback-dismissed-${ref}`,
|
||||
TERMS_OF_SERVICE_UPDATE: 'terms-of-service-update-2026-08-01',
|
||||
PRIVACY_POLICY_UPDATE: 'privacy-policy-update-2026-09-16-dismissed',
|
||||
SUPAVISOR_MAINTENANCE: (ref: string) => `supavisor-maintenance-2026-06-09-${ref}`,
|
||||
REPORT_DATERANGE: 'supabase-report-daterange',
|
||||
|
||||
Reference in new issue
Block a user