Skip to content

Add a dedicated Frequently Asked Questions (FAQ) page#389

Open
ArshiBansal wants to merge 1 commit into
Darshan3690:mainfrom
ArshiBansal:faq_page
Open

Add a dedicated Frequently Asked Questions (FAQ) page#389
ArshiBansal wants to merge 1 commit into
Darshan3690:mainfrom
ArshiBansal:faq_page

Conversation

@ArshiBansal

@ArshiBansal ArshiBansal commented Jun 22, 2026

Copy link
Copy Markdown

📋 What Does This PR Do?

This PR implements a dedicated FAQ page (/faq) for the Dev Pocket website as per the issue requirements.

Key Changes & Features Added:

  • Created new route: app/faq/page.tsx
  • Organized FAQs into 6 structured categories:
    • General Questions
    • Account & Authentication
    • Features & Usage
    • Contributions & Community
    • Privacy & Security
    • Contact & Support
  • Added live search/filter functionality for better usability
  • Implemented smooth accordion-style collapsible design using Framer Motion
  • Fully responsive design (mobile-first)
  • Consistent styling with the existing website theme (supports dark/light mode)
  • Enhanced accessibility with proper ARIA attributes and semantic HTML
  • Added "Still have questions?" section with links to Contact and Home pages

🛠 Tech Stack Used

  • Next.js App Router
  • TypeScript
  • Tailwind CSS
  • Framer Motion
  • React Hooks (useState, useMemo)

Related Issue

Closes #374


Additional Notes

This dedicated FAQ page improves user experience by providing quick self-service answers, reducing support queries, and helping new users understand the platform faster.


Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • My changes generate no new warnings
  • The page is fully responsive and accessible

Summary by CodeRabbit

  • New Features

    • Added a new FAQ page with search functionality to filter questions and answers by topic.
    • Implemented animated accordion interface for FAQ sections.
  • Bug Fixes

    • Updated FAQ link URL in footer to correctly point to the new FAQ page.

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

A new client-side Next.js page (app/faqs/page.tsx) is added at the /faqs route, implementing a searchable FAQ accordion with Framer Motion animations and a "Still have questions?" CTA. The Footer's "FAQ" quick link is updated from /faq to /faqs to match.

Changes

FAQ Page and Footer Link

Layer / File(s) Summary
FAQPage component: data, state, and rendered layout
app/faqs/page.tsx
Defines the FAQItem interface, hardcodes a categorized FAQ dataset, adds searchTerm/openIndex state with useMemo-derived filteredFaqs and groupedFaqs, and renders the full page: search header, animated accordion (motion, AnimatePresence), and a "Still have questions?" CTA with links to /contact and /. isDark is computed via useTheme but not used in JSX.
Footer /faq → /faqs link update
app/components/Footer.tsx
Changes the "FAQ" quick link href from /faq to /faqs to match the newly added route.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A page full of answers, now hops into view,
With search bars and accordions, shiny and new!
The footer link changed from /faq to /faqs,
No more lost bunnies hunting for clues.
Questions and answers, neatly in rows —
That's how a tidy FAQ grows! 🌿

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes a minor out-of-scope change: the Footer component URL was updated from /faq to /faqs, which is a path inconsistency not specified in the linked issue requirements. Verify that the route should be /faqs instead of /faq as specified in issue #374, or revert the Footer component change to maintain consistency with issue requirements.
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 (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding a dedicated FAQ page component to the application.
Linked Issues check ✅ Passed The implementation includes a new FAQ page at /faqs with categorized questions, search functionality, accordion layout, responsive design, and dark/light mode support, fulfilling all primary coding requirements from issue #374.

✏️ 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.

Warning

⚠️ This pull request shows signs of AI-generated slop (redundant_comments, description_diff_mismatch). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cdcd80730d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread app/components/Footer.tsx
<li>
<Link
href="/faq"
href="/faqs"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep every FAQ entry point on the same route

This footer link now sends users to /faqs, but the existing /faq page remains and the other in-app FAQ entry points still target it (app/page.tsx:380, app/contact/page.tsx:134, and app/not-found.tsx:73). As a result, users see different FAQ content depending on where they click, and updates made in the new page are missed from the main support/contact flows; either reuse the existing route or update the remaining links together.

Useful? React with 👍 / 👎.

Comment thread app/faqs/page.tsx
{/* Search Bar */}
<div className="mb-12">
<div className="relative max-w-xl mx-auto">
<input

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Give the FAQ search input an accessible name

On the new /faqs page, the search field has only placeholder text and no associated <label>, aria-label, or aria-labelledby. Screen-reader users navigating the form control may not get a stable name for what this input does, especially after typing replaces the placeholder; add an accessible label as the existing /faq search field does.

Useful? React with 👍 / 👎.

@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: 2

🤖 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 `@app/faqs/page.tsx`:
- Around line 106-109: The markdown-style link syntax [here](/privacy) in the
answer string of the FAQ item will render as plain text rather than a clickable
link since React doesn't parse markdown in text nodes. Replace the markdown link
syntax with an actual React Link component or HTML anchor tag to create a
functional hyperlink to the privacy page. Apply this same fix to all other FAQ
items with similar markdown-style links (note that the same pattern appears in
multiple FAQ entries as indicated by the "Also applies to" comment).
- Around line 170-176: The search input element lacks proper accessibility
labeling and the accordion trigger/panel pairs are missing ARIA associations.
Add an explicit label element with htmlFor attribute or an aria-label to the
search input for screen readers. For each accordion trigger element in the
mapped list items (found in the sections around lines 215-219 and 249-257), add
an aria-controls attribute that references a unique id, and add that matching id
to the corresponding accordion panel/content element to establish proper ARIA
control relationships between triggers and panels.
🪄 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: eaa1e96a-0d09-4a92-b086-c8e8ce80da22

📥 Commits

Reviewing files that changed from the base of the PR and between 7580362 and cdcd807.

📒 Files selected for processing (2)
  • app/components/Footer.tsx
  • app/faqs/page.tsx

Comment thread app/faqs/page.tsx
Comment on lines +106 to +109
question: "What is your privacy policy?",
answer:
"You can read our full Privacy Policy [here](/privacy). We comply with GDPR and other major data protection regulations.",
},

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

