42669cd160
The motivation for this change is to make it easier to access the selected Node's `name` prop for #576, in which we plan to show a Card displaying summary stats for the selected node. With only the `topLevelFilter` available, it's trickier than it needs to be to find out a node type's `name`. Test Plan: * Yarn test passes. * Visual/Manual inspection of table doesn't surface any issues. * Updated `it("filter defaults to defaultNodeFilter if available")` to `it("selectedNodeType defaults to defaultNodeType if available")`. * Verified that the above new test is failable in several ways by mangling the tests to test for the wrong node type and mangling the code to set the wrong node type. * Since we factored out 'topLevelFilter' and 'defaultNodeFilter', running `git grep -i topLevelFilter` and `git grep -i defaultNodeFilter` turns up empty, just to make sure those terms aren't hanging around to confuse anybody in the future. * I don't think changing the `prop` parameter warrants any additional tests, as the current tests verify that the prop is passed in correctly. This was at @decentralion's suggestion, following the Contributing Guideline's Kent Beck quote of making the easy change to make the change we were originally after (#576) easier. 🙌 |
||
---|---|---|
.. | ||
analysis | ||
assets/logo | ||
cli | ||
core | ||
explorer | ||
graphql | ||
homepage | ||
plugins | ||
tools | ||
util | ||
webutil |