Skip to content

Commit 3f4449e

Browse files
arifulhoque7claude
andauthored
fix(welcome): light-mode visibility bugs and UI/UX polish (#631)
* fix(welcome): repair light-mode visibility and polish welcome UI/UX - Fix invisible "Read Full Guide" button in light mode: the outline Button variant painted bg-background (white) under white text. Switched to ghost variant with an explicit border. - Fix missing resource card icons in light mode: the gradient circle used a runtime-composed Tailwind class (`bg-gradient-to-br ${gradient}`) that Tailwind purges, leaving a white icon on a white surface. Replaced with plain theme-aware icons (text-pm-text-primary). - Add interactive polish: animated hero with decorative blobs, trust badges, button micro-interactions, hover-lift cards, staggered entrance animations, and icon hover transitions. - Introduce a shared SectionHeading (eyebrow + title + subtitle) for consistent hierarchy across the Features and Resources sections. * a11y(welcome): honor prefers-reduced-motion on hero animations Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2077621 commit 3f4449e

1 file changed

Lines changed: 86 additions & 45 deletions

File tree

views/assets/src/components/welcome/WelcomePage.jsx

Lines changed: 86 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
Package,
2525
ExternalLink,
2626
ArrowRight,
27+
CheckCircle2,
2728
} from 'lucide-react'
2829

2930
const assetsUrl = typeof PM_Vars !== 'undefined' ? PM_Vars.assets_url : ''
@@ -96,23 +97,20 @@ const getResources = () => [
9697
buttonLabel: __('Upgrade to Pro', 'wedevs-project-manager'),
9798
buttonUrl: 'https://wedevs.com/wp-project-manager-pro/pricing/',
9899
icon: Crown,
99-
gradient: 'from-emerald-400 to-teal-500',
100100
},
101101
{
102102
title: __('Pro Features', 'wedevs-project-manager'),
103103
description: __('Enhance your project management performance with extended features in the pro version.', 'wedevs-project-manager'),
104104
buttonLabel: __('View Pro Features', 'wedevs-project-manager'),
105105
buttonUrl: 'https://wedevs.com/wp-project-manager-pro/extensions/',
106106
icon: Sparkles,
107-
gradient: 'from-yellow-400 to-orange-500',
108107
},
109108
{
110109
title: __('Module', 'wedevs-project-manager'),
111110
description: __('Check out all the useful modules that would take your project management experience to a whole new level.', 'wedevs-project-manager'),
112111
buttonLabel: __('Go to Modules', 'wedevs-project-manager'),
113112
buttonUrl: 'https://wedevs.com/wp-project-manager-pro/extensions/',
114113
icon: Package,
115-
gradient: 'from-violet-400 to-blue-500',
116114
},
117115
]
118116

@@ -140,7 +138,7 @@ function VideoModal({ open, onOpenChange, videoId }) {
140138
)
141139
}
142140

