Skip to content

feat: modular FAQ system with 12 sections and data layer refactor#199

Open
snehamathad604 wants to merge 1 commit into
kunalverma2512:mainfrom
snehamathad604:main
Open

feat: modular FAQ system with 12 sections and data layer refactor#199
snehamathad604 wants to merge 1 commit into
kunalverma2512:mainfrom
snehamathad604:main

Conversation

@snehamathad604

@snehamathad604 snehamathad604 commented Jun 14, 2026

Copy link
Copy Markdown

📌 Pull Request Summary

🔗 Related Issue

Closes #182


📝 Description

This PR refactors the FAQ system into a modular architecture with 12 independent sections and a centralized data layer.

The goal is to improve scalability, maintainability, and separation of concerns across the FAQ feature in the CodeLens frontend.

Changes Made

  • Refactored FAQ system into 12 modular components under src/components/faq/
  • Split FAQ data into structured files under src/data/faqs/
  • Added centralized index file for cleaner imports
  • Integrated modular FAQ system into FAQPage

Motivation

The previous FAQ implementation was monolithic and difficult to extend.

This refactor solves:

  • Poor scalability for adding new FAQ categories
  • Tight coupling between UI and data
  • Difficult maintenance as FAQ content grows

Now each section is independent and fully data-driven.


🚀 Type of Change

Select all that apply:

  • Bug Fix
  • New Feature
  • Enhancement
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • DevOps / Tooling
  • Other

🧪 Testing

Verification

  • Tested Locally
  • UI verified on /faq route (local dev server)
  • No console-breaking errors
  • Responsive layout checked (desktop + mobile)

Test Details

  • Verified all 12 FAQ sections render correctly
  • Tested accordion open/close behavior
  • Ensured no missing imports or broken routes

📸 Screenshots / Demo (If Applicable)

UI verified locally on /faq route. All 12 FAQ sections render correctly with working accordion behavior.


✅ Checklist

  • I have read and followed the contribution guidelines.
  • I have self-reviewed my changes.
  • My changes are limited to the scope of this issue.
  • Documentation has been updated where necessary.
  • No unnecessary files or unrelated changes have been included.
  • The related issue has been linked correctly.
  • All applicable testing and validation steps have been completed.

📚 Additional Notes

This PR improves frontend architecture without affecting backend APIs.
It is fully backward compatible.

Summary by CodeRabbit

  • New Features

    • Added comprehensive FAQ section covering 12 topic areas: Getting Started, Platform Integration, Analytics, Data Privacy, Account Management, Open Source, Legal, Troubleshooting, Performance, Community, Roadmap, and Accessibility.
    • Added new dependency for improved page metadata handling.
  • Bug Fixes

    • Enhanced form accessibility across auth and contact forms with proper labels and input name attributes.
    • Improved Contact form with email auto-completion.

@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@snehamathad604 is attempting to deploy a commit to the Kunal Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

🎉 Welcome to CodeLens — Thank You for Your Contribution!

Hey @snehamathad604! 👋

We are genuinely excited to have you here. Every single PR — big or small — makes CodeLens better, and yours is no exception. Take a moment to review the checklist below to help us merge your work quickly and smoothly.

✅ Before Requesting a Review

  • Keep code clean, readable, and consistent with the existing codebase
  • Avoid unrelated or unnecessary file changes
  • Make sure the UI is fully responsive across all device sizes
  • Attach screenshots or a short screen recording for any UI changes
  • Resolve all merge conflicts before marking the PR as ready
  • Do not submit AI-generated, copy-pasted, or low-effort implementations

💬 Join Our Community Channel — This is Mandatory

Being part of our communication channel is compulsory for all contributors, not optional.

📡 Join the CodeLens Matrix Channel

Why join? This is where all important announcements, PR review updates, contribution discussions, and maintainer decisions happen in real time. Contributors who are not in the channel regularly miss critical context and updates, which often leads to duplicated or misaligned work. Staying connected here is what keeps the community strong and your contributions impactful.


We are rooting for you! If you have any questions, drop them in the channel or comment right here on this PR. Let's build something great together. 🚀✨

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR expands the FAQ page from a single data-driven component into 12 modular section components, each backed by a dedicated per-category data file. A shared FAQAccordion component handles accessible expand/collapse behavior. FAQPage.jsx is refactored to compose these sections directly. Existing form components receive accessibility improvements (name attributes, labels, autoComplete), and minor CSS and Contact page fixes are included.

Changes

FAQ Modular System Expansion

