From 95dc07c3f75ea38707950f5337265b98194375b6 Mon Sep 17 00:00:00 2001 From: zhangxiang Date: Tue, 1 Sep 2026 09:11:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor(home):=20=E7=A7=BB=E9=99=A4=20Hero?= =?UTF-8?q?=E3=80=8C=E6=95=B0=E6=8D=AE=E9=A9=B1=E5=8A=A8=E3=80=8D=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E8=A7=86=E8=A7=89=E6=95=B4=E4=B8=AA=E6=9D=BF=E5=9D=97?= =?UTF-8?q?=EF=BC=88=E9=9D=9E=E4=BB=85=E7=9C=89=E6=A0=87=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 hero-product-visual 组件及其测试(该板块仅用于 Hero 右侧,移除后成死代码)。 - home-content-v15:移除 2 列网格的右侧列,Hero 收为单列文本 + 循环粒子层; 同步删除 HeroProductVisual 导入与过时 L3 注释("入场静止"→"持续循环漂移")。 - 删除 home-content-v15 中对已移除板块的测试断言。 注意(视觉回归):home 快照将因右侧板块消失而大幅变化,需在 CI/本地(npx playwright install chromium + npm run dev 后 npm run test) 跑 --update-snapshots 并 review 新基线。 验证:type-check ✅ / lint ✅(0 error) / 单测 ✅(129 套 1628 passed)。 视觉回归像素门禁:本沙箱未装 Playwright 浏览器,未实跑;且因板块移除快照 必然变更,需更新基线。 --- src/app/(marketing)/home-content-v15.test.tsx | 5 - src/app/(marketing)/home-content-v15.tsx | 17 +-- .../sections/hero-product-visual.test.tsx | 27 ---- .../sections/hero-product-visual.tsx | 143 ------------------ 4 files changed, 3 insertions(+), 189 deletions(-) delete mode 100644 src/components/sections/hero-product-visual.test.tsx delete mode 100644 src/components/sections/hero-product-visual.tsx diff --git a/src/app/(marketing)/home-content-v15.test.tsx b/src/app/(marketing)/home-content-v15.test.tsx index 81b8062..bbd2285 100644 --- a/src/app/(marketing)/home-content-v15.test.tsx +++ b/src/app/(marketing)/home-content-v15.test.tsx @@ -126,11 +126,6 @@ describe('HomeContentV15 - 浅色 Hero(暗黑模式 token 友好)', () => { expect(screen.getByTestId('hero-stats')).toBeInTheDocument(); }); - it('renders the abstract data-driven visual without product UI shell', () => { - render(); - - expect(screen.getByTestId('hero-product-visual')).toBeInTheDocument(); - }); }); describe('HomeContentV15 - 信任层与章节式叙事', () => { diff --git a/src/app/(marketing)/home-content-v15.tsx b/src/app/(marketing)/home-content-v15.tsx index 53faf21..92369d8 100644 --- a/src/app/(marketing)/home-content-v15.tsx +++ b/src/app/(marketing)/home-content-v15.tsx @@ -5,7 +5,6 @@ import { motion } from 'framer-motion'; import { ScrollReveal, StaggerReveal } from '@/components/ui/scroll-reveal'; import { Badge } from '@/components/ui/badge'; import { StaticLink } from '@/components/ui/static-link'; -import { HeroProductVisual } from '@/components/sections/hero-product-visual'; import { HeroParticleField } from '@/components/sections/hero-particle-field'; import { ArrowRight, Lightbulb, Database, Layers, Code, Puzzle, Server, Quote, Calendar } from 'lucide-react'; import { cn } from '@/lib/utils'; @@ -178,12 +177,12 @@ function HeroSection({ heroData }: { {!reduceMotion && (