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

Patch for Search Filtering Feature #237

Merged
merged 2 commits into from
Apr 7, 2024

Conversation

hy2k
Copy link
Contributor

@hy2k hy2k commented Jan 25, 2024

Problem

This PR is a continuation of the work done in PR #231. It aims to address the incomplete fix I implemented in my previous PR.

The problem addressed by this PR pertains to the handling of 'story' nodes in our component tree. In the current implementation, 'story' nodes, which inherently do not have any children, are incorrectly subjected to a descendants check. This results in the isEmpty flag always being set to true for 'Story' nodes.

Solution

The main changes in this PR include:

  • Refactoring the search filtering logic into a separate module.
  • Adding unit tests

While the changes introduced in this PR could have been implemented within the existing component, I chose to refactor them into a separate module, so it's easier to test.

Checklist

  • Ran ./bin/test.sh locally
  • Ran ./bin/analyze.sh locally

@vocksel
Copy link
Collaborator

vocksel commented Apr 7, 2024

Thanks for submitting a PR for this, and for the test cases! All looks good to me, just made one quick change to match the variable name in the spec file to the function name

@vocksel vocksel merged commit ba1764f into flipbook-labs:main Apr 7, 2024
5 checks passed
@hy2k hy2k deleted the fix-story-filter branch April 8, 2024 08:34
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