143-
function FeatureCard({ feature, __ }) {
141+
function FeatureCard({ feature, __, index = 0 }) {
144142
const [videoOpen, setVideoOpen] = useState(false)
145143

146144
return (
@@ -150,7 +148,10 @@ function FeatureCard({ feature, __ }) {
150148
onOpenChange={setVideoOpen}
151149
videoId={feature.video}
152150
/>
153-
<Card className="group overflow-hidden hover:shadow-lg transition-shadow">
151+
<Card
152+
className="group overflow-hidden border hover:border-primary/30 hover:shadow-xl hover:-translate-y-1 transition-all duration-300 animate-in fade-in slide-in-from-bottom-3 motion-reduce:animate-none motion-reduce:transition-none"
153+
style={{ animationDelay: `${index * 70}ms`, animationFillMode: 'both' }}
154+
>
154155
<div
155156
className="relative cursor-pointer"
156157
onClick={() => setVideoOpen(true)}
@@ -159,7 +160,7 @@ function FeatureCard({ feature, __ }) {
159160
<img
160161
src={getAssetUrl('images/welcome/' + feature.thumb)}
161162
alt={feature.name}
162-
className="w-full h-auto block"
163+
className="w-full h-auto block transition-transform duration-500 group-hover:scale-105"
163164
/>
164165
<div className="absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity bg-black/20">
165166
<div className="h-12 w-12 rounded-full bg-gradient-to-br from-pink-400 to-purple-500 flex items-center justify-center shadow-lg">
@@ -169,7 +170,7 @@ function FeatureCard({ feature, __ }) {
169170
</div>
170171
<CardContent className="p-5 text-center">
171172
<div
172-
className="inline-flex items-center justify-center h-10 w-10 rounded-xl mb-3 mx-auto"
173+
className="inline-flex items-center justify-center h-10 w-10 rounded-xl mb-3 mx-auto transition-transform duration-300 group-hover:scale-110"
173174
style={{ background: feature.bg }}
174175
>
175176
<feature.icon className={`h-5 w-5 ${feature.fg}`} />
@@ -186,77 +187,111 @@ function FeatureCard({ feature, __ }) {
186187
)
187188
}
188189

190+
function SectionHeading({ kicker, title, subtitle }) {
191+
return (
192+
<div className="text-center mb-8">
193+
{kicker && (
194+
<span className="inline-block text-xs font-semibold uppercase tracking-wider text-primary mb-2">
195+
{kicker}
196+
</span>
197+
)}
198+
<h2 className="text-2xl font-bold text-pm-text-primary mb-2">{title}</h2>
199+
{subtitle && (
200+
<p className="text-sm text-pm-text-muted max-w-xl mx-auto leading-relaxed">
201+
{subtitle}
202+
</p>
203+
)}
204+
</div>
205+
)
206+
}
207+
189208
export default function WelcomePage() {
190209
const navigate = useNavigate()
191210
const [bannerVideoOpen, setBannerVideoOpen] = useState(false)
192211
const FEATURES = useMemo(() => getFeatures(), [])
193212
const RESOURCES = useMemo(() => getResources(), [])
194213

195214
return (
196-
<div className="max-w-[960px] mx-auto p-4 sm:p-6 space-y-12">
215+
<div className="max-w-7xl mx-auto p-4 sm:p-6 space-y-12">
197216
{/* ── Hero Banner ── */}
198217
<VideoModal
199218
open={bannerVideoOpen}
200219
onOpenChange={setBannerVideoOpen}
201220
videoId="rliDPp4sIyM"
202221
/>
203222

204-
<div className="relative rounded-2xl overflow-hidden px-8 py-10 md:px-12 md:py-14 text-white"
223+
<div className="relative rounded-2xl overflow-hidden px-8 py-10 md:px-12 md:py-14 text-white shadow-xl"
205224
style={{ backgroundImage: 'linear-gradient(139deg, #C444FB 0%, #5B56D7 100%)' }}
206225
>
207-
<div className="absolute inset-0 bg-[radial-gradient(circle_at_30%_50%,rgba(255,255,255,0.1),transparent_70%)]" />
226+
<div className="absolute inset-0 bg-[radial-gradient(circle_at_30%_50%,rgba(255,255,255,0.12),transparent_70%)]" />
227+
<div className="absolute -top-16 -right-10 h-56 w-56 rounded-full bg-white/10 blur-3xl animate-pulse motion-reduce:animate-none" />
228+
<div className="absolute -bottom-20 left-1/4 h-48 w-48 rounded-full bg-fuchsia-300/20 blur-3xl animate-pulse motion-reduce:animate-none" style={{ animationDelay: '1.2s' }} />
229+
208230
<div className="relative z-10 grid grid-cols-1 md:grid-cols-2 gap-8 items-center">
209231
{/* Left - text */}
210-
<div>
211-
<p className="text-sm text-yellow-300 mb-1 font-medium">
232+
<div className="animate-in fade-in slide-in-from-bottom-4 duration-700 motion-reduce:animate-none">
233+
<span className="inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-xs font-medium text-yellow-200 mb-4 backdrop-blur-sm">
234+
<Sparkles className="h-3.5 w-3.5" />
212235
{__('Welcome to', 'wedevs-project-manager')}
213-
</p>
214-
<h1 className="text-2xl md:text-3xl font-bold mb-3 text-white">
236+
</span>
237+
<h1 className="text-3xl md:text-4xl font-bold mb-3 text-white leading-tight">
215238
{__('WP Project Manager', 'wedevs-project-manager')}
216239
</h1>
217-
<p className="text-white/70 text-sm leading-relaxed mb-5">
240+
<p className="text-white/75 text-sm md:text-base leading-relaxed mb-6 max-w-md">
218241
{__('The best project management tool for WordPress to get things done with your team.', 'wedevs-project-manager')}
219242
</p>
220243
<div className="flex flex-wrap gap-3">
221244
<Button
222245
onClick={() => navigate('/projects')}
223-
className="bg-white text-purple-600 hover:bg-white/90 font-semibold text-sm no-underline"
246+
className="group bg-white text-purple-600 hover:bg-white hover:shadow-lg hover:-translate-y-0.5 transition-all font-semibold text-sm no-underline"
224247
>
225-
<Rocket className="h-5 w-5 mr-1.5" />
248+
<Rocket className="h-5 w-5 mr-1.5 transition-transform group-hover:-translate-y-0.5 group-hover:rotate-12" />
226249
{__('Create Your First Project', 'wedevs-project-manager')}
227250
</Button>
228251
<Button
229-
variant="outline"
252+
variant="ghost"
230253
asChild
231-
className="border-white/40 text-white hover:bg-white/10 font-medium text-sm"
254+
className="group border border-white/40 text-white hover:bg-white/10 hover:text-white hover:-translate-y-0.5 transition-all font-medium text-sm"
232255
>
233256
<a
234257
href="https://wedevs.com/docs/wp-project-manager/"
235258
target="_blank"
236259
rel="noopener noreferrer"
237260
className="no-underline"
238261
>
239-
<BookOpen className="h-5 w-5 mr-1.5" />
262+
<BookOpen className="h-5 w-5 mr-1.5 transition-transform group-hover:scale-110" />
240263
{__('Read Full Guide', 'wedevs-project-manager')}
241264
</a>
242265
</Button>
243266
</div>
267+
<div className="flex flex-wrap gap-x-5 gap-y-2 mt-6">
268+
{[
269+
__('Unlimited Projects', 'wedevs-project-manager'),
270+
__('Kanban & List Views', 'wedevs-project-manager'),
271+
__('Team Collaboration', 'wedevs-project-manager'),
272+
].map((item) => (
273+
<span key={item} className="inline-flex items-center gap-1.5 text-xs text-white/80">
274+
<CheckCircle2 className="h-4 w-4 text-green-300" />
275+
{item}
276+
</span>
277+
))}
278+
</div>
244279
</div>
245280

246281
{/* Right - video thumbnail */}
247-
<div className="flex justify-center md:justify-end">
282+
<div className="flex justify-center md:justify-end animate-in fade-in slide-in-from-bottom-4 duration-700 delay-150 motion-reduce:animate-none">
248283
<div
249-
className="relative cursor-pointer group rounded-lg overflow-hidden shadow-2xl"
284+
className="relative cursor-pointer group rounded-xl overflow-hidden shadow-2xl ring-1 ring-white/20 transition-transform hover:scale-[1.02]"
250285
onClick={() => setBannerVideoOpen(true)}
251286
>
252287
<img
253288
src={getAssetUrl('images/welcome/intro-video-bg-image.png')}
254289
alt={__('Introduction Video', 'wedevs-project-manager')}
255-
className="max-w-full h-auto block rounded-lg"
290+
className="max-w-full h-auto block rounded-xl"
256291
/>
257-
<div className="absolute inset-0 flex items-center justify-center">
258-
<div className="h-14 w-14 rounded-full bg-gradient-to-br from-pink-400 to-purple-500 flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform animate-pulse">
259-
<Play className="h-6 w-6 text-white ml-0.5" fill="white" />
292+
<div className="absolute inset-0 flex items-center justify-center bg-black/0 group-hover:bg-black/20 transition-colors">
293+
<div className="h-16 w-16 rounded-full bg-white/95 flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform">
294+
<Play className="h-7 w-7 text-purple-600 ml-1" fill="currentColor" />
260295
</div>
261296
</div>
262297
</div>
@@ -266,45 +301,51 @@ export default function WelcomePage() {
266301

267302
{/* ── Features Section ── */}
268303
<div>
269-
<h2 className="text-xl font-bold text-pm-text-primary text-center mb-8">
270-
{__('Features you can use...', 'wedevs-project-manager')}
271-
</h2>
304+
<SectionHeading
305+
kicker={__('Features', 'wedevs-project-manager')}
306+
title={__('Features you can use', 'wedevs-project-manager')}
307+
subtitle={__('Everything you need to plan, track, and ship your projects.', 'wedevs-project-manager')}
308+
/>
272309
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5">
273-
{FEATURES.map((feature) => (
274-
<FeatureCard key={feature.name} feature={feature} __={__} />
310+
{FEATURES.map((feature, index) => (
311+
<FeatureCard key={feature.name} feature={feature} __={__} index={index} />
275312
))}
276313
</div>
277-
<div className="text-center mt-6">
278-
<Button asChild variant="default" className="font-medium">
314+
<div className="text-center mt-8">
315+
<Button asChild variant="outline" className="group font-medium">
279316
<a
280317
href="https://wedevs.com/wp-project-manager-pro/features/"
281318
target="_blank"
282319
rel="noopener noreferrer"
283320
className="no-underline"
284321
>
285322
{__('View All Features', 'wedevs-project-manager')}
286-
<ExternalLink className="h-4 w-4 ml-1.5" />
323+
<ExternalLink className="h-4 w-4 ml-1.5 transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5" />
287324
</a>
288325
</Button>
289326
</div>
290327
</div>
291328

292329
{/* ── Resources Section ── */}
293330
<div className="rounded-2xl border bg-card p-8 md:p-12">
294-
<h2 className="text-xl font-bold text-pm-text-primary text-center mb-10">
295-
{__('Resources of Project Manager', 'wedevs-project-manager')}
296-
</h2>
297-
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
298-
{RESOURCES.map((resource) => (
331+
<SectionHeading
332+
kicker={__('Resources', 'wedevs-project-manager')}
333+
title={__('Resources of Project Manager', 'wedevs-project-manager')}
334+
subtitle={__('Explore everything you need to get the most out of Project Manager.', 'wedevs-project-manager')}
335+
/>
336+
<div className="grid grid-cols-1 sm:grid-cols-3 gap-6">
337+
{RESOURCES.map((resource, index) => (
299338
<Card
300339
key={resource.title}
301-
className="text-center hover:shadow-lg transition-shadow"
340+
className="group text-center border hover:border-primary/40 hover:shadow-xl hover:-translate-y-1 transition-all duration-300 animate-in fade-in slide-in-from-bottom-3 motion-reduce:animate-none motion-reduce:transition-none"
341+
style={{ animationDelay: `${index * 90}ms`, animationFillMode: 'both' }}
302342
>
303343
<CardContent className="p-6 flex flex-col items-center">
304-
<div
305-
className={`h-16 w-16 rounded-full bg-gradient-to-br ${resource.gradient} flex items-center justify-center shadow-md mb-4`}
306-
>
307-
<resource.icon className="h-7 w-7 text-white" />
344+
<div className="flex items-center justify-center mb-4">
345+
<resource.icon
346+
className="h-10 w-10 text-pm-text-primary transition-all duration-300 group-hover:text-primary group-hover:scale-110"
347+
strokeWidth={1.5}
348+
/>
308349
</div>
309350
<h3 className="text-lg font-semibold text-pm-text-primary mb-2">
310351
{resource.title}
@@ -320,7 +361,7 @@ export default function WelcomePage() {
320361
className="no-underline"
321362
>
322363
{resource.buttonLabel}
323-
<ArrowRight className="h-4 w-4 ml-1.5" />
364+
<ArrowRight className="h-4 w-4 ml-1.5 transition-transform group-hover:translate-x-1" />
324365
</a>
325366
</Button>
326367
</CardContent>

0 commit comments

Comments
 (0)