Skip to content

Conversation

@chadbrokaw
Copy link
Collaborator

This pull request removes the use of the createExclusionFilters utility and the associated exclusion filters from both the BrowseResultsPage and SearchResultsPage components. Instead, only category-based filtering is applied in BrowseResultsPage, and no exclusion filters are used in SearchResultsPage.

Removal of exclusion filters

  • Removed the import and usage of createExclusionFilters from both BrowseResultsPage.tsx and SearchResultsPage.tsx, eliminating the application of exclusion filters in search queries. [1] [2] [3] [4] [5]

Filtering logic update

  • Updated the Configure component in BrowseResultsPage.tsx to use only category-based filters (categories:'${algoliaCategoryName}') instead of combining with exclusion filters.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes exclusion filters from search and browse functionality by eliminating the createExclusionFilters utility usage. The changes simplify the filtering logic to use only category-based filtering in browse results, while search results now have no additional filters applied.

Key Changes:

  • Removed createExclusionFilters import and usage from both search and browse pages
  • Simplified BrowseResultsPage to use only category filters instead of combined category and exclusion filters
  • Removed filter parameters from Configure component in SearchResultsPage

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
app/pages/SearchResultsPage/SearchResultsPage.tsx Removed exclusion filters from search configuration, eliminating all filter parameters
app/pages/BrowseResultsPage/BrowseResultsPage.tsx Simplified filtering to use only category-based filters, removing exclusion filter logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

indexUiState: { query = null },
} = useInstantSearch();

// Apply Our415 category filtering rules
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

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

The comment 'Apply Our415 category filtering rules' is now misleading since all filtering logic has been removed. This comment should either be removed or updated to reflect that no filtering is currently applied.

Suggested change
// Apply Our415 category filtering rules

Copilot uses AI. Check for mistakes.
? escapeApostrophes(parentCategory.name)
: null;

// Apply Our415 category filtering rules
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

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

The comment 'Apply Our415 category filtering rules' no longer accurately describes the code below it, as the exclusion filters and combined filter variables have been removed. Consider updating this comment to clarify that only category filtering is applied.

Suggested change
// Apply Our415 category filtering rules
// Apply Our415 category filtering

Copilot uses AI. Check for mistakes.
@chadbrokaw chadbrokaw merged commit 009168c into main Oct 20, 2025
2 checks passed
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