Layer / File(s) Summary
FAQ data modules and barrel index
frontend/src/data/faqs/index.js, frontend/src/data/faqs/*.js, frontend/src/data/faqs.js
Adds 12 per-category FAQ data files (gettingStarted, platformIntegration, analyticsDashboard, dataPrivacy, accountManagement, openSourceContrib, legalCompliance, troubleshooting, performance, community, roadmap, accessibility), a barrel index.js re-exporting all, and updates answer text in the existing faqs.js.
FAQAccordion shared component
frontend/src/components/faq/FAQAccordion.jsx
Adds the FAQAccordion component with openIdx state, a toggle function, and accessible button/panel markup using aria-expanded, aria-controls, role="region", and aria-labelledby wired through item.id-based IDs.
FAQ section components (12 categories)
frontend/src/components/faq/*.jsx
Adds GettingStartedFAQ, PlatformIntegrationFAQ, AnalyticsDashboardFAQ, DataPrivacyFAQ, AccountManagementFAQ, OpenSourceContribFAQ, LegalComplianceFAQ, PerformanceFAQ, TroubleshootingFAQ, CommunityFAQ, RoadmapFAQ, and AccessibilityFAQ. Accordion-backed sections pass data to FAQAccordion; card-grid sections map items to styled cards directly.
FAQPage refactor
frontend/src/pages/FAQPage.jsx
Replaces the previous stateful accordion/category-chip rendering with direct composition of all 12 imported FAQ section components; reduces the header category list to a static two-item pair.
Accessibility & form improvements
frontend/package.json, frontend/src/index.css, frontend/src/components/auth/ForgotPassword.jsx, frontend/src/components/codeforces/VerifyModal.jsx, frontend/src/components/explore/SubscribeNewsletter.jsx, frontend/src/pages/Contact.jsx
Adds name attributes to ForgotPassword inputs, adds htmlFor/id/name and proper Enter-key preventDefault to VerifyModal Step 1, adds an sr-only label to SubscribeNewsletter, adds autoComplete/required and currentTarget.reset() to Contact, removes Tailwind typography plugin in favor of a text-size-adjust base layer rule, and adds react-helmet-async dependency.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • #182: This PR directly implements the feature requested — 12+ modular FAQ JSX components with per-category data files, a shared FAQAccordion with ARIA attributes, and a refactored FAQPage composing all sections.

Possibly related PRs

Suggested labels

enhancement, Frontend, GSSoC26, UI/UX, responsive, level:intermediate, quality:clean, type:accessibility, type:feature, type:ui/ux, gssoc:approved, mentor:kunalverma2512

Poem

🐇 Hippity-hop, twelve new FAQ blocks!
Each question and answer now neatly docks.
Accordion panels open with a click,
ARIA labels make the robots stick.
The bunny refactored the page with glee —
Modular components, hopping free! 🌿

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 5.88% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive While most changes align with #182 objectives, several modifications appear tangential to core FAQ refactoring: react-helmet-async dependency, form attribute updates, CSS theme changes, and Contact.jsx modifications lack clear connection to FAQ expansion. Clarify the relationship between added form attributes (name, htmlFor), Contact.jsx changes, CSS index.css updates, and react-helmet-async dependency to FAQ refactoring objectives.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: modular FAQ system with 12 sections and data layer refactor' accurately summarizes the main change: refactoring FAQ into 12 modular components with restructured data layer.
Description check ✅ Passed The description comprehensively covers all required sections: linked issue, clear motivation, detailed changes, testing verification, and proper checklist completion per the template.
Linked Issues check ✅ Passed The PR fulfills all major objectives from #182: 12 modular FAQ components created, data layer restructured into per-category files, architecture refactored into component-driven system, and accessibility features (ARIA attributes) implemented.

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

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
frontend/src/components/faq/GettingStartedFAQ.jsx (1)

3-37: ⚖️ Poor tradeoff

Consider extracting a shared FAQ card component.

Multiple card-based FAQ sections repeat the same map → bordered card structure with minor layout and styling variations. Extracting a reusable <FAQCardList> or <FAQCardGrid> component could reduce duplication and centralize future card-rendering updates.

  • frontend/src/components/faq/GettingStartedFAQ.jsx#L18-L33: grid layout with 2-column responsive cards.
  • frontend/src/components/faq/AnalyticsDashboardFAQ.jsx#L17-L38: 3-column grid with inverted (black) card backgrounds.
  • frontend/src/components/faq/AccountManagementFAQ.jsx#L17-L38: vertical stacked cards using space-y-6.
  • frontend/src/components/faq/LegalComplianceFAQ.jsx#L30-L51: cards nested in a two-column layout grid.

Each could pass items, layout (grid/stack), and variant (colors/shadows) props to a shared component, similar to how TroubleshootingFAQ delegates to FAQAccordion.

🤖 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 `@frontend/src/components/faq/GettingStartedFAQ.jsx` around lines 3 - 37,
Extract a reusable FAQ card component (e.g., FAQCardGrid or FAQCardList) to
consolidate the duplicated map → card-rendering pattern across multiple FAQ
section files. Create a new component that accepts props for items (the FAQ
array), layout (controlling grid columns or stacking), and variant (for color
and shadow styling). In GettingStartedFAQ.jsx (lines 18-33), replace the map and
card div structure with a call to the new component, passing gettingStartedFaqs
and layout="grid-cols-2". In AnalyticsDashboardFAQ.jsx (lines 17-38), extract
the 3-column grid cards and replace them with the shared component using
layout="grid-cols-3" and variant="inverted". In AccountManagementFAQ.jsx (lines
17-38), extract the vertically stacked cards and use layout="stack". In
LegalComplianceFAQ.jsx (lines 30-51), extract the cards from the nested
two-column grid and replace them with the shared component. Centralize the card
styling (border, padding, shadow) in the extracted component and allow variants
to customize the appearance, similar to how TroubleshootingFAQ uses
FAQAccordion.
🤖 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 `@frontend/src/components/faq/DataPrivacyFAQ.jsx`:
- Around line 6-8: The section element with aria-labelledby="privacy-title" in
DataPrivacyFAQ.jsx currently applies a bottom border using border-b-4, but it
should use a top border to match the FAQ layout contract. Change border-b-4 to
border-t-4 in the className attribute of the section element to ensure visual
consistency with the other FAQ sections.

In `@frontend/src/components/faq/FAQAccordion.jsx`:
- Around line 22-33: The button element currently wraps the h3 heading, which
violates HTML semantics and weakens assistive technology navigation. Restructure
the code so the h3 element wraps the button instead—move the button opening tag
inside the h3, and close the button before closing the h3. This way the heading
remains semantically correct while keeping all button attributes (type="button",
onClick, aria-expanded, aria-controls, id) intact on the button element itself.

In `@frontend/src/components/faq/OpenSourceContribFAQ.jsx`:
- Line 8: The section divider styling is inconsistent across FAQ components,
using bottom borders (border-b-4) instead of top borders (border-t-4) per the
layout standard. Replace border-b-4 with border-t-4 in the className attribute
at the following three locations:
frontend/src/components/faq/OpenSourceContribFAQ.jsx line 8 in the main section
div, frontend/src/components/faq/PerformanceFAQ.jsx line 6 in the fallback
section div, and frontend/src/components/faq/PerformanceFAQ.jsx line 20 in the
primary render section div. Ensure all three locations use border-t-4 and
maintain the existing py-20 padding for consistency with the FAQ layout
standard.

---

Nitpick comments:
In `@frontend/src/components/faq/GettingStartedFAQ.jsx`:
- Around line 3-37: Extract a reusable FAQ card component (e.g., FAQCardGrid or
FAQCardList) to consolidate the duplicated map → card-rendering pattern across
multiple FAQ section files. Create a new component that accepts props for items
(the FAQ array), layout (controlling grid columns or stacking), and variant (for
color and shadow styling). In GettingStartedFAQ.jsx (lines 18-33), replace the
map and card div structure with a call to the new component, passing
gettingStartedFaqs and layout="grid-cols-2". In AnalyticsDashboardFAQ.jsx (lines
17-38), extract the 3-column grid cards and replace them with the shared
component using layout="grid-cols-3" and variant="inverted". In
AccountManagementFAQ.jsx (lines 17-38), extract the vertically stacked cards and
use layout="stack". In LegalComplianceFAQ.jsx (lines 30-51), extract the cards
from the nested two-column grid and replace them with the shared component.
Centralize the card styling (border, padding, shadow) in the extracted component
and allow variants to customize the appearance, similar to how
TroubleshootingFAQ uses FAQAccordion.
🪄 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

Run ID: 92aac4ae-1f1e-4119-bd0c-d01f9dde31f0

📥 Commits

Reviewing files that changed from the base of the PR and between 45268d8 and 9a9fa4e.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (34)
  • frontend/package.json
  • frontend/src/components/auth/ForgotPassword.jsx
  • frontend/src/components/codeforces/VerifyModal.jsx
  • frontend/src/components/explore/SubscribeNewsletter.jsx
  • frontend/src/components/faq/AccessibilityFAQ.jsx
  • frontend/src/components/faq/AccountManagementFAQ.jsx
  • frontend/src/components/faq/AnalyticsDashboardFAQ.jsx
  • frontend/src/components/faq/CommunityFAQ.jsx
  • frontend/src/components/faq/DataPrivacyFAQ.jsx
  • frontend/src/components/faq/FAQAccordion.jsx
  • frontend/src/components/faq/GettingStartedFAQ.jsx
  • frontend/src/components/faq/LegalComplianceFAQ.jsx
  • frontend/src/components/faq/OpenSourceContribFAQ.jsx
  • frontend/src/components/faq/PerformanceFAQ.jsx
  • frontend/src/components/faq/PlatformIntegrationFAQ.jsx
  • frontend/src/components/faq/RoadmapFAQ.jsx
  • frontend/src/components/faq/TroubleshootingFAQ.jsx
  • frontend/src/data/faqs.js
  • frontend/src/data/faqs/accessibility.js
  • frontend/src/data/faqs/accountManagement.js
  • frontend/src/data/faqs/analyticsDashboard.js
  • frontend/src/data/faqs/community.js
  • frontend/src/data/faqs/dataPrivacy.js
  • frontend/src/data/faqs/gettingStarted.js
  • frontend/src/data/faqs/index.js
  • frontend/src/data/faqs/legalCompliance.js
  • frontend/src/data/faqs/openSourceContrib.js
  • frontend/src/data/faqs/performance.js
  • frontend/src/data/faqs/platformIntegration.js
  • frontend/src/data/faqs/roadmap.js
  • frontend/src/data/faqs/troubleshooting.js
  • frontend/src/index.css
  • frontend/src/pages/Contact.jsx
  • frontend/src/pages/FAQPage.jsx

Comment on lines +6 to +8
<section
aria-labelledby="privacy-title"
className="py-20 px-6 bg-white text-black border-b-4 border-black"

Copy link
Copy Markdown

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

Use the top divider here to match the FAQ layout contract.

The FAQ expansion objective calls for border-t-4 dividers between sections, but this wrapper uses border-b-4. Switching the edge keeps the sections visually consistent.

♻️ Proposed fix
-    <section
-      aria-labelledby="privacy-title"
-      className="py-20 px-6 bg-white text-black border-b-4 border-black"
-    >
+    <section
+      aria-labelledby="privacy-title"
+      className="py-20 px-6 bg-white text-black border-t-4 border-black"
+    >
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<section
aria-labelledby="privacy-title"
className="py-20 px-6 bg-white text-black border-b-4 border-black"
<section
aria-labelledby="privacy-title"
className="py-20 px-6 bg-white text-black border-t-4 border-black"
🤖 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 `@frontend/src/components/faq/DataPrivacyFAQ.jsx` around lines 6 - 8, The
section element with aria-labelledby="privacy-title" in DataPrivacyFAQ.jsx
currently applies a bottom border using border-b-4, but it should use a top
border to match the FAQ layout contract. Change border-b-4 to border-t-4 in the
className attribute of the section element to ensure visual consistency with the
other FAQ sections.

Comment on lines +22 to +33
<button
type="button"
onClick={() => toggle(index)}
className="flex w-full items-center justify-between text-left"
aria-expanded={isOpen}
aria-controls={panelId}
id={buttonId}
>
<h3 className="text-xl sm:text-2xl font-black uppercase tracking-tight">
{item.q}
</h3>

Copy link
Copy Markdown

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

Move the heading outside the button to keep valid accordion semantics.

On Line 22, the <button> currently contains <h3>, which is invalid HTML structure for heading content and can weaken assistive-tech navigation. Use <h3><button ... /></h3> instead.

Proposed fix
-            <button
-              type="button"
-              onClick={() => toggle(index)}
-              className="flex w-full items-center justify-between text-left"
-              aria-expanded={isOpen}
-              aria-controls={panelId}
-              id={buttonId}
-            >
-              <h3 className="text-xl sm:text-2xl font-black uppercase tracking-tight">
-                {item.q}
-              </h3>
-
-              <span className="text-3xl font-black">
-                {isOpen ? "-" : "+"}
-              </span>
-            </button>
+            <h3 className="text-xl sm:text-2xl font-black uppercase tracking-tight">
+              <button
+                type="button"
+                onClick={() => toggle(index)}
+                className="flex w-full items-center justify-between text-left"
+                aria-expanded={isOpen}
+                aria-controls={panelId}
+                id={buttonId}
+              >
+                <span>{item.q}</span>
+                <span className="text-3xl font-black" aria-hidden="true">
+                  {isOpen ? "-" : "+"}
+                </span>
+              </button>
+            </h3>
🤖 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 `@frontend/src/components/faq/FAQAccordion.jsx` around lines 22 - 33, The
button element currently wraps the h3 heading, which violates HTML semantics and
weakens assistive technology navigation. Restructure the code so the h3 element
wraps the button instead—move the button opening tag inside the h3, and close
the button before closing the h3. This way the heading remains semantically
correct while keeping all button attributes (type="button", onClick,
aria-expanded, aria-controls, id) intact on the button element itself.

return (
<section
aria-labelledby="opensource-title"
className="py-20 px-6 bg-white text-black border-b-4 border-black"

Copy link
Copy Markdown

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

Section divider direction is inconsistent with the stated FAQ layout standard. The shared root cause is using border-b-4 instead of the required border-t-4 section divider style.

  • frontend/src/components/faq/OpenSourceContribFAQ.jsx#L8-L8: replace border-b-4 with border-t-4.
  • frontend/src/components/faq/PerformanceFAQ.jsx#L6-L6: replace border-b-4 with border-t-4 in the fallback section.
  • frontend/src/components/faq/PerformanceFAQ.jsx#L20-L20: replace border-b-4 with border-t-4 in the primary render section.
    As per coding guidelines, apply minimum py-20 padding per section with border-t-4 dividers.
📍 Affects 2 files
  • frontend/src/components/faq/OpenSourceContribFAQ.jsx#L8-L8 (this comment)
  • frontend/src/components/faq/PerformanceFAQ.jsx#L6-L6
  • frontend/src/components/faq/PerformanceFAQ.jsx#L20-L20
🤖 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 `@frontend/src/components/faq/OpenSourceContribFAQ.jsx` at line 8, The section
divider styling is inconsistent across FAQ components, using bottom borders
(border-b-4) instead of top borders (border-t-4) per the layout standard.
Replace border-b-4 with border-t-4 in the className attribute at the following
three locations: frontend/src/components/faq/OpenSourceContribFAQ.jsx line 8 in
the main section div, frontend/src/components/faq/PerformanceFAQ.jsx line 6 in
the fallback section div, and frontend/src/components/faq/PerformanceFAQ.jsx
line 20 in the primary render section div. Ensure all three locations use
border-t-4 and maintain the existing py-20 padding for consistency with the FAQ
layout standard.

@kunalverma2512

Copy link
Copy Markdown
Owner

@coderabbitai please check whether work done in this PR is good to go and is ready to merge ?
make sure professionally everything is written and is compatible with whole codebase and especially nearby codes , files
and tell is this work is responsive easpecially in phone view
write everything in detail

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== FAQPage.jsx ==="
cat frontend/src/pages/FAQPage.jsx

echo ""
echo "=== FAQAccordion.jsx ==="
cat frontend/src/components/faq/FAQAccordion.jsx

echo ""
echo "=== GettingStartedFAQ.jsx ==="
cat frontend/src/components/faq/GettingStartedFAQ.jsx

echo ""
echo "=== PlatformIntegrationFAQ.jsx ==="
cat frontend/src/components/faq/PlatformIntegrationFAQ.jsx

echo ""
echo "=== AnalyticsDashboardFAQ.jsx ==="
cat frontend/src/components/faq/AnalyticsDashboardFAQ.jsx

echo ""
echo "=== CommunityFAQ.jsx ==="
cat frontend/src/components/faq/CommunityFAQ.jsx

echo ""
echo "=== DataPrivacyFAQ.jsx ==="
cat frontend/src/components/faq/DataPrivacyFAQ.jsx

echo ""
echo "=== AccountManagementFAQ.jsx ==="
cat frontend/src/components/faq/AccountManagementFAQ.jsx

echo ""
echo "=== AccessibilityFAQ.jsx ==="
cat frontend/src/components/faq/AccessibilityFAQ.jsx

echo ""
echo "=== LegalComplianceFAQ.jsx ==="
cat frontend/src/components/faq/LegalComplianceFAQ.jsx

echo ""
echo "=== OpenSourceContribFAQ.jsx ==="
cat frontend/src/components/faq/OpenSourceContribFAQ.jsx

echo ""
echo "=== PerformanceFAQ.jsx ==="
cat frontend/src/components/faq/PerformanceFAQ.jsx

echo ""
echo "=== RoadmapFAQ.jsx ==="
cat frontend/src/components/faq/RoadmapFAQ.jsx

echo ""
echo "=== TroubleshootingFAQ.jsx ==="
cat frontend/src/components/faq/TroubleshootingFAQ.jsx

Length of output: 18156


🏁 Script executed:

#!/bin/bash
echo "=== data/faqs/index.js ==="
cat frontend/src/data/faqs/index.js

echo ""
echo "=== data/faqs/gettingStarted.js ==="
cat frontend/src/data/faqs/gettingStarted.js

echo ""
echo "=== data/faqs/platformIntegration.js ==="
cat frontend/src/data/faqs/platformIntegration.js

echo ""
echo "=== data/faqs/analyticsDashboard.js ==="
cat frontend/src/data/faqs/analyticsDashboard.js

echo ""
echo "=== data/faqs/dataPrivacy.js ==="
cat frontend/src/data/faqs/dataPrivacy.js

echo ""
echo "=== data/faqs/accountManagement.js ==="
cat frontend/src/data/faqs/accountManagement.js

echo ""
echo "=== data/faqs/openSourceContrib.js ==="
cat frontend/src/data/faqs/openSourceContrib.js

echo ""
echo "=== data/faqs/legalCompliance.js ==="
cat frontend/src/data/faqs/legalCompliance.js

echo ""
echo "=== data/faqs/troubleshooting.js ==="
cat frontend/src/data/faqs/troubleshooting.js

echo ""
echo "=== data/faqs/performance.js ==="
cat frontend/src/data/faqs/performance.js

echo ""
echo "=== data/faqs/community.js ==="
cat frontend/src/data/faqs/community.js

echo ""
echo "=== data/faqs/roadmap.js ==="
cat frontend/src/data/faqs/roadmap.js

echo ""
echo "=== data/faqs/accessibility.js ==="
cat frontend/src/data/faqs/accessibility.js

echo ""
echo "=== data/faqs.js (legacy) ==="
cat frontend/src/data/faqs.js

Length of output: 14069


🏁 Script executed:

#!/bin/bash
echo "=== frontend/src/index.css ==="
cat frontend/src/index.css

echo ""
echo "=== frontend/package.json ==="
cat frontend/package.json

echo ""
echo "=== Check if react-helmet-async is actually used in FAQPage ==="
rg -n "helmet" frontend/src/pages/FAQPage.jsx

echo ""
echo "=== Check for react-helmet-async usage across codebase ==="
rg -rn "helmet" frontend/src/ --type jsx 2>/dev/null || rg -rn "helmet" frontend/src/

echo ""
echo "=== Check how other pages structure (for consistency) ==="
ls frontend/src/pages/

echo ""
echo "=== Check for other page files to compare patterns ==="
cat frontend/src/pages/Contact.jsx 2>/dev/null | head -60

Length of output: 7178


🏁 Script executed:

#!/bin/bash
echo "=== Look for any existing FAQ-related files NOT in PR (legacy) ==="
find frontend/src -name "*faq*" -o -name "*FAQ*" 2>/dev/null

echo ""
echo "=== Check tailwind config for breakpoints / custom classes ==="
cat frontend/tailwind.config.js 2>/dev/null || cat frontend/tailwind.config.ts 2>/dev/null || echo "No tailwind config found at root"

find frontend -name "tailwind.config*" 2>/dev/null

echo ""
echo "=== Check if there's an app router / routing file to see FAQ route ==="
cat frontend/src/App.jsx 2>/dev/null || cat frontend/src/App.tsx 2>/dev/null || cat frontend/src/main.jsx 2>/dev/null

echo ""
echo "=== List all components in faq folder ==="
ls frontend/src/components/faq/

echo ""
echo "=== List all files in faqs data folder ==="
ls frontend/src/data/faqs/

echo ""
echo "=== Check if react-helmet-async is listed in package.json ==="
cat frontend/package.json | grep -i helmet

Length of output: 7466


🏁 Script executed:

#!/bin/bash
echo "=== Check if legacy data/faqs.js is still imported anywhere ==="
rg -rn "from.*data/faqs" frontend/src/ | grep -v "data/faqs/"

echo ""
echo "=== Check FAQSection.jsx in explore folder ==="
cat frontend/src/components/explore/FAQSection.jsx

echo ""
echo "=== Check if the barrel index.js is imported anywhere ==="
rg -rn "from.*data/faqs/index" frontend/src/ || rg -rn "from.*data/faqs'" frontend/src/

echo ""
echo "=== Check where data/faqs.js is used ==="
rg -rn "data/faqs" frontend/src/ | grep -v "data/faqs/"

Length of output: 6758



@kunalverma2512 — Here is a thorough, detailed review of the PR. I've read every file. Overall the architecture is solid and the modular direction is correct, but there are several issues that should be fixed before merging.


✅ What's Done Well

Area Status
Modular component architecture (12 independent sections)
Data-layer separation (src/data/faqs/)
Routing (/faq registered in App.jsx)
FAQAccordion ARIA implementation (aria-expanded, aria-controls, role="region", aria-labelledby)
All sections have aria-labelledby on <section>
Brutalist design language maintained (border-4, shadow-[...], font-black uppercase)
border-b-4 border-black dividers between sections
Minimum py-20 padding per section
Legacy FAQSection.jsx in /explore not broken (still imports from data/faqs.js)
Grid layouts collapse to single column on mobile

🔴 Critical Issues (Must Fix Before Merge)

1. react-helmet-async is installed but never used anywhere

react-helmet-async was added to package.json but there is zero usage across the entire codebase. This is a dead dependency.

The most likely reason it was added is to properly manage <title> and <meta> tags — which leads to issue #2 below.

Fix: Either wire it up (recommended) or remove it from package.json.


2. <title> and <meta> tags are placed inside <main> — semantically invalid

In FAQPage.jsx:

<main className="w-full overflow-x-hidden bg-white text-black">
  <title>FAQ - CodeLens</title>           {/* ❌ belongs in <head> */}
  <meta name="description" content="..." /> {/* ❌ belongs in <head> */}
  <section ...>

