terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
16.61k stars 417 forks source link

bugs related package shape (name, tooltip & link icons, inner container positioning, edge crossing leaf node) #1276

Open bbarath32 opened 1 year ago

bbarath32 commented 1 year ago

bug1: with ELK engine: package_name unreadable and covered partly or fully with other container objects, when an inner container has one or many connection(s) bug2: edges should not be go across leaf (botton) nodes, like with FUNCTION_2

with Dagre engine: package_name is over (far way from) the shape object bug3: and inner containers are on the border: half part outside, half part inside of the package shape, these containers should be positioned lower

bug4: icons of links and tooltips are also outside package's shape both with ELK and Dagre engine proposed solution: nr_1: there should be some space between package_name and inner objects nr_2: package_name should be in the top left corner/tab of the package shape - tab size/width should be also aligned with the text

d2 d2 (1)

https://play.d2lang.com/?l=&script=bFTBbhoxFLz7K0bikEQiQSE9-VApoVRFTQEBOa-8u4_dLcZe2aYURf336nmXsBCOfs-eNzMeu4d0VzxK0cO-CiXGrz9BpqgMSdQq26iCEqO2hJ1xpHKVaoIyOTL7hxzlqJUL-gDrsN5pfWhAbCjJIeNLqQw52PQ3ZcH3sS_JQBlUxpxtKJWHNcQwW2UO3DFN6G79nRCR41CC8oI8fGl3OoexASmhsFCZs95Dk1rjNrUhWHMHY3PyfehqQw2p72_T0WoymyZD0cNR7jdVOLouuPJgjbhdK4e9OmDt7PYOoSTEKLSqGnJPMrpyoctDOYI18VDzVCRKpdfRNthd8FVO_U6pMlyBXccjLZ9mXp9LnrrorRMpoba-Yrsoh7Z7cqLX8PoiwS_CMyJn30eabUAaekp7e6RynHjjW42pDeUpGHy265jooVc7W1tPObzVO6bAUTIueZTM11GHpLdbgq9VRkgp7InMueMnB9vANEjDi4s5AVaNs8HW4MeNzDpDbhBUetVB3INb_K8MYvY7UNEFpauCLYyCIzL9DULUm0Ki3hQJ15M2-Q2Xd4EG-4OjwNFe2QjmP9TV7IxAvAOJmzKEWg4GNwL49TyZCpzS-dhdDAUwW_0YL5L528vrZJTMF7ORAOaLcTKfjcbLpQBe3paT6Xi5jM2mNJ8tV50lz8D9184xiUxp3Wldgnza0IX83FzMRpH5WWF4WXjqFDoa_wmRpxK5CipV_szU7KAr_roEsHp-eR3z3pqct0bi_Wh8XH80GLzeFA88qCV63vhkaLtLXG3yqTx9iNMlv09yIVIV_wMAAP__&layout=dagre&theme=8&sketch=0&

alixander commented 1 year ago

interesting. the tooltip icon one affects other shapes too. i've separated that out into another issue: https://github.com/terrastruct/d2/issues/1391

we'll keep this one limited to the others