Skip to content

Enhanced Testimonials Section with Avatars, Verification Badges, Skill Tags & Learning Outcomes#1013

Merged
durdana3105 merged 1 commit into
durdana3105:mainfrom
ArshiBansal:testimonial_section
Jun 16, 2026
Merged

Enhanced Testimonials Section with Avatars, Verification Badges, Skill Tags & Learning Outcomes#1013
durdana3105 merged 1 commit into
durdana3105:mainfrom
ArshiBansal:testimonial_section

Conversation

@ArshiBansal

@ArshiBansal ArshiBansal commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

📋 What does this PR do?

This PR enhances the Testimonials section by adding trust-building and outcome-focused elements as per the given requirements. The changes make testimonials more credible, visually appealing, and informative for prospective users.

🔄 Changes Made

  • Added User Avatars: Circular profile images with fallback styling using pravatar.
  • Implemented Verification Badge: Green checkmark icon + "VERIFIED" label for authenticity.
  • Added Skill Tags: Relevant technology/skill pills displayed at the bottom of each card.
  • Added Learning Outcomes: Prominent highlighted outcome banner (e.g., "Secured Internship at Google") with emoji.
  • Improved Card Layout: Better spacing, responsive design, and consistent vertical alignment.
  • Updated Data Structure: Extended testimonial data with new fields (avatar, verified, skills, outcome).
  • Maintained Existing Features: Infinite auto-scroll, hover animations, manual scroll buttons, and review form remain fully functional.

🛠️ Tech Stack

  • React + TypeScript
  • Framer Motion
  • Lucide React Icons
  • Tailwind CSS

📸 Screenshots / Demo

(Attach screenshots or GIF here before submitting)

🔗 Related Issue

Closes #945

Checklist

  • I have followed the project's coding style and guidelines.
  • I have tested the changes locally.
  • The changes are responsive across mobile, tablet, and desktop.
  • No breaking changes introduced.
  • All new features are properly documented.
  • I have added necessary comments where required.

Additional Notes

  • Used realistic dummy data for 6 unique testimonials (duplicated for seamless infinite scroll).
  • Avatars are loaded from pravatar.cc (public service).
  • All animations and scroll behavior preserved.

Made with ❤️ for GSSoC 2026

Contributor: [Your Name]
GitHub Profile: [Your GitHub Username]

Summary by CodeRabbit

  • New Features

    • Testimonials now display verified badges, star ratings, and skill tags
    • Added live character counter to feedback form
    • Enhanced testimonial cards with learning outcome highlights
  • Bug Fixes

    • Improved form validation for feedback submission with error notifications
  • Style

    • Polished testimonial carousel UI and form layout organization

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

@ArshiBansal is attempting to deploy a commit to the durdana3105's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The Testimonials component is updated to introduce a typed Testimonial interface with avatar, verified, skills, and outcome fields. A new data array with duplicated entries enables infinite-scroll. Carousel cards are rewritten with framer-motion, verified badges, star ratings, outcome pills, and skill tags. The Community Feedback form gains trim validation, state reset, and a live character counter.

Changes

Testimonials Carousel and Feedback Form

Layer / File(s) Summary
Testimonial interface and data array
src/components/landing/Testimonials.tsx
Adds the Testimonial interface (avatar, verified, skills, outcome) and a typed testimonials array with a duplicated set for seamless infinite-loop scrolling; adds required lucide icon imports.
Carousel card rendering with trust indicators
src/components/landing/Testimonials.tsx
Rewrites carousel JSX to map over testimonials, rendering framer-motion cards with avatar, optional verified badge, star rating, outcome pill, testimonial quote, and skill tags; adjusts the heart heading markup, removes a stale comment on the auto-scroll line, and reformats the scrollbar-hiding <style> block.
Community Feedback form validation and UI
src/components/landing/Testimonials.tsx
Updates onSubmit to validate review.trim(), show an error toast when empty, toggle submitted, and reset form fields; replaces comment wrappers with explicit "Rating (Optional)" and "Your Feedback" section headers; adds a live {review.length}/500 character counter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type:feature

