Skip to content

Comments

Added Search bar#24

Merged
technologic-technologic merged 1 commit intogen-aifrom
10-search-bar-component
Oct 8, 2025
Merged

Added Search bar#24
technologic-technologic merged 1 commit intogen-aifrom
10-search-bar-component

Conversation

@technologic-technologic
Copy link
Owner

Created Input search bar -> SearchByBar.tsx.
Simplified the functionality of SearchByBar.tsx creating InputSearch.tsx & CascaderSearch.tsx. Modified NewProductButton.tsx style to match the style of the new search bar, as these components share the same space. Fixed undesired behavior on the SearchContext.tsx by allowing null values Updated EncoraContent.tsx to include the new Search Bar. Testing is pending.
More information below.

Created Input search bar -> SearchByBar.tsx.
Simplified the functionality of SearchByBar.tsx creating InputSearch.tsx & CascaderSearch.tsx.
Modified NewProductButton.tsx style to match the style of the new search bar, as these components share the same space.
Fixed undesired behavior on the SearchContext.tsx by allowing null values
Updated EncoraContent.tsx to include the new Search Bar.
Testing is pending

Signed-off-by: Leonardo Trevizo <leonardo.trevizo@encora.com>
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

PR Summary

WHAT Changed

  • New Components Added:
    • SearchByComponent: A new search bar component that allows filtering by name, category, and availability.
    • InputSearch: A reusable input component for searching by name and category.
    • CascaderSearch: A component for filtering by stock availability using a cascader.
  • Layout Adjustments:
    • The layout of the HomePageContent component was modified to include the new search bar alongside the "Add New Product" button.
  • Context Updates:
    • The SearchContext was updated to allow name and category to be null, enabling better handling of empty search parameters.

WHY It Matters

  • Enhanced User Experience: The addition of a search bar improves the usability of the inventory manager, allowing users to filter products more effectively.
  • Code Reusability: The new input components promote reusability and maintainability in the codebase.

RISKS

  • Potential UI Issues: Changes in layout and new components may introduce unexpected UI behavior or styling issues.
  • State Management: Modifications to the context state management could lead to bugs if not properly handled.

TESTS to Add

  • Unit tests for the new SearchByComponent, InputSearch, and CascaderSearch components to ensure they function correctly.
  • Integration tests for the HomePageContent to verify that the new layout and components work together as expected.

BREAKING CHANGES

  • The SearchContext now allows name and category to be null, which may require updates in components that consume this context.

Changed File Paths

  • inventory-manager/src/components/EncoraContent.tsx
  • inventory-manager/src/components/segment1-search_product/SearchByBar.tsx
  • inventory-manager/src/components/segment1-search_product/input-bars/CascaderSearch.tsx
  • inventory-manager/src/components/segment1-search_product/input-bars/InputSearch.tsx
  • inventory-manager/src/components/segment2-new_product/NewProductButton.tsx
  • inventory-manager/src/context/SearchContext.tsx

@technologic-technologic technologic-technologic added the feature Work in progress. Adding new features. label Oct 8, 2025
@technologic-technologic technologic-technologic merged commit bc89713 into gen-ai Oct 8, 2025
1 check passed
@technologic-technologic technologic-technologic linked an issue Oct 8, 2025 that may be closed by this pull request
@technologic-technologic technologic-technologic deleted the 10-search-bar-component branch October 12, 2025 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Work in progress. Adding new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter by availability Filter by category Search by name (or part of it) Search Bar Component

1 participant