These tags must live in <head>, not in <main>. The correct fix is to use react-helmet-async (which was already added to package.json but never implemented):

// In main.jsx or App.jsx — wrap app with HelmetProvider once
import { HelmetProvider } from "react-helmet-async";
// <HelmetProvider><App /></HelmetProvider>

// Then in FAQPage.jsx
import { Helmet } from "react-helmet-async";

export default function FAQPage() {
  return (
    <>
      <Helmet>
        <title>FAQ - CodeLens</title>
        <meta name="description" content="Frequently asked questions about CodeLens..." />
      </Helmet>
      <main className="w-full overflow-x-hidden bg-white text-black">
        ...
      </main>
    </>
  );
}

The Contact.jsx page has the same problem, but that shouldn't be used as justification — it should be fixed there too.


3. data/faqs/index.js barrel file is unused

The barrel file was created:

// frontend/src/data/faqs/index.js
export * from "./gettingStarted";
export * from "./platformIntegration";
// ...12 exports

But every single component imports directly from its own data file:

import { gettingStartedFaqs } from "../../data/faqs/gettingStarted"; // direct import, not from index

The barrel file is never imported anywhere in the codebase. Either adopt it consistently in all 12 components or delete it.


🟡 Layout & Responsiveness Issues

4. Inconsistent horizontal padding between the hero and all 12 section components