Poem

🐇 Hop hop, new badges shine so bright,
Verified learners fill the night,
Skills and outcomes now in view,
The carousel loops the whole way through.
With counters counting, forms reset —
The testimonials aren't done yet! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: avatars, verification badges, skill tags, and learning outcomes are all implemented in the Testimonials component.
Linked Issues check ✅ Passed All coding requirements from issue #945 are met: avatars with fallback styling, verification badges, skill tags displayed as pills, learning outcomes in outcome banners, responsive design maintained.
Out of Scope Changes check ✅ Passed Changes are focused on enhancing the testimonials component as specified in issue #945; minor improvements like form validation and CSS updates are directly related to testimonial section functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
src/components/landing/Testimonials.tsx (3)

215-215: ⚡ Quick win

Improve key generation for React reconciliation.

The current key ${t.name}-${i} relies on the combination of name and index. Since testimonials are duplicated for infinite scroll (e.g., "Aisha Khan" appears at index 0 and 6), this approach is fragile. If the data order changes or names collide, React's reconciliation could behave unexpectedly.

Consider adding a unique id field to each testimonial object or using a more stable key generation strategy.

♻️ Suggested approach: Add unique ID to each testimonial

Update the interface:

 interface Testimonial {
+  id: string;
   text: string;
   name: string;

Then use the ID as the key:

-key={`${t.name}-${i}`}
+key={t.id}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/landing/Testimonials.tsx` at line 215, The current key
generation at line 215 using `${t.name}-${i}` is fragile because testimonials
are duplicated for infinite scroll, causing duplicate names to appear at
different indices which breaks React's reconciliation. Add a unique `id` field
to each testimonial object in the testimonials data structure, then update the
key expression to use this stable identifier (e.g., `key={t.id}` or
`key={`testimonial-${t.id}`}`) instead of relying on the name and index
combination. This ensures each testimonial item has a truly unique, stable key
regardless of duplication or ordering changes.

41-41: ⚡ Quick win

Reconsider having all testimonials verified.

Currently, all testimonials have verified: true. When every testimonial is verified, the verification badge loses its trust-building value as a differentiator.

Consider mixing verified and unverified testimonials to make the verification indicator more meaningful and credible to users.

Also applies to: 51-51, 61-61, 71-71, 81-81, 91-91, 103-103, 113-113, 123-123

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/landing/Testimonials.tsx` at line 41, All testimonials in
src/components/landing/Testimonials.tsx currently have verified set to true at
lines 41, 51, 61, 71, 81, 91, 103, 113, and 123, which diminishes the
credibility value of the verification badge. To make the verification indicator
meaningful as a trust differentiator, change some (but not all) of these
verified properties from true to false across the testimonial objects. Select a
subset of testimonials to remain verified while marking others as unverified,
creating a realistic mix that gives the verification badge actual significance.

232-249: 💤 Low value

Consider consolidating duplicate verification indicators.

The verified status is displayed twice:

  1. A CheckCircle icon badge on the avatar (lines 232-236)
  2. A "VERIFIED" text label with icon next to the name (lines 244-249)

While both indicators reinforce trust, the duplication might be visually redundant. Consider whether one indicator sufficiently conveys the verification status, or if both are intentionally used for emphasis.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/landing/Testimonials.tsx` around lines 232 - 249, The verified
status in the Testimonials component is displayed twice through duplicate
indicators: once as a CheckCircle icon badge absolutely positioned on the avatar
(checking t.verified), and again as a "VERIFIED" text badge with icon next to
the name (also checking t.verified). Review whether both verification indicators
are necessary for your design goals. If duplication is unintended, remove one of
the two conditional blocks—either the avatar badge or the text badge next to the
name. If both serve a deliberate purpose, document the rationale; otherwise,
consolidate to a single verification indicator.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/landing/Testimonials.tsx`:
- Line 336: The setTimeout call that resets the submitted state is not cleaned
up when the component unmounts, which can cause state updates on unmounted
components. Store the timeout ID returned by setTimeout in a variable, and
create a useEffect hook with a cleanup function that clears this timeout using
clearTimeout when the component unmounts or when the relevant dependency
changes. This ensures the setSubmitted call is cancelled if the component
unmounts before the 3-second delay completes.

---

Nitpick comments:
In `@src/components/landing/Testimonials.tsx`:
- Line 215: The current key generation at line 215 using `${t.name}-${i}` is
fragile because testimonials are duplicated for infinite scroll, causing
duplicate names to appear at different indices which breaks React's
reconciliation. Add a unique `id` field to each testimonial object in the
testimonials data structure, then update the key expression to use this stable
identifier (e.g., `key={t.id}` or `key={`testimonial-${t.id}`}`) instead of
relying on the name and index combination. This ensures each testimonial item
has a truly unique, stable key regardless of duplication or ordering changes.
- Line 41: All testimonials in src/components/landing/Testimonials.tsx currently
have verified set to true at lines 41, 51, 61, 71, 81, 91, 103, 113, and 123,
which diminishes the credibility value of the verification badge. To make the
verification indicator meaningful as a trust differentiator, change some (but
not all) of these verified properties from true to false across the testimonial
objects. Select a subset of testimonials to remain verified while marking others
as unverified, creating a realistic mix that gives the verification badge actual
significance.
- Around line 232-249: The verified status in the Testimonials component is
displayed twice through duplicate indicators: once as a CheckCircle icon badge
absolutely positioned on the avatar (checking t.verified), and again as a
"VERIFIED" text badge with icon next to the name (also checking t.verified).
Review whether both verification indicators are necessary for your design goals.
If duplication is unintended, remove one of the two conditional blocks—either
the avatar badge or the text badge next to the name. If both serve a deliberate
purpose, document the rationale; otherwise, consolidate to a single verification
indicator.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d8fcbddb-ea82-49cc-873a-b1630d90ad27

📥 Commits

Reviewing files that changed from the base of the PR and between 7200d81 and 804b895.

📒 Files selected for processing (1)
  • src/components/landing/Testimonials.tsx

setSubmitted(false);
}, 3000);

