fix(docz-core): always use custom prop filter if it's provided (#1403) #1415
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes #1403
I'm curious how y'all feel about considering this a "breaking change" vs just a "fix".
Technically the new behavior is different from the old behavior and folks who are using a custom propFilter might end up seeing more props after this is merged.
Here's a summary:
Old behavior (without a custom prop filter):
parent
are includedparent
are includedNew behavior (without a custom prop filter):
Old behavior (with custom prop filter):
parent
are includedparent
are includeparent
and 2)parent
is a node_module - will be run through the custom prop filterThis behavior seemed like a bug to me. The custom prop filter is almost always ignored and is only useful for white-listing some props that come from node_modules
New behavior (with custom prop filter):
So, if folks were actually relying on the old "buggy" behavior of propFilter just being a node_modules whitelist, they will need to add some logic to their propFilter in order to re-create the old behavior.
Overall I believe that this new API is the right API, and it's just a matter of how to approach the change with the community, which I'll leave up to the maintainers