Markdown-style link text will render as plain text, not a clickable link.

[here](/privacy) in a string is shown literally in React text nodes, so users can’t click through to the policy from this FAQ item.

Suggested fix
 interface FAQItem {
   question: string;
-  answer: string;
+  answer: React.ReactNode;
   category: string;
 }

 // ...
 {
   category: "Privacy & Security",
   question: "What is your privacy policy?",
-  answer:
-    "You can read our full Privacy Policy [here](/privacy). We comply with GDPR and other major data protection regulations.",
+  answer: (
+    <>
+      You can read our full Privacy Policy{" "}
+      <Link href="/privacy" className="text-sky-600 dark:text-sky-400 underline">
+        here
+      </Link>
+      . We comply with GDPR and other major data protection regulations.
+    </>
+  ),
 },

 // render remains valid:
 <div className="px-8 pb-8 text-gray-600 dark:text-gray-400 leading-relaxed border-t border-gray-100 dark:border-gray-700 pt-6">
   {faq.answer}
 </div>

Also applies to: 256-258

🤖 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 `@app/faqs/page.tsx` around lines 106 - 109, The markdown-style link syntax
[here](/privacy) in the answer string of the FAQ item will render as plain text
rather than a clickable link since React doesn't parse markdown in text nodes.
Replace the markdown link syntax with an actual React Link component or HTML
anchor tag to create a functional hyperlink to the privacy page. Apply this same
fix to all other FAQ items with similar markdown-style links (note that the same
pattern appears in multiple FAQ entries as indicated by the "Also applies to"
comment).

Comment thread app/faqs/page.tsx
Comment on lines +170 to +176
<input
type="text"
placeholder="Search FAQs..."
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-full px-6 py-4 rounded-2xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-sky-500 text-lg"
/>

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

Improve search + accordion ARIA wiring for screen-reader navigation.

The search input lacks an explicit label, and each accordion trigger/panel pair is missing aria-controlsid association.

Suggested fix
-<input
-  type="text"
+<label htmlFor="faq-search" className="sr-only">
+  Search frequently asked questions
+</label>
+<input
+  id="faq-search"
+  type="search"
   placeholder="Search FAQs..."
   value={searchTerm}
   onChange={(e) => setSearchTerm(e.target.value)}
   className="w-full px-6 py-4 rounded-2xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-sky-500 text-lg"
 />

 {items.map((faq, idx) => {
   const globalIndex = faqs.findIndex((f) => f.question === faq.question);
+  const panelId = `faq-panel-${globalIndex}`;
+  const buttonId = `faq-button-${globalIndex}`;
   return (
     <motion.div ...>
       <button
+        id={buttonId}
         onClick={() => toggleFAQ(globalIndex)}
         className="w-full px-8 py-6 text-left flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-all group"
         aria-expanded={openIndex === globalIndex}
+        aria-controls={panelId}
       >
         ...
       </button>

       <AnimatePresence>
         {openIndex === globalIndex && (
           <motion.div
+            id={panelId}
+            role="region"
+            aria-labelledby={buttonId}
             initial={{ height: 0, opacity: 0 }}
             animate={{ height: "auto", opacity: 1 }}
             exit={{ height: 0, opacity: 0 }}

Also applies to: 215-219, 249-257

🤖 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 `@app/faqs/page.tsx` around lines 170 - 176, The search input element lacks
proper accessibility labeling and the accordion trigger/panel pairs are missing
ARIA associations. Add an explicit label element with htmlFor attribute or an
aria-label to the search input for screen readers. For each accordion trigger
element in the mapped list items (found in the sections around lines 215-219 and
249-257), add an aria-controls attribute that references a unique id, and add
that matching id to the corresponding accordion panel/content element to
establish proper ARIA control relationships between triggers and panels.

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.

feat: Add dedicated FAQ page with categorized questions and answers

1 participant