lightningrodlabs / rea-playspace

Holochain app to play with REA accounting
31 stars 7 forks source link

If resource is known, default info into event #193

Open fosterlynn opened 1 year ago

fosterlynn commented 1 year ago

This is separated out from #180 first comment.

Once we know that a resource-y node is an actual EconomicResource, we can default that information in an event that is created on a flow line from that resource or to that resource.

For example, in this screenshot of a transfer drawn from a node that is actually a resource already, that it could know the provider agent and the provider resource, but it is not defaulted in. It would be helpful to add that too. Screenshot from 2022-10-29 13-06-16

fosterlynn commented 1 year ago

It now knows the resource when the line is drawn from a known resource, and gives this as the choice on the dropdown for provider resource!

Any reason it shouldn't just assume that resource, and not allow selection or no selection of it?

adaburrows commented 1 year ago

Actually, it doesn't have that much information yet without traversing the graph. What we can deduce is if there's a resource that matches the resourceConformsTo and primaryAccountable. If there's one and only one of those, we can default to it, otherwise we can just show the resources that are applicable (which should happen since #178).

adaburrows commented 1 year ago

We can create a separate milestone for adding my graphlib into the mix along with this particular revision to the feature (I really just need to add some traversal code to the library).

fosterlynn commented 1 year ago

We can create a separate milestone for adding my graphlib into the mix along with this particular revision to the feature (I really just need to add some traversal code to the library).

That's OK with me! There seem to be a set of features that need that.