[feature] Call graph: Subgraph hiding (`HoleNode`)
- Dominant language
- JavaScript
- Stars
- 171
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
* [x] Add a configurable filter predicate that determine what kind of context gets hidden (aka filtered).
* [x] Add new `HoleNode` that serves as a group for "hidden" nodes. All filtered contexts that are directly connected (i.e. all siblings and parents/children, recursively) get grouped into one such node.
* → see new `CallGraphNodes.floodHole` algorithm
* [x] fix `getComponents('ContextNode')`
* [x] fix `floodHole` algo: non-root holes contain root contexts
* [x] fix: allow extending of existing root holes (rather than creating new ones that also contain the old ones)
* [x] Make the new `HoleNode` a bit prettier
* [x] Add button to toolbar to allow customizing the context filters
* [x] V3: add one button per filter option in a dropdown
* [x] each button renders as "activated" if it does not equal its default
* default is empty, except for `packageWhitelist` which is `.*`)
* [x] when clicked: 1. show quickpick of history (sorted by `lastUsed`), 2. plus one entry in the beginning which is ``
* [x] when (1) is selected, move it (don't duplicate it) in the history array
* [x] when (2) is selected, show `InputBox` to allow user producing a new filter
* [x] Store filter history in memento
* [x] Expose memento `get`/`set` in graph externals
* [ ] test w/ `react-tic-tac-toe` → it has almost only library nodes
# ACG subgraph hiding
* [ ] Also add subgraph hiding to `ACG`
* [ ] re-purpose the `floodHole` algorithm, but traverse `AsyncEdge`s instead of in-root contexts (can we generalize the original, without degrading performance?)
* [ ] When adding a node to a `HoleNode`, we need to re-determine FORK or CHAIN:
* 
* In the above example, we want to add 3 green nodes to the blue `HoleNode` (spanning the blue subgraph).
* → `1` is CHAINed while `2` and `3` are FORKed from the `HoleNode`
Contributor guide
Assessment
This issue has not been assessed yet.