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

Remove Members & Methods Box On Class Diagram, If They Are Not Set #3139

Closed
apeacock1991 opened this issue Jun 14, 2022 · 10 comments · Fixed by #5880
Closed

Remove Members & Methods Box On Class Diagram, If They Are Not Set #3139

apeacock1991 opened this issue Jun 14, 2022 · 10 comments · Fixed by #5880

Comments

@apeacock1991
Copy link

Is your feature request related to a problem? Please describe.

I am using the class diagram for a domain model, as after all, in a domain model, they are ultimately going to be classes in the codebase. However, they do not have members nor methods defined.

Describe the solution you'd like

It works pretty well, but it would be much prettier if the members & methods boxes were not rendered on the diagram (nor the dividers) if there are none.

Then there would just be a node with a title. I did try using a flowchart, but for a domain model, you really need the UML-style arrows for composition, aggregation etc.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@apeacock1991 apeacock1991 added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Jun 14, 2022
@apeacock1991 apeacock1991 changed the title Remove Members & Methods Box If They Are Not Set Remove Members & Methods Box On Class Diagram, If They Are Not Set Jun 14, 2022
@knsv
Copy link
Collaborator

knsv commented Aug 20, 2022

Thanks for the suggestion. We are adding this to the backlog

@jgreywolf jgreywolf added Contributor needed Status: Approved Is ready to be worked on Graph: Class Good first issue! and removed Status: Triage Needs to be verified, categorized, etc labels Mar 17, 2023
@jgreywolf jgreywolf self-assigned this Apr 6, 2023
@jdauvill
Copy link

jdauvill commented May 11, 2023

We have the same need: UML-style arrows and display of cardinalities, but would like to avoid displaying empty members & methods boxes.
In practice, this makes the class graphs hardly usable for us. Would you consider giving this problem a high priority? - Or should we try to find our own solution?

@jgreywolf
Copy link
Contributor

I am actively working on this one now, finally :)

@pauliev
Copy link

pauliev commented Dec 30, 2023

Hey, just want to thumbs up this again... would be nice to have...

@delepster
Copy link

Any news on this?

@pindab0ter
Copy link

Would like to know if this is being looked at soon or not.

@jgreywolf
Copy link
Contributor

This will be resolved with #5880

@jgreywolf jgreywolf linked a pull request Sep 25, 2024 that will close this issue
4 tasks
@ParanoidUser
Copy link

Kudos to @knsv, @jgreywolf, and @yari-dewalt for the heavy lifting on the update to the new renderer👏

Since this feature has attracted a lot of interest, here’s how to configure the class diagram to hide those empty member boxes (more in documentation). You can play around with it in the preview build.

---
  config:
    class:
      hideEmptyMembersBox: true
---
classDiagram
  class Duck
---
  config:
    class:
      hideEmptyMembersBox: true
---
classDiagram
  note for Duck "This will be rendered without empty boxes 
  once GitHub updates to the latest release ."
  class Duck
Loading

@devgony
Copy link

devgony commented Nov 3, 2024

@ParanoidUser How do we adjust hideEmptyMembersBox? Does it need special mermaid engine? Even your example looks like it still has member fields on github previewer
image

@jgreywolf
Copy link
Contributor

FYI - This is only available in v11.4 and up. GitHub has not updated the version they are using

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants