refactor(home): 移除 Hero「数据驱动」产品视觉整个板块(非仅眉标)

- 删除 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 浏览器,未实跑;且因板块移除快照
必然变更,需更新基线。
This commit is contained in:
2026-09-01 09:11:35 +08:00
parent 45a92fcc2b
commit 95dc07c3f7
4 changed files with 3 additions and 189 deletions
@@ -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(<HomeContentV15 />);
expect(screen.getByTestId('hero-product-visual')).toBeInTheDocument();
});
});
describe('HomeContentV15 - 信任层与章节式叙事', () => {
+3 -14
View File
@@ -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 && (
<div ref={spotRef} className="absolute inset-0 pointer-events-none hero-dot-spot opacity-60" aria-hidden="true" />
)}
{/* L3 动态粒子(品牌红点缀):入场浮现后静止,rAF 仅跑 ~600ms,无持续循环;
reduced-motion 下退化为一次性静态帧 */}
{/* L3 动态粒子(品牌红点缀):rAF 持续循环漂移;
reduced-motion / 自动化环境下降级为一次性静态帧 */}
<HeroParticleField />
<div className="max-w-container mx-auto px-4 sm:px-6 lg:px-10 relative z-10 w-full py-16 sm:py-20 md:py-24 lg:py-24">
<div className="grid items-center gap-16 lg:grid-cols-[1.05fr_0.95fr]">
<div className="grid items-center gap-16">
<div className="max-w-4xl">
{/* 品牌口号 Badge:浅色画布上的品牌红信号(hero 不重复渲染 Logo,避免与导航栏重复) */}
{slogan && (
@@ -241,16 +240,6 @@ function HeroSection({ heroData }: {
)}
</motion.div>
</div>
{/* 右侧:产品视觉(SVG 数据看板示意,浅色卡片浮于浅色画布) */}
<motion.div
initial={{ opacity: 0, y: 40 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.45, delay: 0.3, ease: EASE_OUT }}
className="relative mt-16 lg:mt-0"
>
<HeroProductVisual className="max-w-xl w-full lg:ml-auto" />
</motion.div>
</div>
</div>
</section>