Skip to content

Rifbid Collaborators Component

Overview

The RifbidCollaborate component is the main interface for managing and exploring collaborators in the RifBid application. It integrates search, filter, and pagination features, allowing users to discover collaborators by industry, location, and semantic search.


Key Features

  1. Semantic Search:
    • Allows users to search for collaborators using semantic keywords.
  2. Filter Options:
    • Enables filtering by industry and location.
  3. Pagination:
    • Supports navigation across multiple pages of collaborators.
  4. Live Count:
    • Displays the total number of online collaborators dynamically.
  5. Reset and Toggle Filters:
    • Offers the ability to reset or toggle filter visibility.

Component Structure

Subcomponents

ComponentDescription
SupplierSemanticSearchBarHandles semantic search input and actions.
CollaboratorSearchFiltersProvides filtering options for industry and location.
AllCollaboratorsDisplays the list of collaborators based on applied filters and search.

State Variables

State VariableTypeDescription
semanticSearchstringHolds the semantic search query.
industrystringStores the selected industry filter.
countrystringStores the selected location filter.
showFiltersbooleanToggles the visibility of the filter panel.
pageNumbernumberTracks the current page number for pagination.
totalCollaboratorsnumberDisplays the total number of collaborators available.

Props for Subcomponents

CollaboratorSearchFilters

Prop NameTypeDescription
setIndustry(string) => voidCallback to set the selected industry filter.
setCountry(string) => voidCallback to set the selected country filter.
selectedIndustrystringThe currently selected industry filter.
selectedCountrystringThe currently selected country filter.
resetFilters() => voidCallback to reset all applied filters.
showFiltersbooleanDetermines the visibility of the filter panel.
toggleFilters() => voidCallback to toggle filter panel visibility.

Behavior

  • The SupplierSemanticSearchBar updates the semanticSearch state and triggers the collaborator list update.

Filters

  • Filters can be applied or reset using the CollaboratorSearchFilters component.
  • Filters include:
    • Industry: Dropdown menu of industry categories.
    • Location: Dropdown menu of countries and regions.

Pagination

  • Managed via the AllCollaborators component.
  • Updates pageNumber and dynamically fetches results for the current page.

Reset Filters

  • Resets all filters and sets the semanticSearch and pageNumber back to their default states.

CollaboratorSearchFilters Component Documentation

Overview

The CollaboratorSearchFilters component provides filter options to narrow down the list of collaborators by industry and location.


Key Features

Industry Filter: Dropdown menu to select an industry.

**Location Filter:**Dropdown menu with country and region options.

Reset Filters: Clears all applied filters with a single button.

Responsive Design: Filters are shown in a sidebar for larger screens and in an overlay for smaller screens.


Props

Prop NameTypeDescription
setIndustry(string) => voidCallback to set the selected industry filter.
setCountry(string) => voidCallback to set the selected country filter.
selectedIndustrystringThe currently selected industry filter.
selectedCountrystringThe currently selected country filter.
resetFilters() => voidCallback to reset all applied filters.
showFiltersbooleanDetermines the visibility of the filter panel.
toggleFilters() => voidCallback to toggle filter panel visibility.

Industry

  • Populated from the categories list.

Location

  • Dropdown contains pre-defined country and region options grouped by geographic regions (e.g., Caribbean, North America, Latin America).

Conclusion

The RifbidCollaborate and CollaboratorSearchFilters components work together to provide a robust interface for discovering and managing collaborators. They integrate search, filter, and pagination functionalities with responsive design to enhance the user experience.