The FAQPage hero section uses responsive padding:

className="... px-6 sm:px-10 lg:px-16"

But every single FAQ section component only has:

className="py-20 px-6 ..."   // no sm:/lg: variants

On a desktop screen, the hero content starts at a wider indent, but all 12 section headings and grids hug the edge. This creates a visible misalignment. All section components need sm:px-10 lg:px-16 added.


5. Missing max-w-7xl mx-auto content container in most section components

The FAQPage hero wraps content inside:

<div className="mx-auto max-w-7xl ...">

But GettingStartedFAQ, AnalyticsDashboardFAQ, AccountManagementFAQ, AccessibilityFAQ, PerformanceFAQ, and OpenSourceContribFAQ have no inner max-width wrapper. On very wide screens (1440px+), grids and text stretch unnecessarily wide. All section components should wrap their inner content with:

<div className="mx-auto max-w-7xl">
  ...
</div>

6. TroubleshootingFAQ has an extra inner wrapper adding inconsistent padding

<section ...className="py-20 px-6 ...">
  <div className="lg:px-10">   {/* ❌ adds extra left/right indent only at lg */}
    <h2 ...>Troubleshooting</h2>

This lg:px-10 inner div is not present in any other section. Remove it.


🟠 Content Quality Issues

7. Duplicate questions in roadmap.js

