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

[feature] Call graph: Subgraph hiding (HoleNode) #681

Open
14 of 18 tasks
Domiii opened this issue Feb 20, 2022 · 1 comment
Open
14 of 18 tasks

[feature] Call graph: Subgraph hiding (HoleNode) #681

Domiii opened this issue Feb 20, 2022 · 1 comment
Assignees
Labels
a-lot-of-work This issue requires a lot of work, and is by no means easily taken care of call-graph Related to Call Graph rendering enhancement New feature or request

Comments

@Domiii
Copy link
Owner

Domiii commented Feb 20, 2022

  • Add a configurable filter predicate that determine what kind of context gets hidden (aka filtered).
  • 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
  • fix getComponents('ContextNode')
  • fix floodHole algo: non-root holes contain root contexts
  • fix: allow extending of existing root holes (rather than creating new ones that also contain the old ones)
  • Make the new HoleNode a bit prettier
  • Add button to toolbar to allow customizing the context filters
    • V3: add one button per filter option in a dropdown
      • each button renders as "activated" if it does not equal its default
        • default is empty, except for packageWhitelist which is .*)
      • when clicked: 1. show quickpick of history (sorted by lastUsed), 2. plus one entry in the beginning which is <add new>
      • when (1) is selected, move it (don't duplicate it) in the history array
      • when (2) is selected, show InputBox to allow user producing a new filter
  • Store filter history in memento
    • 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 AsyncEdges 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:
    • image
    • 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
@Domiii Domiii added enhancement New feature or request priority call-graph Related to Call Graph rendering labels Feb 20, 2022
@Domiii Domiii changed the title Call graph: Add new togglable option to hide nodes Call graph: Add new togglable option to hide library nodes + subtrees Feb 20, 2022
@Domiii Domiii removed the priority label Mar 2, 2022
@Domiii Domiii self-assigned this Mar 4, 2022
@Domiii
Copy link
Owner Author

Domiii commented Mar 4, 2022

First results (graph-filter-test1.js):

image
image

@Domiii Domiii changed the title Call graph: Add new togglable option to hide library nodes + subtrees [feature] Call graph: Subgraph hiding (HoleNode) Mar 4, 2022
Domiii added a commit that referenced this issue Mar 6, 2022
Domiii added a commit that referenced this issue Mar 6, 2022
Domiii added a commit that referenced this issue Mar 6, 2022
@Domiii Domiii added a-lot-of-work This issue requires a lot of work, and is by no means easily taken care of priority labels Mar 6, 2022
@Domiii Domiii removed the priority label Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-lot-of-work This issue requires a lot of work, and is by no means easily taken care of call-graph Related to Call Graph rendering enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants