terrastruct / d2

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

default triangle arrowhead should also have `filled: false` #1650

Closed alixander closed 8 months ago

alixander commented 9 months ago

we have it for diamond and circle, but triangle unfilled has meaning in uml too

https://d2lang.com/tour/connections/#arrowheads

aakashdeepsil commented 9 months ago

Hi team I want to contribute to this story. I'm very new to open source. I think this looks like a good place to begin. Can I start working on this?

alixander commented 9 months ago

@aakashdeepsil All yours!

Perhaps @Paracelsus-Rose's PR on https://github.com/terrastruct/d2/pull/634 would be a good example starting point. His code adds a new arrowhead, which includes a filled version.

aakashdeepsil commented 9 months ago

I will go through the PR to understand the work well. Then start the work on this issue. Might take me a day to understand the PR well. I will start work from tomorrow.

alixander commented 8 months ago

@gavin-ts can you knock this out?

hinogi commented 8 months ago

I already tried shape: triangle style.filled: false but that didn't work for target arrowhead

PackRuble commented 7 months ago

Trying the v.0.6.2 release and it doesn't seem to work:

A1 -> A2: {
  target-arrowhead.shape: triangle
  style.filled: false
}

B1 -> B2: {
  target-arrowhead.shape: arrow
  style.filled: false
}

C1 -> C2: {
  target-arrowhead.shape: circle
  style.filled: true
}

image

alixander commented 7 months ago

@hinogi @PackRuble

The style pertains to the arrowhead, not the connection.

A1 -> A2: {
  target-arrowhead.shape: triangle
  target-arrowhead.style.filled: false
}

C1 -> C2: {
  target-arrowhead.shape: circle
  target-arrowhead.style.filled: true
}
Screen Shot 2023-12-07 at 4 08 46 AM

https://play.d2lang.com/?script=cjRU0LVTcDSyUqjmUlAoSSxKTy3RTSwqyi_PSE1M0SvOSCxItVIoKcpMzEvPScWqpKQyJ1UvLTMnJzXFSiEtMac4lauWi8sZbLAzAYOTM4uSiTG2pKgUZCogAAD__w%3D%3D&

PackRuble commented 7 months ago

@alixander Thank you very much, I apologize for the inattention. Using target-arrowhead.style.filled helped)