Both entries are essentially the same question:

  • future-platforms: "Will CodeLens support more platforms in the future?"
  • new-platform-support: "Will more coding platforms be supported in future?"

Remove one. Replace with a genuinely different question (e.g., about the contribution roadmap process or timeline).


8. Duplicate answers in accessibility.js

  • keyboard-nav: "Interactive elements are designed to remain keyboard accessible where possible."
  • accessible-navigation: "Interactive elements are built to support keyboard navigation for improved accessibility."

These are near-identical. Replace one with a distinct accessibility question (e.g., font size adjustability, reduced motion support, or focus indicators).


9. Vague/uncommitted answer content throughout

Several answers use uncertain hedging language that reads as unprofessional for a help center page:

File ID Problem
roadmap.js mobile-app "Mobile support may be considered as the platform grows." — adds no value
roadmap.js planned-features "Future updates may include better analytics..." — too vague
community.js discord "Community communication channels may be linked through the project repository." — unclear if Discord exists
analyticsDashboard.js compare-stats "CodeLens may allow comparative analytics..." — unclear if feature exists
openSourceContrib.js tech-stack "CodeLens uses modern frontend and backend technologies..." — says nothing useful

Replace these with factual, specific answers. If a feature doesn't exist yet, say so directly: "A mobile app is not currently planned." is better than "may be considered".


