moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

links to calls in chart #8

Closed MichaelChirico closed 4 years ago

MichaelChirico commented 4 years ago

motivating example:

view_flow(median)

Screenshot 2019-10-21 at 12 05 15 PM

Would be great we could click the UseMethod('median') box and traverse the call more interactively. A bit tough to do statically because obv we don't have any input to median so we don't know the method, but there could be a landing page to methods('median') first.

moodymudskipper commented 4 years ago

I agree, that would be awesome. Expanding a node right in the function would be great too.

Do you think this is technically possible without writing an adhoc flowchart library? I don't know much js and nomnoml is static. Maybe there's some other library I could use.

MichaelChirico commented 4 years ago

Above my weightclass sadly :( It's definitely possible, but I don't know with what framework/libraries/how much refactoring effort it would take

moodymudskipper commented 4 years ago

Right now we can already see the function by calling :

flow_run(median(1:3))

This detects the appropriate method (stats::median.default here) and outlines the path taken by the execution

image

It's in progress, not much tested and doesn't support loops yet.

I think this answers the main issue.

Now for the wider point of interactivity and design, the package is based on nomlnoml and limited by its capacities but nomnoml is really the last step and any new js technology ported to R could be used quite easily. I chose nomnoml just because other available technologies would forbid some special characters with no way of escaping them, which is problematic to write code in these blocks.

So I'm closing this for now, and ready to reopen whenever a package of clickable flow diagrams comes up.

github-actions[bot] commented 2 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.