flipbook-labs / flipbook

Storybook plugin for Roblox UI
https://flipbook-labs.github.io/flipbook/
MIT License
95 stars 7 forks source link

Patch for Search Filtering Feature #237

Closed hy2k closed 6 months ago

hy2k commented 9 months ago

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:

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

vocksel commented 6 months ago

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