🟠 Code Quality Issues

10. Redundant Array.isArray guard in PerformanceFAQ.jsx

if (!Array.isArray(performanceFaqs)) {
  return <section>...No performance FAQs available yet.</section>;
}

performanceFaqs is statically exported as export const performanceFaqs = [...] — it is always an array and this branch will never execute. Remove the dead code guard.


11. Inconsistent heading string casing in source code

Some headings are written in ALL CAPS in the JSX source, others in Title Case:

// ALL CAPS in source (PlatformIntegrationFAQ, AnalyticsDashboardFAQ, etc.)
<h2>PLATFORM INTEGRATIONS</h2>
<h2>ANALYTICS DASHBOARD</h2>
// Title Case in source (GettingStartedFAQ, DataPrivacyFAQ, etc.)
<h2>Getting Started</h2>
<h2>Data Privacy & Security</h2>

Since all headings apply the uppercase Tailwind class, the visual output is identical. But the source code should be consistent. Use Title Case in the JSX and let CSS handle the uppercase transformation.


12. FAQPage intro shows only 2 hardcoded chips out of 12 sections

<span ...>Analytics</span>
<span ...>Privacy</span>

There are 12 FAQ sections. Showing only 2 is misleading. Either list all key categories (in a responsive wrap grid) or remove the chip list entirely if it's just decorative.


