Skip to content

Conversation

@REHAAANNN
Copy link

@REHAAANNN REHAAANNN commented Dec 13, 2025

image image

Add comprehensive FAQ page with searchable and categorized questions

  • Implement accordion-style expandable FAQ items
  • Add category filters (Getting Started, Voting, Creating Elections, Security & Privacy, Troubleshooting)
  • Include contact/support section with multiple support channels
  • Add Help navigation link in header
  • Fix body overflow to enable scrolling
  • Implement dark mode support for Help page
  • Use Framer Motion for smooth animations
  • Responsive design for all screen sizes

Description

Include a summary of the change and which issue is fixed. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please mark the options that are relevant.

  • Updated UI/UX
  • Improved the business logic of code
  • Added new feature
  • Other

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Summary by CodeRabbit

  • New Features

    • Added a Help menu item in the main navigation for quick access
    • Launched a Help page with searchable FAQs, category filtering, and expandable answers
    • Added support resources: documentation links, community channels, and email contact
  • Style / UX

    • Enabled vertical page scrolling for improved navigation and content access

✏️ Tip: You can customize this high-level summary in your review settings.

- Add comprehensive FAQ page with searchable and categorized questions
- Implement accordion-style expandable FAQ items
- Add category filters (Getting Started, Voting, Creating Elections, Security & Privacy, Troubleshooting)
- Include contact/support section with multiple support channels
- Add Help navigation link in header
- Fix body overflow to enable scrolling
- Implement dark mode support for Help page
- Use Framer Motion for smooth animations
- Responsive design for all screen sizes
@coderabbitai
Copy link

coderabbitai bot commented Dec 13, 2025

Walkthrough

Adds a Help page with searchable, categorized FAQs and support links; adds a "Help" menu item to the header; enables vertical page scrolling by changing body overflow-y to auto.

Changes

Cohort / File(s) Summary
Header Navigation Update
client/app/components/Header/Header.tsx
Imports QuestionMarkCircleIcon and adds a new "Help" menu item linking to /help in the header navigation.
New Help Page
client/app/help/page.tsx
Adds HelpPage (default export) implementing a searchable, category-filtered FAQ list with expandable accordion items, animated chevrons, and support resource cards (Documentation, Community, Email).
Layout Scrolling
client/app/globals.css
Changes body overflow-y from hidden to auto, enabling vertical scrolling on the document body.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review focus:
    • client/app/help/page.tsx: verify search + category filtering logic, expand/collapse state, keyboard accessibility and semantic markup.
    • client/app/components/Header/Header.tsx: confirm new menu item follows existing active-state, focus/ARIA patterns, and icon import is correct.
    • client/app/globals.css: ensure enabling vertical scroll doesn't introduce layout regressions or visual overflow issues.

Poem

I hop through code with whiskers twitching, 🐇
A Help page planted, FAQs enriching,
Search and tabs and chevrons that dance,
A tiny spring of guidance—take a chance!

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding a Help & Support / FAQ page, with the issue reference (#179) for traceability.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 220acc3 and e82c689.

📒 Files selected for processing (1)
  • client/app/help/page.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • client/app/help/page.tsx

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.

Copy link

@coderabbitai coderabbitai bot left a comment

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)
client/app/globals.css (1)

5-9: Consider scoping scroll enabling to avoid regressions in pages/modals that relied on body { overflow-y: hidden; }.
If the app uses body scroll-lock for overlays, this global change can reintroduce background scrolling; consider moving this to a layout wrapper (or toggling via a class) instead of applying unconditionally.

client/app/help/page.tsx (2)

193-223: Accordion a11y is incomplete (missing aria-expanded, aria-controls, and a region id).
This is a quick win for screen readers and keyboard users.

-                  <button
-                    onClick={() => toggleFAQ(faq.question)}
+                  <button
+                    onClick={() => toggleFAQ(faq.question)}
+                    aria-expanded={expandedFAQ === faq.question}
+                    aria-controls={`faq-panel-${index}`}
                     className="w-full px-6 py-4 flex items-center justify-between text-left hover:bg-gray-50 dark:hover:bg-gray-750 transition-colors duration-200"
                   >
