Skip to content

Removed the UI Inconsistencies in Testimonials and FAQs Pages#1290

Open
iaadillatif wants to merge 4 commits intorecodehive:mainfrom
iaadillatif:ui-improvements-testimonials-faqs-pages
Open

Removed the UI Inconsistencies in Testimonials and FAQs Pages#1290
iaadillatif wants to merge 4 commits intorecodehive:mainfrom
iaadillatif:ui-improvements-testimonials-faqs-pages

Conversation

@iaadillatif
Copy link
Contributor

This PR resolves the visual and structural inconsistencies identified in the Testimonials and FAQs pages.

The goal was to improve layout alignment, visual hierarchy, and container consistency while keeping all existing animation logic and functionality unchanged.

Fixes #1287


Type of Change

  • New feature (e.g., new page, component, or functionality)
  • Bug fix (non-breaking change that fixes an issue)
  • UI/UX improvement (design, layout, or styling updates)
  • Performance optimization (e.g., code splitting, caching)
  • Documentation update (README, contribution guidelines, etc.)
  • Other (please specify):

Changes Made

1. Testimonials Page

  • Updated AvatarImage styling to properly fill the circular container.
  • Removed the small-image-inside-large-circle visual imbalance.
  • No testimonial content or structural layout was modified.

Preview

Below is a visual reference of the updated Testimonials avatar rendering.

image

2. FAQs Page Structural Fix

  • Unified question and answer within a single card container.
  • Ensured expanded answer renders inside the same container.
  • Applied rounded container with border, blur, and shadow.
  • Added overflow handling to maintain clean expand and collapse behavior.
  • Added divider and internal spacing for the answer section.
  • Preserved existing expand and collapse animation timing and logic exactly as implemented.

3. FAQs Header Refinement

  • Introduced distinct background treatment for the question header.
  • Differentiated open and closed states visually.
  • Added subtle highlight and active shadow effects.
  • Added a divider between header and answer when expanded.
  • Accordion functionality remains unchanged.

4. Large Screen Layout Improvements

  • Updated FAQ wrapper width to lg:max-w-6xl and xl:max-w-7xl.
  • Increased horizontal spacing for large screens.
  • Removed large-screen left alignment from heading and subheading.
  • Maintained centered layout with improved readability.
  • Small screen layout remains unchanged.

Preview

Below is a visual reference of the updated FAQs layout after resolving the alignment and structural inconsistencies. This reflects the improved avatar rendering and refined large screen spacing.

image

Dependencies

  • No new dependencies added.
  • No version updates required.
  • No configuration changes required.

Checklist

  • My code follows the style guidelines of this project.
  • I have tested my changes across major browsers and devices
  • My changes do not generate new console warnings or errors .
  • I ran npm run build and attached screenshot(s) in this PR.
  • This is already assigned Issue to me, not an unassigned issue.

Copilot AI review requested due to automatic review settings March 1, 2026 14:17
@vercel
Copy link
Contributor

vercel bot commented Mar 1, 2026

@iaadillatif is attempting to deploy a commit to the recode Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs.

In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊

Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv.

We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰

🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨

📚Your perks for contribution to this community 👇🏻

  1. Get free Consultation use code recode50 to get free: Mentorship for free.

  2. Get the Ebook for free use code recode at checkout: Data Science cheatsheet for Beginners.

  3. Check out this weekly Newsletter: Sanjay's Newsletter.

If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@github-actions github-actions bot added recode this is label for leaderboard level 1 10 points labels Mar 1, 2026
@github-actions
Copy link

github-actions bot commented Mar 1, 2026

✅ Synchronized metadata from Issue #1287:

  • Labels: level 1, recode
  • Milestone: None

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses UI/UX inconsistencies on the Testimonials and FAQs pages by refining avatar rendering and restructuring/styling the FAQ accordion cards while keeping the existing interaction/animation behavior.

Changes:

  • Updated testimonial avatar presentation so images fill the circular container with improved visual treatment.
  • Refactored FAQ accordion items so question + answer render within a single consistent card container and added clearer open/closed header styling.
  • Adjusted large-screen FAQ layout constraints (max widths/padding) and centered header text.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/testimonials/TestimonialCard.tsx Updates avatar sizing/fill behavior and adds improved decorative styling for consistent testimonial card visuals.