📱 Phone Responsiveness Summary

Concern Status
Grid layouts collapse to 1 column on mobile (< 768px) ✅ Correct
FAQAccordion stacks in a single column ✅ Correct
overflow-x-hidden on <main> prevents horizontal scroll ✅ Correct
Section horizontal padding on mobile (px-6 = 24px each side) ✅ Sufficient
Section heading text-4xl on mobile ⚠️ Fine but not responsive (hero h1 scales, sections don't)
Inconsistent padding alignment between hero and sections on desktop ❌ Needs fix (issue #4 above)
Missing max-width containers on wide screens ❌ Needs fix (issue #5 above)

Phone view is functionally usable — grids collapse, accordions work, no overflow. But the padding misalignment between the hero and section bodies will be noticeable on desktop/tablet.


Summary

Severity Count Items
🔴 Critical 3 react-helmet-async unused, <title>/<meta> in <main>, barrel index.js unused
🟡 Layout 3 Missing responsive padding, missing max-w-7xl containers, TroubleshootingFAQ extra wrapper
🟠 Content 3 Duplicate roadmap entries, duplicate accessibility entries, vague answers
🟠 Code quality 2 Redundant guard in PerformanceFAQ, inconsistent heading casing
🟠 UX 1 Only 2 chips shown for 12 sections

The PR is not ready to merge in its current state. The architecture is genuinely good — the modular decomposition is clean and the data layer is well-organized. Address the critical issues (especially react-helmet-async + <Helmet> wiring, and the unused barrel) and fix the layout padding/container inconsistencies, and this will be in solid shape.

@kunalverma2512

kunalverma2512 commented Jun 15, 2026

Copy link
Copy Markdown
Owner

@snehamathad604 I see coderabbitai has shown MANY bugs so please do I complete reasoning about it and after studying what it says then implement in codebase

IMPORTANT : ITS MANDATORY TO SHOWCASE FULL FAQ PAGE AND LITTLE BIT OF CODE PRESENTATION

FOR VIDEO YOU CAN REFER TO LOOM OR PUT YOUR VIDEO IN YOUR DRIVE AND SHARE ITS LINK

ALSO YOUR PR DESCRIPTION DOES NOT HAVE ALL SECTION SCREENSHOT SO ATTACH EVERY SECTION

SCREENSHOT AND VIDEO BOTH ARE MANDATORY

I AM SO MUCH EXCITED TO SEE FULL FAQ PAGE

WAITING FOR YOUR NEXT ITERATION WORK
GOOD LUCK @snehamathad604

@snehamathad604

Copy link
Copy Markdown
Author

Thanks for the review. I’ll address the CodeRabbit suggestions, update the UI changes, and attach screenshots of all FAQ sections along with a demo video in the next iteration.

@kunalverma2512

Copy link
Copy Markdown
Owner

Thanks for the review. I’ll address the CodeRabbit suggestions, update the UI changes, and attach screenshots of all FAQ sections along with a demo video in the next iteration.

@snehamathad604 Join codelens communnity,developement,welcome rooms and you can put your doubts, updates on your issue and PR's you made and you can also talk about any idea

@kunalverma2512

Copy link
Copy Markdown
Owner

@snehamathad604 you can support this project by starring it

@kunalverma2512

Copy link
Copy Markdown
Owner

@snehamathad604 its been late
please let me know till where you reached and whats remaining else ?

@snehamathad604

Copy link
Copy Markdown
Author

Hi, I’ve been working through the review comments and addressing them one by one.
So far I’ve fixed issues related to FAQ structure, duplicate questions, section consistency, layout improvements, and other CodeRabbit suggestions.
I’m currently finishing the remaining duplicate/redundancy fixes in a few sections and doing a final browser/build check.
I should be able to push the updated changes shortly. Thanks for your patience.

@kunalverma2512

Copy link
Copy Markdown
Owner

Hi, I’ve been working through the review comments and addressing them one by one. So far I’ve fixed issues related to FAQ structure, duplicate questions, section consistency, layout improvements, and other CodeRabbit suggestions. I’m currently finishing the remaining duplicate/redundancy fixes in a few sections and doing a final browser/build check. I should be able to push the updated changes shortly. Thanks for your patience.

@snehamathad604 thats great to hear and excited to see final outcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feature] Expand FAQ Page into 12+ Modular JSX Components with Comprehensive, Design-First Content

2 participants