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

Block diagram group title should be rendered above of inner blocks #5423

Open
rusinikita opened this issue Mar 27, 2024 · 3 comments
Open

Block diagram group title should be rendered above of inner blocks #5423

rusinikita opened this issue Mar 27, 2024 · 3 comments
Labels
Area: Development Contributor needed Graph: Block Status: Approved Is ready to be worked on Type: Bug / Error Something isn't working or is incorrect

Comments

@rusinikita
Copy link

rusinikita commented Mar 27, 2024

Description

I do application components diagram. Now it looks like this.

I use arrows because I can't use block titles.

Steps to reproduce

I try to use block group titles with this correct syntax (no errors)

First block title invisible because it placed in center.
Second block title visible because it has space in center.

Screenshots

No response

Code Sample

block-beta
    columns 1

    block:ui("UI Title"):1
        Component1 Component2 Component3
    end

    block:uc("UC Title"):1
        UseCase1 space UseCase2
    end

Setup

  • Mermaid version: latest live editor
  • Browser and Version: Chrome

Suggested Solutions

If block group has title then it should be rendered with top padding (for inner blocks) and title inside this top padding.

Additional Context

I can start working on PR if no one has plans for that

@rusinikita rusinikita added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Mar 27, 2024
@sanjeevmurmu
Copy link

Hello, Have you found the cause of this problem in the codebase

@YesYouKenSpace
Copy link

YesYouKenSpace commented Jun 7, 2024

Hello I encountered this issue too. This is my workaround.

Code sample.

block-beta
    block:uc:1
        columns 3
        uct("UC Title"):3
        UseCase1 Usecase2 UseCase3
        space:3
        UseCase4 Usecase5 UseCase6
    end

class uct BT
classDef BT stroke:transparent,fill:transparent
block-beta
    block:uc:1
        columns 3
        uct("UC Title"):3
        UseCase1 Usecase2 UseCase3
        space:3
        UseCase4 Usecase5 UseCase6
    end

class uct BT
classDef BT stroke:transparent,fill:transparent
Loading

@nirname nirname added Status: Approved Is ready to be worked on Area: Development Graph: Block Contributor needed and removed Status: Triage Needs to be verified, categorized, etc labels Jun 19, 2024
@unawarez
Copy link

FWIW this issue is also the only place I could find the block:asdf("ASDF") syntax is even possible. I was pretty sure this could be done but couldn't remember how. +1 for fixing the layout issue. I think I would use block diagrams for many more things if they better supported nested blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Development Contributor needed Graph: Block Status: Approved Is ready to be worked on Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

5 participants