chalk-diagrams / chalk

A declarative drawing API in Python
MIT License
282 stars 13 forks source link

Subdiagram improvements #116

Closed danoneata closed 2 years ago

danoneata commented 2 years ago

This PR addresses #113, but it's still work in progress. I've started by fixing the example from that issue and by following the plan laid out by Sasha. The next steps are to add the extra functionality.

TODO

Deferred sub-tasks:

srush commented 2 years ago

I agree withName is a bit too aggressive for python. It looks like there is also a with_names function though that might be better.

danoneata commented 2 years ago

It looks like there is also a with_names function though that might be better.

Yes, you are right, with_names looks more appropriate for us. I've replaced with_name with with_names and added some examples (translated from Haskell) in the documentation.

I think I'll move the task of adding labels to arrows to a separate issue (and PR) since it appears a bit more involved at first sight, especially if we want it to work on arrows with arbitrary trails (shafts).