Skip to content

Inconsistent behavior of "hideEmptyMembersBox" option #6192

Open
@vdusek

Description

@vdusek

Description

When using the Mermaid configuration hideEmptyMembersBox: true, the behavior is inconsistent:

  • Expected behavior: Empty rows should not render in the diagram, regardless of whether the class contains only attributes, only methods, or neither.
  • Actual behavior: Rows are hidden only when the class contains neither attributes nor methods. If a class has only attributes or only methods, an empty row is rendered, which is unexpected.

Steps to reproduce

Chart code:

---
config:
  class:
    hideEmptyMembersBox: true
---

classDiagram

class Class1 {
    + a
    + foo()
}

class Class2 {
    + a
}

class Class3 {
    + foo()
}

class Class4

Renderes into:

Image

As I said, I would expect the empty rows not to be rendered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions