Skip to content

Adding faq page#74

Open
shahidansari311 wants to merge 4 commits into
kunalverma2512:mainfrom
shahidansari311:adding-faq-page
Open

Adding faq page#74
shahidansari311 wants to merge 4 commits into
kunalverma2512:mainfrom
shahidansari311:adding-faq-page

Conversation

@shahidansari311
Copy link
Copy Markdown

@shahidansari311 shahidansari311 commented May 17, 2026

Summary by CodeRabbit

  • New Features
    • Added a comprehensive FAQ page with an interactive accordion interface
    • Added FAQ navigation link to both desktop and mobile menus
    • Implemented category-based FAQ organization with expandable question-answer pairs
    • Added GitHub issue link in the FAQ section for additional support

Review Change Stack

@github-actions
Copy link
Copy Markdown

🚀 PR Received Successfully

Hello @shahidansari311,

Thank you for taking the initiative to contribute to this project.

Please ensure that your PR follows all project guidelines properly before requesting review.

⚠️ Important Instructions

  • Maintain proper code quality and structure
  • Do not make unnecessary changes/files
  • Ensure responsiveness across devices
  • Follow existing project conventions strictly
  • Attach screenshots/videos for UI-related changes
  • Resolve merge conflicts before requesting review
  • Avoid AI-generated low quality PRs or copied implementations

📌 Mandatory for GSSoC'26 Participants

Joining the community group and announcement channel is compulsory for all contributors participating through GSSoC'26.

Failure to follow contribution guidelines may lead to PR rejection.

We appreciate your effort and wish you a great open-source journey ahead. ✨

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 17, 2026

Warning

Rate limit exceeded

@shahidansari311 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 36 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c6d6fd2c-319a-49ac-a7d5-d16154d748df

📥 Commits

Reviewing files that changed from the base of the PR and between aea76b1 and 83af5fe.

📒 Files selected for processing (2)
  • frontend/src/App.jsx
  • frontend/src/components/shared/Navbar.jsx
📝 Walkthrough

Walkthrough

This PR adds a comprehensive FAQ feature to the application. The implementation includes a new FAQPage component with categorized question-answer pairs and an accordion-style UI, routing integration to make it accessible at /faq, navigation links in both desktop and mobile menus, and an asset update.

Changes

FAQ Page Feature

Layer / File(s) Summary
FAQ Page Component and Data
frontend/src/pages/FAQPage.jsx
FAQ_CATEGORIES dataset defines category metadata (id, label, icon) and associated QA pairs. AccordionItem component renders collapsible answer sections with animated maxHeight transitions. FAQPage manages state for active category and open accordion index, derived from the categories dataset.
App Routing Integration
frontend/src/App.jsx
Import FAQPage and register a new route at /faq rendering the page component.
Navigation Link Integration
frontend/src/components/shared/Navbar.jsx
Add FAQ links to desktop center navigation (visible on lg+ screens) and mobile menu list (visible below lg), with mobile link calling closeMenu on click.
Favicon Asset Update
frontend/index.html
Update favicon link from /favicon.svg to /codelens.png.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A FAQ page hops in today,
With answers grouped by category's way,
Accordions expand with smooth delight,
Nav links guide both left and right,
And one small favicon shines so bright!

🚥 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 describes the main change in the pull request—adding a new FAQ page with routing, navigation links, and a complete FAQ component implementation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Copy link
Copy Markdown

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

🧹 Nitpick comments (1)
frontend/src/pages/FAQPage.jsx (1)

113-116: ⚡ Quick win

Avoid fixed accordion max-height; it can truncate long answers.

A hardcoded 400px can clip content as FAQ text grows. Prefer measuring content height (or a CSS grid/auto-height approach) so expansion always fits.

