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 functions #436

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Web/search functions #436

merged 3 commits into from
Nov 25, 2024

Conversation

TheRealLowyer
Copy link
Contributor

Pull Request Description: Enhancements to Search Functionality


Summary

This pull request introduces significant enhancements to the Search functionality. It implements the following features:

  • Dynamic fetching and rendering of subforums and posts.
  • Filtering of content to exclude irrelevant types (image and chart) and include only text and tag types.
  • Improved error handling and graceful fallbacks for missing or invalid data.
  • Ensured proper text wrapping and layout styling for long descriptions.

Details of Implementation

  1. Dynamic Data Fetching:

    • Subforums are fetched from the endpoint:
      http://35.246.188.121:8080/api/post/get-subforums/non-recursive
      
    • Posts associated with subforums are fetched dynamically using their postId from:
      http://35.246.188.121:8080/api/post/get-post?postId={postId}
      
  2. Content Filtering:

    • Post content is filtered to include only items with type: 'text' or type: 'tag'.
    • image and chart types are excluded to focus on relevant textual and tag information.
  3. Search and Rendering:

    • Subforums and posts are searchable by their name, title, or description.
    • Posts display:
      • Title: Derived from the post.title or defaults to "Untitled Post."
      • Description: Constructed by concatenating filtered content values.
      • Author: Displayed as post.author.username or defaults to "Unknown."
  4. Styling Enhancements:

    • Ensured that long text wraps correctly within containers using:
      overflow-wrap: break-word;
      word-wrap: break-word;
      word-break: break-word;
    • Added padding, margin, and shadows for a visually appealing layout.
  5. Error Handling:

    • Skipped invalid or incomplete posts during the fetch process.
    • Default fallback values are applied for missing fields to avoid crashes.

@TheRealLowyer TheRealLowyer added Priority: High Requires taking action ASAP Frontend labels Nov 25, 2024
@TheRealLowyer TheRealLowyer added this to the Customer Presentation 2 milestone Nov 25, 2024
@OguzTNCR OguzTNCR merged commit 902c112 into main Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Priority: High Requires taking action ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants