mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## Problem Launch Week 16 is promoted on www but needs the same promotion in hosted Studio. ## Solution Add a low-priority card to the existing bottom-right Banner Stack across project, organisation, and account pages. It uses the shared dot artwork from #54511, links to the Launch Week site, saves dismissal, and expires after December 11 in San Francisco. Signed-out and self-hosted Studio do not show it. | After | | --- | | <img width="995" height="584" alt="1211" src="https://github.com/user-attachments/assets/ff1a60a3-6a4e-4b32-a3df-7fdfe74f4afb" /> | | <img width="995" height="584" alt="68318" src="https://github.com/user-attachments/assets/3a41c56a-fe59-4800-ae14-82ec42c6f260" /> | ## Review instructions 1. Open a hosted project, organisation, or account page on the Studio preview. If another notice is in front, expand the Banner Stack to find **Launch Week 16**. 2. Check the artwork, copy, and **Claim your ticket** button in light and dark mode. The button opens the Launch Week site in a new tab and dismisses the card. 3. Close the card and reload. It should stay dismissed.
26 lines
765 B
TypeScript
26 lines
765 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { shouldShowLaunchWeek16Banner } from './BannerLaunchWeek16.utils'
|
|
|
|
const eligibleState = {
|
|
isPlatform: true,
|
|
isDismissalLoaded: true,
|
|
isDismissed: false,
|
|
now: Date.parse('2026-12-03T00:00:00Z'),
|
|
}
|
|
|
|
describe('shouldShowLaunchWeek16Banner', () => {
|
|
it('shows the promotion on hosted Studio before the event ends', () => {
|
|
expect(shouldShowLaunchWeek16Banner(eligibleState)).toBe(true)
|
|
})
|
|
|
|
it.each([
|
|
{ isPlatform: false },
|
|
{ isDismissalLoaded: false },
|
|
{ isDismissed: true },
|
|
{ now: Date.parse('2026-12-12T08:00:00Z') },
|
|
])('hides the promotion for ineligible state %o', (state) => {
|
|
expect(shouldShowLaunchWeek16Banner({ ...eligibleState, ...state })).toBe(false)
|
|
})
|
|
})
|