🤖 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/pages/FAQPage.jsx` around lines 113 - 116, The accordion uses a
hardcoded maxHeight ("maxHeight: isOpen ? \"400px\" : \"0px\"") which can
truncate long answers; update the FAQPage.jsx Accordion/answer container to
compute and apply the element's scrollHeight when opening (e.g., set maxHeight
to the measured content height or to `${contentRef.current.scrollHeight}px` when
isOpen) and set it back to "0px" when closed, or switch to a CSS approach using
height: auto with a max-height transition workaround (measure then animate) so
the expansion always fits the full answer; locate code referencing isOpen and
maxHeight in the FAQPage.jsx styles and replace the fixed "400px" with the
measured value tied to the content ref or an auto-height solution.
🤖 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/index.html`:
- Line 5: The favicon link tag in frontend/index.html has a MIME mismatch: the
href attribute points to "codelens.png" but the type attribute is
"image/svg+xml"; update the link tag so the type matches the actual file (e.g.,
change type to "image/png") or change href to an actual SVG file, ensuring the
link element's href and type attributes (the <link rel="icon" ...> tag) are
consistent.

In `@frontend/src/pages/FAQPage.jsx`:
- Around line 60-62: Update the FAQ entry whose q is "Is my data private?" by
softening the absolute retention claim in its a string: replace "Google does not
retain your personal data" with a qualified statement such as referencing the
relevant provider or integration settings and advising users to review the
provider's privacy policy (e.g., "If you use integrations with Google, please
review Google's retention and privacy policies" or "Data sharing depends on
configured integrations—see provider policies"). Ensure the change is made on
the FAQ object where q and a are defined so the UI shows the qualified phrasing.
- Around line 37-39: Update the FAQ entry in frontend/src/pages/FAQPage.jsx that
answers "Where do I put my Gemini API key?" by removing the reference to the
optional client-side environment variable VITE_GEMINI_KEY; change the answer to
instruct users to place their key only in server/.env as
GEMINI_API_KEY=your_key_here and optionally add a brief note that API keys must
not be exposed in frontend code. Locate the answer text in the FAQ data object
(the entry with q: "Where do I put my Gemini API key?") and edit that string
accordingly.
- Line 91: The accordion trigger button currently strips the focus indicator via
the class fragment "focus:outline-none" in the className on the accordion
trigger (frontend/src/pages/FAQPage.jsx); remove that token and replace it with
an accessible visible focus style such as a focus-visible/focus ring (e.g. add
classes like "focus-visible:ring-2 focus-visible:ring-offset-2
focus-visible:ring-indigo-500" or "focus:ring-2 focus:ring-offset-2
focus:ring-indigo-500") so keyboard users see a clear focus outline while
preserving existing spacing classes ("w-full flex items-start justify-between
gap-4 px-6 py-5 text-left").

---

Nitpick comments:
In `@frontend/src/pages/FAQPage.jsx`:
- Around line 113-116: The accordion uses a hardcoded maxHeight ("maxHeight:
isOpen ? \"400px\" : \"0px\"") which can truncate long answers; update the
FAQPage.jsx Accordion/answer container to compute and apply the element's
scrollHeight when opening (e.g., set maxHeight to the measured content height or
to `${contentRef.current.scrollHeight}px` when isOpen) and set it back to "0px"
when closed, or switch to a CSS approach using height: auto with a max-height
transition workaround (measure then animate) so the expansion always fits the
full answer; locate code referencing isOpen and maxHeight in the FAQPage.jsx
styles and replace the fixed "400px" with the measured value tied to the content
ref or an auto-height solution.
🪄 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: e0455381-f03f-45d3-a75e-9b8f4e318ca4

📥 Commits

Reviewing files that changed from the base of the PR and between d2f35e0 and aea76b1.

⛔ Files ignored due to path filters (3)
  • frontend/package-lock.json is excluded by !**/package-lock.json
  • frontend/public/codelens.png is excluded by !**/*.png
  • server/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • frontend/index.html
  • frontend/src/App.jsx
  • frontend/src/components/shared/Navbar.jsx
  • frontend/src/pages/FAQPage.jsx

Comment thread frontend/index.html
Comment thread frontend/src/pages/FAQPage.jsx
Comment thread frontend/src/pages/FAQPage.jsx
Comment thread frontend/src/pages/FAQPage.jsx
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