Skip to content

feat: implement Topic Feed UI/UX enhancement#549

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Faromzy:feat/topic-feed-ui-ux
May 28, 2026
Merged

feat: implement Topic Feed UI/UX enhancement#549
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Faromzy:feat/topic-feed-ui-ux

Conversation

@Faromzy
Copy link
Copy Markdown
Contributor

@Faromzy Faromzy commented May 28, 2026

feat: Topic Feed UI/UX Enhancement

Summary

Implements the Topic Feed feature for the /topics/[slug] route, providing users
with a dedicated page to browse and discover posts within a specific topic.

Changes

  • src/utils/socialUtils.ts — Added Topic and TopicPost types

  • src/hooks/useTopicFeed.ts — New hook handling data fetching, pagination
    (cursor-based), and sort state (latest, popular, oldest)

  • src/components/social/TopicFeed.tsx — New client component with:

    • Topic header (name, description, post/follower counts)
    • Sort controls (Latest / Popular / Oldest)
    • Infinite scroll via IntersectionObserver
    • Skeleton loading states
    • Empty and error states
    • Accessible markup (role, aria-*, , )
  • src/app/topics/[slug]/page.tsx — Server component with dynamic
    generateMetadata

What was tested

  • Component renders skeleton on initial load
  • Sort change resets and refetches posts
  • Infinite scroll sentinel triggers loadMore
  • Error and empty states display correctly

Notes

  • Uses existing apiClient from @/lib/api — no new dependencies
  • Follows project conventions: Tailwind CSS, lucide-react icons, dark mode
    support

Closes #527

- Add Topic and TopicPost types to socialUtils
- Add useTopicFeed hook with pagination, sort, and infinite scroll
- Add TopicFeed component with skeleton, empty, and error states
- Add /topics/[slug] page with metadata generation
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@Faromzy 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! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit fa7b4a9 into rinafcode:main May 28, 2026
1 of 4 checks passed
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.

documentation Topic Feed : UI/UX Enhancement

2 participants