c-cube / printbox

print nested boxes, lists, arrays, tables in several formats
https://c-cube.github.io/printbox/
BSD 2-Clause "Simplified" License
77 stars 10 forks source link

Martin/alt uni box borders #19

Closed TypeTheory closed 3 years ago

TypeTheory commented 3 years ago

Borders unicodes for prettier boxes and trees. Removed printbox-unicode and included the unicode length function in printbox plus the dependencies on uutf and uucp. Maybe the old look needs to be preserved at least as an option?

c-cube commented 3 years ago

ah, small change for 4.03 would be to use Map.find and an exception handler in match.

TypeTheory commented 3 years ago

I am happy you like how everything looks! :)

I guess you can merge it as it is and add the new package printbox-text with the new dependencies in a new commit - I haven't thought much about how you like to structure the packages and their dependencies. Or I can just resubmit this pull request to be merged into another branch on top of which you can put the new commit with the packages and then merge it into master when you are happy with it. That way there won't be anything "not ok" in master for some period of time.

Another thing I noticed is that when README.md is displayed in github things look not so great. Basically README.md is displayed with some default css style which has line-height set to something like 1.4. So the vertical lines/borders of the boxes/grids/trees don't connect. This can be fixed if the README.md is displayed through github pages where the css style can be adjusted.

TypeTheory commented 3 years ago

ah, small change for 4.03 would be to use Map.find and an exception handler in match.

Yeap, didn't notice that as I am using 4.12. I can change it to Map.find.

TypeTheory commented 3 years ago

Also another thing I want to mention is that the trees look different in the sense that before there was a space after "+-" in the nodes. For example: +- node is now └─node I removed that space - I kind of liked it better that way but it is very easy to add it back in if you think it looks better with the space.

c-cube commented 3 years ago

I did the update I talked about on master, take a look :)

TypeTheory commented 3 years ago

I did the update I talked about on master, take a look :)

Looks good. :) You just need to add an opam file for printbox-text package (and move the uutf and uucp dependencies to it)?