setTimeout(() => setSubmitted(false), 3000);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Potential memory leak: setTimeout not cleaned up on unmount.

The setTimeout at line 336 sets state after 3 seconds, but if the component unmounts before the timeout fires, setSubmitted(false) will attempt to update state on an unmounted component, causing a warning and potential memory leak.

Store the timeout ID and clear it in a useEffect cleanup function.

🛡️ Proposed fix to prevent memory leak
+ const submitTimeoutRef = useRef<number | null>(null);
+
+ useEffect(() => {
+   return () => {
+     if (submitTimeoutRef.current) {
+       clearTimeout(submitTimeoutRef.current);
+     }
+   };
+ }, []);

  onSubmit={(e) => {
    e.preventDefault();
    if (!review.trim()) {
      toast.error("Please enter your feedback.");
      return;
    }
    setSubmitted(true);
-   setTimeout(() => setSubmitted(false), 3000);
+   submitTimeoutRef.current = window.setTimeout(() => {
+     setSubmitted(false);
+     submitTimeoutRef.current = null;
+   }, 3000);
    setName("");
    setRating(0);
    setReview("");
  }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/landing/Testimonials.tsx` at line 336, The setTimeout call
that resets the submitted state is not cleaned up when the component unmounts,
which can cause state updates on unmounted components. Store the timeout ID
returned by setTimeout in a variable, and create a useEffect hook with a cleanup
function that clears this timeout using clearTimeout when the component unmounts
or when the relevant dependency changes. This ensures the setSubmitted call is
cancelled if the component unmounts before the 3-second delay completes.

@durdana3105 durdana3105 merged commit 9c96206 into durdana3105:main Jun 16, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Improve Testimonial Cards with Trust Indicators and Outcome-Based Information

2 participants