...
-                  {expandedFAQ === faq.question && (
+                  {expandedFAQ === faq.question && (
                     <motion.div
+                      id={`faq-panel-${index}`}
+                      role="region"
+                      aria-label={faq.question}
                       initial={{ height: 0, opacity: 0 }}
                       animate={{ height: "auto", opacity: 1 }}
                       exit={{ height: 0, opacity: 0 }}

146-152: Search input needs an accessible label (placeholder isn’t a label).
Add aria-label (or a visually-hidden <label>).

             <input
               type="text"
               placeholder="Search for help..."
+              aria-label="Search FAQs"
               value={searchQuery}
               onChange={(e) => setSearchQuery(e.target.value)}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d3a4dd and 5ab9af1.

📒 Files selected for processing (3)
  • client/app/components/Header/Header.tsx (2 hunks)
  • client/app/globals.css (1 hunks)
  • client/app/help/page.tsx (1 hunks)
🔇 Additional comments (4)
client/app/components/Header/Header.tsx (1)

7-23: Help nav item wiring looks consistent (desktop + mobile) and should “just work”.
No concerns with adding the icon import and a /help route entry to menuItems.

client/app/help/page.tsx (3)

195-195: Verify Tailwind supports dark:hover:bg-gray-750 (likely invalid in default palette).
If it’s not customized, the class will be ignored; prefer dark:hover:bg-gray-700 / dark:hover:bg-gray-800 (or add a custom color).


3-3: exit animations won’t run without AnimatePresence wrapping the conditional content.
If you want smooth collapse, wrap the conditional panel with AnimatePresence and import it.

-import { motion } from "framer-motion";
+import { motion, AnimatePresence } from "framer-motion";
...
-                  {expandedFAQ === faq.question && (
-                    <motion.div
+                  <AnimatePresence initial={false}>
+                    {expandedFAQ === faq.question && (
+                      <motion.div
                         initial={{ height: 0, opacity: 0 }}
                         animate={{ height: "auto", opacity: 1 }}
                         exit={{ height: 0, opacity: 0 }}
                         transition={{ duration: 0.3 }}
                         className="px-6 pb-4"
-                    >
-                      <p className="text-gray-600 dark:text-gray-300 leading-relaxed">
-                        {faq.answer}
-                      </p>
-                    </motion.div>
-                  )}
+                      >
+                        <p className="text-gray-600 dark:text-gray-300 leading-relaxed">
+                          {faq.answer}
+                        </p>
+                      </motion.div>
+                    )}
+                  </AnimatePresence>

Also applies to: 211-223


18-91: Please verify/soften FAQ claims and “Community” link to avoid misleading support/security statements.
Examples: “ZK-SNARKs”, “All smart contracts are audited”, and the list of supported testnets can become incorrect; also the “Discord or Slack” CTA currently points to the org homepage rather than an invite/support channel.

Also applies to: 274-285

- Add AnimatePresence for smooth exit animations
- Use stable keys (faq.question) instead of array index
- Add aria-expanded, aria-controls, and aria-label for accessibility
- Fix dark mode hover color from gray-750 to gray-700
- Wrap conditional accordion panels with AnimatePresence
- Add role='region' to FAQ panels for screen readers
Copy link

@coderabbitai coderabbitai bot left a comment

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 (1)
client/app/help/page.tsx (1)

18-100: Consider extracting FAQ data for better maintainability.

The FAQ data is comprehensive, but hardcoding it in the component makes it harder to maintain as it grows. Consider moving faqs and categories to a separate data file (e.g., helpData.ts).

Example structure:

// helpData.ts
export const faqs: FAQ[] = [ /* ... */ ];
export const categories = [ /* ... */ ];

Then import in the component:

import { faqs, categories } from './helpData';
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ab9af1 and 220acc3.

📒 Files selected for processing (1)
  • client/app/help/page.tsx (1 hunks)
🔇 Additional comments (4)
client/app/help/page.tsx (4)

1-16: LGTM! Clean imports and interface definition.

The imports are appropriate, and the FAQ interface is well-structured for the component's needs.


102-118: Good fix! Stable identifier pattern correctly implemented.

The previous review's concern about index-based state has been addressed. The component now uses faq.question as a stable identifier for the accordion state, which prevents desynchronization when filtering changes.


137-177: LGTM! Well-implemented search and filter UI.

The search bar includes proper accessibility attributes, and the category filters have clear visual states. Dark mode support is comprehensive throughout.


244-313: LGTM! Support section properly implemented.

The external links correctly include rel="noopener noreferrer" for security, and the responsive grid layout works well across screen sizes.

- Add generatePanelId helper function to create stable identifiers
- Replace index-based aria-controls with stable panel IDs
- Ensure ARIA associations remain correct when filtering/reordering
- Improves accessibility for screen readers
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.

1 participant