feat(support): implement faq and help center accordion ui#59
Conversation
|
@Wisdom2788 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
a0d977e to
8b4272f
Compare
|
The CI failure is a pre-existing infrastructure issue — next@16.1.6 All quality gates pass locally: Ready for review. |
|
Resolve conflict @Wisdom2788 |
46a2df4 to
3cabd6f
Compare
|
Hi @johdanike — the CI pipeline is failing on all PRs due to two issues in
Suggested fix to strategy:
matrix:
node-version: [20.x, 22.x] # Remove 18.x — unsupported by next@16
- name: Lint
run: npm run lint -- --no-lint-during-builds # or update package.json lint scriptThis would allow CI to pass on all incoming PRs. I don't mind submitting a separate PR fixing the workflow file if that helps. |
Closes #40
Summary
Implements the FAQ & Help Center UI with animated accordion components and full layered architecture per issue #40.
What was built
services/faqService.ts— API service callingGET /api/faqvia axios to fetch categorised FAQ datahooks/useFaq.ts— TanStack Query hook wrapping the service, exposes loading/error/data statescomponents/support/Accordion.tsx— single expandable item with smooth CSS max-height animation and full ARIA support (aria-expanded,aria-hidden,aria-controls,role="region")components/support/Accordion.module.css— animation styles: max-height transition + chevron icon rotation on open/closecomponents/support/AccordionSection.tsx— renders a category heading and its list of accordion itemscomponents/support/FaqHelpCenter.tsx— top-level component consuminguseFaq, handles loading/error/empty statescomponents/providers/QueryProvider.tsx— TanStack Query client provider wired into root layoutapp/faq/page.tsx— Next.js page route at/faqcomposing the full Help Center UIservices/__tests__/faqService.test.ts+components/support/__tests__/Accordion.test.tsx— 19 unit tests across 4 suites, all passingAcceptance Criteria
max-heighttransition + chevronrotate(180deg)on open/closeAccordionSectionfaqService.getFaqs()callingGET /api/faq— no inline mock objects (error state on/faqconfirms real API call is made)Screenshots