src/components/faqs/faqs.tsx Reworks FAQ accordion structure into unified cards, refines header/expanded styling, and improves large-screen layout constraints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return (
<motion.div
key={index}
className="accordion mb-4 h-fit break-inside-avoid overflow-hidden rounded-xl border pb-0 shadow-sm transition-all duration-300 dark:border-gray-700"
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The outer accordion container now has overflow-hidden, but the header button uses an outer focus-visible:ring-* + ring-offset-*. This can cause the focus indicator to be clipped at the card edges for keyboard users. Consider moving overflow-hidden to a lower wrapper (only around the collapsing content) or switching the button to an inset focus style (e.g., inset ring / no ring-offset) so the focus indicator remains fully visible.

Suggested change
className="accordion mb-4 h-fit break-inside-avoid overflow-hidden rounded-xl border pb-0 shadow-sm transition-all duration-300 dark:border-gray-700"
className="accordion mb-4 h-fit break-inside-avoid rounded-xl border pb-0 shadow-sm transition-all duration-300 dark:border-gray-700"

Copilot uses AI. Check for mistakes.
Comment on lines +171 to +193
>
<div
className={`border-t px-4 pb-4 pt-3 text-base transition-colors duration-200 ${
isDark ? "text-gray-300" : "text-gray-900"
}`}
style={{
borderColor: isDark
? "rgba(139, 92, 246, 0.22)"
: "rgba(139, 92, 246, 0.24)",
color: isDark ? "#d1d5db" : "#111827",
}}
dangerouslySetInnerHTML={{
__html: faq.answer
.replace(
/<strong>/g,
`<strong style="color: ${isDark ? "#f3f4f6" : "#000000"}; font-weight: 600;">`,
)
.replace(
/<a /g,
`<a style="color: ${isDark ? "#818cf8" : "#4f46e5"};" `,
),
}}
/>
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

When the accordion is collapsed, the answer panel is still present in the DOM (height/opacity animated) and can contain focusable elements (e.g., the links in faq.answer). Those links can remain reachable via keyboard tab even when the panel is visually collapsed. To avoid hidden-focus traps, consider disabling focus when collapsed (e.g., hidden/conditional rendering with AnimatePresence, or applying inert/aria-hidden plus a focus management approach).

Suggested change
>
<div
className={`border-t px-4 pb-4 pt-3 text-base transition-colors duration-200 ${
isDark ? "text-gray-300" : "text-gray-900"
}`}
style={{
borderColor: isDark
? "rgba(139, 92, 246, 0.22)"
: "rgba(139, 92, 246, 0.24)",
color: isDark ? "#d1d5db" : "#111827",
}}
dangerouslySetInnerHTML={{
__html: faq.answer
.replace(
/<strong>/g,
`<strong style="color: ${isDark ? "#f3f4f6" : "#000000"}; font-weight: 600;">`,
)
.replace(
/<a /g,
`<a style="color: ${isDark ? "#818cf8" : "#4f46e5"};" `,
),
}}
/>
aria-hidden={!isExpanded}
>
{isExpanded && (
<div
className={`border-t px-4 pb-4 pt-3 text-base transition-colors duration-200 ${
isDark ? "text-gray-300" : "text-gray-900"
}`}
style={{
borderColor: isDark
? "rgba(139, 92, 246, 0.22)"
: "rgba(139, 92, 246, 0.24)",
color: isDark ? "#d1d5db" : "#111827",
}}
dangerouslySetInnerHTML={{
__html: faq.answer
.replace(
/<strong>/g,
`<strong style="color: ${isDark ? "#f3f4f6" : "#000000"}; font-weight: 600;">`,
)
.replace(
/<a /g,
`<a style="color: ${isDark ? "#818cf8" : "#4f46e5"};" `,
),
}}
/>
)}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level 1 10 points recode this is label for leaderboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement]: UI Inconsistencies in Testimonials and FAQs Pages

2 participants