mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Closes #31221. The applications and shared UI packages still import the former `framer-motion` package instead of Motion's React entry point. ## Solution Replace runtime imports, type imports, and three test mocks with `motion/react` across the consuming workspaces. Replace the seven direct dependency declarations with `motion: ^11.18.2`. Preserve the existing animation engine version and all other dependency resolutions, including the asynchronous `domMax` feature loader. Historical blog examples remain as published; `framer-motion` remains a transitive implementation dependency of Motion. ## Review instructions 1. Run `pnpm install --frozen-lockfile` and check the seven dependency replacements in the lockfile. 2. Open the WWW Auth page and Docs homepage at desktop and mobile widths, with normal and reduced motion preferences. 3. Open the mobile navigation, expand Product on WWW, and close the menu using Escape and the close button. 4. Check the existing animation components, shared form validation, and Studio tests for unchanged behavior. Validation: - Studio: 731 test files, 8,334 passing tests and one expected failure, with `--maxWorkers=4`. - Shared UI, UI patterns, WWW, and UI library: 615 passing tests. - `pnpm run typecheck --concurrency=1`: all 16 repository tasks pass. - All six application source lint scripts and lint ratchets pass; generated Docs example copies are excluded from local lint. - Repository Prettier source check, lockfile formatting, and case hazard check pass. - WWW: 10 existing end-to-end checks across nine pages. - Docs: 5 existing guide link and accessibility checks across Database and Auth. - WWW and Docs mobile navigation pass at desktop/mobile sizes with normal/reduced motion; SQL-to-REST translation tabs exercise the asynchronous feature loader without browser errors. - Frozen-lockfile installation passes; all existing package and snapshot resolutions are unchanged. - Learn and UI library command palettes open, filter results, and close with Escape without browser errors. - Independent code review finds no actionable defects. - `npm run build -- --filter=www --filter=docs --filter=studio --filter=learn --filter=library --concurrency=1 --continue=always`: all five affected applications build successfully (9 tasks including prerequisites); asset uploads disabled for local validation. ## Checklist - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) (no docs topics changed) --------- Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
99 lines
2.8 KiB
TypeScript
99 lines
2.8 KiB
TypeScript
'use client'
|
|
|
|
import days from '~/components/LaunchWeek/7/lw7_days'
|
|
import { motion } from 'motion/react'
|
|
import Image from 'next/image'
|
|
import Link from 'next/link'
|
|
import React from 'react'
|
|
|
|
const BlogLinks = () => {
|
|
const activeDays = days.filter((day) => Date.parse(day.publishedAt) <= Date.now())
|
|
|
|
if (!activeDays.length) return null
|
|
|
|
return (
|
|
<div className="flex flex-col gap-3 lg:gap-4 border-t border-muted py-4 lg:py-8 mt-4 lg:mt-8">
|
|
<h3 className="text-foreground text-xl mb-4">More Launch Week 7</h3>
|
|
{activeDays.map((day) =>
|
|
day.steps?.map((step, i) => {
|
|
return (
|
|
<>
|
|
{!step.hideInBlog && <StepCard step={step} key={i} />}
|
|
{step.steps?.map(
|
|
(nestedStep, i) => !nestedStep.hideInBlog && <StepCard step={nestedStep} key={i} />
|
|
)}
|
|
</>
|
|
)
|
|
})
|
|
)}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
const StepCard = ({ step }: { step: any }) => (
|
|
<motion.div
|
|
className={`h-auto w-full flex flex-col lg:flex-row relative overflow-hidden`}
|
|
initial="default"
|
|
animate="default"
|
|
whileHover="hover"
|
|
>
|
|
<Link
|
|
href={
|
|
(step.blog || step.github || step.hackernews || step.blog || step.docs || '#') as string
|
|
}
|
|
className={`
|
|
flex flex-col flex-1 gap-3 items-start justify-center border rounded-xl h-full relative overflow-hidden
|
|
p-6 lg:p-10 text-2xl bg-[#1C1C1C]
|
|
before:absolute before:w-full before:h-full before:top-52 before:right-0 before:bottom-0 before:left-0
|
|
before:border-[#1f3536] before:-z-10
|
|
`}
|
|
>
|
|
<div className="relative z-10 flex items-center text-lg flex-col-reverse lg:flex-row lg:justify-start gap-2 text-foreground">
|
|
<div
|
|
className={[
|
|
'text-transparent bg-clip-text bg-linear-to-r text-base from-[#F4FFFA] to-[#B7B2C9] drop-shadow-lg',
|
|
step.break_thumb_title && 'max-w-[240px]',
|
|
].join(' ')}
|
|
>
|
|
{step.title}
|
|
</div>
|
|
</div>
|
|
{step.thumb && (
|
|
<motion.div className="absolute inset-0 w-full h-full z-0" variants={hoverVariant}>
|
|
<Image
|
|
src={step.thumb}
|
|
className={`
|
|
absolute
|
|
w-full h-full -z-10 transition-all duration-300
|
|
`}
|
|
layout="fill"
|
|
objectPosition="100% 50%"
|
|
objectFit="cover"
|
|
alt=""
|
|
/>
|
|
</motion.div>
|
|
)}
|
|
<div
|
|
className={`absolute opacity-10 w-full h-full -z-10 transition-all duration-300`}
|
|
style={{
|
|
background: `radial-gradient(650px 150px at 50% 100%, #4635A730, transparent)`,
|
|
}}
|
|
/>
|
|
</Link>
|
|
</motion.div>
|
|
)
|
|
|
|
const defaultEase = [0.5, 0, 0.35, 1]
|
|
const hoverVariant = {
|
|
default: { scale: 1, ease: defaultEase, duration: 0.2 },
|
|
hover: {
|
|
scale: 1.03,
|
|
transition: {
|
|
duration: 0.4,
|
|
ease: defaultEase,
|
|
},
|
|
},
|
|
}
|
|
|
|
export default BlogLinks
|