Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web/search page subfroum page #502

Merged
merged 30 commits into from
Dec 13, 2024
Merged

Web/search page subfroum page #502

merged 30 commits into from
Dec 13, 2024

Conversation

TheRealLowyer
Copy link
Contributor

Search Page Enhancements

  1. Dynamic Category Search:

    • Integrated backend search APIs (/search/tags, /search/subforums, /search/posts, /search/users, and /search/asset).
    • Added dynamic rendering based on selected category (tags, subforums, posts, users, popular).
    • Processed and displayed fetched data for each category:
      • Tags: Simple display of tag names.
      • Subforums: Linked to individual subforum pages.
      • Posts: Directly passed post objects to PostHeader for rendering.
      • Users: Displayed user avatars, names, and follower counts.
      • Assets: Added AssetCard for a clean and visually engaging asset display.
    • Asset Search:
      • Integrated search results for assets into the popular category.
      • Linked asset cards to /asset/:id routes.
  2. Improved Styling:

    • Introduced modular CSS to enhance the UI/UX for search results.
    • Customized the appearance of tags, subforums, users, and assets with distinct styles.
    • Ensured mobile responsiveness and consistent layout.
  3. Loading and Error Handling:

    • Added loading indicators while fetching data.
    • Displayed error messages when API calls fail or no results are found.

Subforum Page Enhancements

  1. Dynamic Subforum Rendering:

    • Replaced static fetch logic with a service function (getSubforum) to fetch subforum data from the /subforum/:id endpoint.
    • Displayed subforum details:
      • Name
      • Description
      • Post count
      • Follower count
  2. Follow/Unfollow Feature:

    • Implemented dynamic Follow and Unfollow buttons:
      • Only visible to authenticated users.
      • Updates UI and backend state upon click.
      • Backend integration with /subforum/follow and /subforum/unfollow endpoints.
    • Added smooth state management for isFollowing to reflect real-time changes.
  3. Post Feed Integration:

    • Used the Feed component to display posts within a subforum.
    • Passed posts fetched from the subforum API directly to the Feed component for rendering.
  4. Styling Improvements:

    • Styled subforum headers with the theme color (#5d5fef).
    • Styled Follow and Unfollow buttons to align with the theme and provide hover effects.
    • Enhanced responsiveness and consistency with other pages.

General Enhancements

  • Refactored API calls into modular service functions for better reusability and maintainability.
  • Improved error handling, loading states, and dynamic data rendering across both pages.
  • Enhanced code readability and structure to ensure scalability.

Summary

This PR significantly improves the Search and Subforum pages by adding backend integrations, dynamic rendering, and enhanced styling. These changes provide a more robust and user-friendly experience.

OmerFarukBOUN and others added 28 commits December 10, 2024 21:45
… and PostController for user and subforum integration
…ostService and SubforumService for post retrieval, and improve FollowSubforumRepository methods
…ntroller for enhanced subforum data retrieval
…lity, and add search functionality in repositories
@TheRealLowyer TheRealLowyer added Enhancement New feature or request Priority: High Requires taking action ASAP labels Dec 12, 2024
@OguzTNCR
Copy link
Contributor

Well done.

@OguzTNCR OguzTNCR merged commit 5c6a5ee into main Dec 13, 2024
This was linked to issues Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Frontend Priority: High Requires taking action ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subforum Page Enhancements Search Page Enhancements
3 participants