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

Implemented: logic to use filters modal for selecting or removing a filter and removed faceting logic(#29wm19n) #50

Merged
merged 22 commits into from
May 6, 2022

Conversation

ymaheshwari1
Copy link
Contributor

@ymaheshwari1 ymaheshwari1 commented May 6, 2022

  • Bind the search filter modal with the add button on the search product page
  • Made the options in the modal dynamic on the basis of search query in the modal
  • Removed logic to get the facets from solr-query on initial page load
  • Created state for storing the query and action to update the query
  • Created state for storing the filters and action, mutations for updating the filters
  • Improved logic to define infinite scroll.
  • Implemented functionality to clear filters and reset filters

@ymaheshwari1 ymaheshwari1 changed the title Implemented: logic to use filters modal for selecting or removing a filter and removed faceting logic(#29wm19n)) Implemented: logic to use filters modal for selecting or removing a filter and removed faceting logic(#29wm19n) May 6, 2022
dispatch('updateQuery')
},

async updateQuery({ commit, dispatch, state }, payload) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could implement a method to prepare query and have only 2 actions update filter & get products. Could be a separate task

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure Sir, will handle this in another PR, created a ticket for the same.

// done this as for now not creating a separate mutation for this or updating current mutation logic
// as per this functionality
// TODO: update this logic to simply update the filters state
Object.keys(appliedFilters).map((id: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could have a single mutation to reset all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defined a single mutation to reset the filter.

totalSKUs: this.products.total.variant
}
})

saveThresholdModal.present();
},
async openSearchModal(label: string, facetToSelect: string, searchfield: string, type: string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
async openSearchModal(label: string, facetToSelect: string, searchfield: string, type: string) {
async searchFilter(label: string, facetToSelect: string, searchfield: string, type: string) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done Sir

@adityasharma7 adityasharma7 merged commit a6b846f into hotwax:main May 6, 2022
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