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

Implementation of filters in custom search modal. #1560

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

vivekjain23
Copy link
Contributor

@vivekjain23 vivekjain23 commented May 15, 2024

Description of change

  • Added facet filter on search bar.

Links to any relevant issues

fixes #1531

Type of change

  • Enhancement (a non-breaking change which adds functionality)

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own changes
  • I have made sure that added/changed links still work
  • I have commented my code, particularly in hard-to-understand areas

@vivekjain23 vivekjain23 marked this pull request as ready for review May 17, 2024 11:15
@lucas-tortora lucas-tortora marked this pull request as draft May 17, 2024 11:29
@lucas-tortora lucas-tortora marked this pull request as ready for review May 17, 2024 11:29
Signed-off-by: Vivek Jain <vkj.vivekkumarjain@gmail.com>
Signed-off-by: Vivek Jain <vkj.vivekkumarjain@gmail.com>
Signed-off-by: Vivek Jain <vkj.vivekkumarjain@gmail.com>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems horrible to maintain. Can't we import this from configs or something similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think while updating the filter with instantSearch we can get rid of this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to touch this file?
And please don't remove the commend at the top. It helps us keep track of swizzled versions of Docusaurus components

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was needed to add few styles in the footer since while styling and alinging the filter, footer's position was getting disturbed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did this get removed?

@jlvandenhout
Copy link
Collaborator

Just as a consideration, since we already have to change the search component provided by @docusaurus/theme-search-algolia anyway to support dynamic selection of facets to filter. We could also use the UI components provided by instantsearch, which supports facet filters out of the box. Basically the steps would be to swizzle the SearchBar component, like we already have to do anyway, like described here, build the UI using the Instantsearch components and style it so it matches the rest of the Wiki (which we also need to look at anyway for the rebrand).

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.

Add specific filter for search results in Algolia search
3 participants