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

feat(search): global search + integration with backend #132

Merged
merged 5 commits into from
Dec 18, 2024

Conversation

amir-kedis
Copy link
Member

New Features and Enhancements:

  • New Search Tab Component: Added a new SearchTab component to handle different search results based on the selected tab. This component uses the useSearch hook to fetch data and display results accordingly.
  • Search API Integration: Implemented a new Search function in searchAPI.ts to handle search requests and fetch results from the backend.

Refactoring and Code Simplification:

  • Refactored SearchBar Component: Moved the findAllMatchIndices function inside the useEffect hook to simplify the code and ensure it runs only when necessary. [1] [2]
  • Removed MessagesTab Component: Deleted the MessagesTab component and replaced its usage with the new SearchTab component in the tabs-components-map.tsx file. [1] [2]

Styling and UI Improvements:

  • Updated NoResultsFound Component: Modified the NoResultsFound component to accept message and subMessage as props, allowing for more flexible messaging.
  • Avatar Component Adjustments: Removed the size="large" property from Avatar components in various result items to standardize the avatar size. [1] [2] [3]

Utility Functions:

  • Search Tabs Helpers: Added utility functions in searchTabsHelpers.tsx to assist with rendering search results and checking for the presence of results.

These changes collectively enhance the search functionality, improve code maintainability, and provide a better user experience.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
4.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link
Member

@AhmedHamdiy AhmedHamdiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wala3 ya za3eem

@amir-kedis amir-kedis merged commit 84e839b into dev Dec 18, 2024
1 check failed
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.

2 participants