Skip to content

Commit 77d0b2e

Browse files
shantanu patilclaude
authored andcommitted
feat: Wave 1 UI overhaul — make the scroll experience alive with GSAP
Replace static Framer Motion whileInView animations with scroll-linked GSAP ScrollTrigger animations across all landing page sections, adding smooth scrolling, parallax depth layers, and floating background elements to compete with Google CodeWiki's polish. Scroll Animation Foundation: - Add GSAP ScrollTrigger plugin registration (src/lib/gsap.ts) - Add Lenis smooth scroll with exponential easing (src/lib/smooth-scroll.ts) - Add ScrollAnimationProvider wrapper connecting Lenis to GSAP ticker - Install @gsap/react and lenis dependencies Landing Section Conversions (Framer Motion → GSAP ScrollTrigger): - HowItWorks: staggered card reveals, number badge bounce, SVG line scrub - FeatureCards: alternating left/right card entrances with scrub, icon pulse - ComparisonTable: row stagger with check/X icon pop-in (back.out bounce) - CommunitySection: header/stats/CTA GSAP triggers (kept AnimatedCounter) - FooterCTA: form bounce easing, gradient drift background animation Parallax & Depth: - Add SectionDivider component (gradient-orb, grid-fade, dots variants) - Add FloatingElements with 6 shapes at varying parallax scroll rates - Insert 4 section dividers between landing sections in page.tsx CSS Animation Utilities: - Add .gsap-reveal directional classes, .word-reveal helpers - Add gradient-shift, gradient-drift, float-slow/medium keyframes Bug Fix: - Fix MCP server Docker crash: set host/port on mcp.settings instead of passing as run() kwargs (FastMCP API compatibility) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8a4ac8c commit 77d0b2e

17 files changed

Lines changed: 2442 additions & 323 deletions

UI_OVERHAUL_PLAN.md

Lines changed: 1559 additions & 0 deletions
Large diffs are not rendered by default.

api/mcp/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ def wiki_page_resource(owner: str, repo: str, page_id: str) -> str:
414414
host = os.environ.get("MCP_HOST", "0.0.0.0")
415415
port = int(os.environ.get("MCP_PORT", "8008"))
416416
print(f"Starting BetterCodeWiki MCP server on http://{host}:{port}/mcp", file=sys.stderr)
417-
mcp.run(transport="streamable-http", host=host, port=port)
417+
mcp.settings.host = host
418+
mcp.settings.port = port
419+
mcp.run(transport="streamable-http")
418420
else:
419421
mcp.run(transport="stdio")

package-lock.json

Lines changed: 40 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"@gsap/react": "^2.1.2",
1213
"@react-three/drei": "^10.7.7",
1314
"@react-three/fiber": "^9.5.0",
1415
"class-variance-authority": "^0.7.1",
@@ -18,6 +19,7 @@
1819
"gsap": "^3.14.2",
1920
"hugeicons-react": "^0.4.0",
2021
"jszip": "^3.10.1",
22+
"lenis": "^1.3.17",
2123
"lucide-react": "^0.574.0",
2224
"mermaid": "^11.4.1",
2325
"next": "15.3.1",

src/app/globals.css

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,68 @@ code, pre, .font-mono {
244244
.text-body-sm { font-size: 0.75rem; line-height: 1.5; font-weight: 400; }
245245
.text-label-lg { font-size: 0.875rem; line-height: 1.25; font-weight: 500; letter-spacing: 0.006em; }
246246
.text-label-md { font-size: 0.75rem; line-height: 1.15; font-weight: 500; letter-spacing: 0.006em; }
247-
.text-label-sm { font-size: 0.688rem; line-height: 1.15; font-weight: 500; letter-spacing: 0.006em; }
247+
.text-label-sm { font-size: 0.688rem; line-height: 1.15; font-weight: 500; letter-spacing: 0.006em; }
248+
249+
/* ===== Scroll Animation Utilities ===== */
250+
.gsap-reveal {
251+
opacity: 0;
252+
transform: translateY(40px);
253+
}
254+
255+
.gsap-reveal-left {
256+
opacity: 0;
257+
transform: translateX(-40px);
258+
}
259+
260+
.gsap-reveal-right {
261+
opacity: 0;
262+
transform: translateX(40px);
263+
}
264+
265+
/* Word-by-word reveal for section headings */
266+
.word-reveal .word {
267+
display: inline-block;
268+
opacity: 0;
269+
transform: translateY(20px);
270+
}
271+
272+
/* Gradient line animation for section dividers */
273+
@keyframes gradient-shift {
274+
0%, 100% { transform: translate(0, 0) scale(1); }
275+
33% { transform: translate(2%, -3%) scale(1.02); }
276+
66% { transform: translate(-1%, 2%) scale(0.98); }
277+
}
278+
279+
.animate-gradient-shift {
280+
animation: gradient-shift 8s ease-in-out infinite;
281+
}
282+
283+
/* Floating animation for decorative elements */
284+
@keyframes float-slow {
285+
0%, 100% { transform: translateY(0px) rotate(0deg); }
286+
50% { transform: translateY(-10px) rotate(3deg); }
287+
}
288+
289+
@keyframes float-medium {
290+
0%, 100% { transform: translateY(0px) rotate(0deg); }
291+
50% { transform: translateY(-15px) rotate(-2deg); }
292+
}
293+
294+
.animate-float-slow {
295+
animation: float-slow 6s ease-in-out infinite;
296+
}
297+
298+
.animate-float-medium {
299+
animation: float-medium 4s ease-in-out infinite;
300+
}
301+
302+
/* Slow gradient drift for FooterCTA background */
303+
@keyframes gradient-drift {
304+
0%, 100% { background-position: 50% 100%; }
305+
50% { background-position: 50% 80%; }
306+
}
307+
308+
.animate-gradient-drift {
309+
background-size: 200% 200%;
310+
animation: gradient-drift 8s ease-in-out infinite;
311+
}

0 commit comments

Comments
 (0)