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

Inconsistent behavior of "hideEmptyMembersBox" option #6192

Open
vdusek opened this issue Jan 15, 2025 · 0 comments
Open

Inconsistent behavior of "hideEmptyMembersBox" option #6192

vdusek opened this issue Jan 15, 2025 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@vdusek
Copy link

vdusek commented Jan 15, 2025

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.

@vdusek vdusek added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Jan 15, 2025
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 Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant