Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested block diagram's dynamic width not worked as expected #5470

Open
Sean10 opened this issue Apr 18, 2024 · 2 comments
Open

nested block diagram's dynamic width not worked as expected #5470

Sean10 opened this issue Apr 18, 2024 · 2 comments
Labels
Status: Triage Needs to be verified, categorized, etc

Comments

@Sean10
Copy link

Sean10 commented Apr 18, 2024

When i use the block diagram, it's normal. But if i add a block which wrapped j and k, It would leave a space after it, it cannot use up of the rest space.

Before adding block which wrapped j and k

block-beta
  columns 3
  a:3
  block:group1:2
    columns 2
    h i 
      j k
  end
  g
  block:group2:3
    %% columns auto (default)
    columns 5
    l m n o p q r
  end

After adding block which wrapped j and k, which is not worked as expected

image

block-beta
  columns 3
  a:3
  block:group1:2
    columns 2
    h i 
    block:group3:2
      columns 2
      j k
    end
  end
  g
  block:group2:3
    %% columns auto (default)
    columns 5
    l m n o p q r
  end

expected result

image

Originally posted by @Sean10 in #5467

@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label Apr 18, 2024
@Sean10 Sean10 changed the title When i use the block diagram, it's normal. But if i add a block which wrapped j and k, It would leave a space after it, it cannot use up of the rest space. nested block diagram's dynamic width not worked as expected Apr 18, 2024
@Sean10
Copy link
Author

Sean10 commented Jul 23, 2024

Finally I found D2 could deal with this nested block diagram well.

Grid Diagrams | D2 Documentation

grid-columns: 2
a
a1
b: {
  c: {
    grid-rows: 2
    d
    e
    f
  }
}

image

@Sean10 Sean10 closed this as completed Jul 23, 2024
@Rojax
Copy link

Rojax commented Jul 23, 2024

I'm having the same problem and suggest re-opening this issue. Just because another tool support this it, does not mean it is not an issue in mermaid.

@Sean10 Sean10 reopened this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc
Projects
None yet
Development

No branches or pull requests

2 participants